From 9e296fd06811276a7900efbb36071e7ffd41d474 Mon Sep 17 00:00:00 2001 From: Griko Nibras Date: Thu, 1 Feb 2024 16:19:05 +0700 Subject: [PATCH 01/30] feat: add deps visualization --- .dependency-cruiser.js | 471 +++++++++++++++++++++++++++++++++++++++++ .gitignore | 1 + package-lock.json | 432 +++++++++++++++++++++++++++++++++++++ package.json | 4 +- src/scripts/visdeps.sh | 15 ++ 5 files changed, 922 insertions(+), 1 deletion(-) create mode 100644 .dependency-cruiser.js create mode 100755 src/scripts/visdeps.sh diff --git a/.dependency-cruiser.js b/.dependency-cruiser.js new file mode 100644 index 00000000..e7d8345b --- /dev/null +++ b/.dependency-cruiser.js @@ -0,0 +1,471 @@ +/** @type {import('dependency-cruiser').IConfiguration} */ +module.exports = { + forbidden: [ + { + name: "no-circular", + severity: "warn", + comment: + "This dependency is part of a circular relationship. You might want to revise " + + "your solution (i.e. use dependency inversion, make sure the modules have a single responsibility) ", + from: {}, + to: { + circular: true, + }, + }, + { + name: "no-orphans", + comment: + "This is an orphan module - it's likely not used (anymore?). Either use it or " + + "remove it. If it's logical this module is an orphan (i.e. it's a config file), " + + "add an exception for it in your dependency-cruiser configuration. By default " + + "this rule does not scrutinize dot-files (e.g. .eslintrc.js), TypeScript declaration " + + "files (.d.ts), tsconfig.json and some of the babel and webpack configs.", + severity: "warn", + from: { + orphan: true, + pathNot: [ + "(^|/)[.][^/]+[.](js|cjs|mjs|ts|json)$", // dot files + "[.]d[.]ts$", // TypeScript declaration files + "(^|/)tsconfig[.]json$", // TypeScript config + "(^|/)(babel|webpack)[.]config[.](js|cjs|mjs|ts|json)$", // other configs + ], + }, + to: {}, + }, + { + name: "no-deprecated-core", + comment: + "A module depends on a node core module that has been deprecated. Find an alternative - these are " + + "bound to exist - node doesn't deprecate lightly.", + severity: "warn", + from: {}, + to: { + dependencyTypes: ["core"], + path: [ + "^(v8/tools/codemap)$", + "^(v8/tools/consarray)$", + "^(v8/tools/csvparser)$", + "^(v8/tools/logreader)$", + "^(v8/tools/profile_view)$", + "^(v8/tools/profile)$", + "^(v8/tools/SourceMap)$", + "^(v8/tools/splaytree)$", + "^(v8/tools/tickprocessor-driver)$", + "^(v8/tools/tickprocessor)$", + "^(node-inspect/lib/_inspect)$", + "^(node-inspect/lib/internal/inspect_client)$", + "^(node-inspect/lib/internal/inspect_repl)$", + "^(async_hooks)$", + "^(punycode)$", + "^(domain)$", + "^(constants)$", + "^(sys)$", + "^(_linklist)$", + "^(_stream_wrap)$", + ], + }, + }, + { + name: "not-to-deprecated", + comment: + "This module uses a (version of an) npm module that has been deprecated. Either upgrade to a later " + + "version of that module, or find an alternative. Deprecated modules are a security risk.", + severity: "warn", + from: {}, + to: { + dependencyTypes: ["deprecated"], + }, + }, + { + name: "no-non-package-json", + severity: "error", + comment: + "This module depends on an npm package that isn't in the 'dependencies' section of your package.json. " + + "That's problematic as the package either (1) won't be available on live (2 - worse) will be " + + "available on live with an non-guaranteed version. Fix it by adding the package to the dependencies " + + "in your package.json.", + from: {}, + to: { + dependencyTypes: ["npm-no-pkg", "npm-unknown"], + }, + }, + { + name: "not-to-unresolvable", + comment: + "This module depends on a module that cannot be found ('resolved to disk'). If it's an npm " + + "module: add it to your package.json. In all other cases you likely already know what to do.", + severity: "error", + from: {}, + to: { + couldNotResolve: true, + }, + }, + { + name: "no-duplicate-dep-types", + comment: + "Likely this module depends on an external ('npm') package that occurs more than once " + + "in your package.json i.e. bot as a devDependencies and in dependencies. This will cause " + + "maintenance problems later on.", + severity: "warn", + from: {}, + to: { + moreThanOneDependencyType: true, + // as it's pretty common to have a type import be a type only import + // _and_ (e.g.) a devDependency - don't consider type-only dependency + // types for this rule + dependencyTypesNot: ["type-only"], + }, + }, + + /* rules you might want to tweak for your specific situation: */ + { + name: "not-to-test", + comment: + "This module depends on code within a folder that should only contain tests. As tests don't " + + "implement functionality this is odd. Either you're writing a test outside the test folder " + + "or there's something in the test folder that isn't a test.", + severity: "error", + from: { + pathNot: "^(tests)", + }, + to: { + path: "^(tests)", + }, + }, + { + name: "not-to-spec", + comment: + "This module depends on a spec (test) file. The sole responsibility of a spec file is to test code. " + + "If there's something in a spec that's of use to other modules, it doesn't have that single " + + "responsibility anymore. Factor it out into (e.g.) a separate utility/ helper or a mock.", + severity: "error", + from: {}, + to: { + path: "[.](spec|test)[.](js|mjs|cjs|ts|ls|coffee|litcoffee|coffee[.]md)$", + }, + }, + { + name: "not-to-dev-dep", + severity: "error", + comment: + "This module depends on an npm package from the 'devDependencies' section of your " + + "package.json. It looks like something that ships to production, though. To prevent problems " + + "with npm packages that aren't there on production declare it (only!) in the 'dependencies'" + + "section of your package.json. If this module is development only - add it to the " + + "from.pathNot re of the not-to-dev-dep rule in the dependency-cruiser configuration", + from: { + path: "^(src)", + pathNot: "[.](spec|test)[.](js|mjs|cjs|ts|ls|coffee|litcoffee|coffee[.]md)$", + }, + to: { + dependencyTypes: ["npm-dev"], + // type only dependencies are not a problem as they don't end up in the + // production code or are ignored by the runtime. + dependencyTypesNot: ["type-only"], + pathNot: ["node_modules/@types/"], + }, + }, + { + name: "optional-deps-used", + severity: "info", + comment: + "This module depends on an npm package that is declared as an optional dependency " + + "in your package.json. As this makes sense in limited situations only, it's flagged here. " + + "If you're using an optional dependency here by design - add an exception to your" + + "dependency-cruiser configuration.", + from: {}, + to: { + dependencyTypes: ["npm-optional"], + }, + }, + { + name: "peer-deps-used", + comment: + "This module depends on an npm package that is declared as a peer dependency " + + "in your package.json. This makes sense if your package is e.g. a plugin, but in " + + "other cases - maybe not so much. If the use of a peer dependency is intentional " + + "add an exception to your dependency-cruiser configuration.", + severity: "warn", + from: {}, + to: { + dependencyTypes: ["npm-peer"], + }, + }, + ], + options: { + /* conditions specifying which files not to follow further when encountered: + - path: a regular expression to match + - dependencyTypes: see https://github.com/sverweij/dependency-cruiser/blob/main/doc/rules-reference.md#dependencytypes-and-dependencytypesnot + for a complete list + */ + doNotFollow: { + path: "node_modules", + }, + + /* conditions specifying which dependencies to exclude + - path: a regular expression to match + - dynamic: a boolean indicating whether to ignore dynamic (true) or static (false) dependencies. + leave out if you want to exclude neither (recommended!) + */ + // exclude : { + // path: '', + // dynamic: true + // }, + + /* pattern specifying which files to include (regular expression) + dependency-cruiser will skip everything not matching this pattern + */ + // includeOnly : '', + + /* dependency-cruiser will include modules matching against the focus + regular expression in its output, as well as their neighbours (direct + dependencies and dependents) + */ + // focus : '', + + /* List of module systems to cruise. + When left out dependency-cruiser will fall back to the list of _all_ + module systems it knows of. It's the default because it's the safe option + It might come at a performance penalty, though. + moduleSystems: ['amd', 'cjs', 'es6', 'tsd'] + + As in practice only commonjs ('cjs') and ecmascript modules ('es6') + are widely used, you can limit the moduleSystems to those. + */ + + // moduleSystems: ['cjs', 'es6'], + + /* prefix for links in html and svg output (e.g. 'https://github.com/you/yourrepo/blob/develop/' + to open it on your online repo or `vscode://file/${process.cwd()}/` to + open it in visual studio code), + */ + // prefix: '', + + /* false (the default): ignore dependencies that only exist before typescript-to-javascript compilation + true: also detect dependencies that only exist before typescript-to-javascript compilation + "specify": for each dependency identify whether it only exists before compilation or also after + */ + tsPreCompilationDeps: true, + + /* + list of extensions to scan that aren't javascript or compile-to-javascript. + Empty by default. Only put extensions in here that you want to take into + account that are _not_ parsable. + */ + // extraExtensionsToScan: [".json", ".jpg", ".png", ".svg", ".webp"], + + /* if true combines the package.jsons found from the module up to the base + folder the cruise is initiated from. Useful for how (some) mono-repos + manage dependencies & dependency definitions. + */ + // combinedDependencies: false, + + /* if true leave symlinks untouched, otherwise use the realpath */ + // preserveSymlinks: false, + + /* TypeScript project file ('tsconfig.json') to use for + (1) compilation and + (2) resolution (e.g. with the paths property) + + The (optional) fileName attribute specifies which file to take (relative to + dependency-cruiser's current working directory). When not provided + defaults to './tsconfig.json'. + */ + tsConfig: { + fileName: "tsconfig.json", + }, + + /* Webpack configuration to use to get resolve options from. + + The (optional) fileName attribute specifies which file to take (relative + to dependency-cruiser's current working directory. When not provided defaults + to './webpack.conf.js'. + + The (optional) `env` and `arguments` attributes contain the parameters to be passed if + your webpack config is a function and takes them (see webpack documentation + for details) + */ + // webpackConfig: { + // fileName: 'webpack.config.js', + // env: {}, + // arguments: {} + // }, + + /* Babel config ('.babelrc', '.babelrc.json', '.babelrc.json5', ...) to use + for compilation (and whatever other naughty things babel plugins do to + source code). This feature is well tested and usable, but might change + behavior a bit over time (e.g. more precise results for used module + systems) without dependency-cruiser getting a major version bump. + */ + // babelConfig: { + // fileName: '.babelrc', + // }, + + /* List of strings you have in use in addition to cjs/ es6 requires + & imports to declare module dependencies. Use this e.g. if you've + re-declared require, use a require-wrapper or use window.require as + a hack. + */ + // exoticRequireStrings: [], + /* options to pass on to enhanced-resolve, the package dependency-cruiser + uses to resolve module references to disk. You can set most of these + options in a webpack.conf.js - this section is here for those + projects that don't have a separate webpack config file. + + Note: settings in webpack.conf.js override the ones specified here. + */ + enhancedResolveOptions: { + /* List of strings to consider as 'exports' fields in package.json. Use + ['exports'] when you use packages that use such a field and your environment + supports it (e.g. node ^12.19 || >=14.7 or recent versions of webpack). + + If you have an `exportsFields` attribute in your webpack config, that one + will have precedence over the one specified here. + */ + exportsFields: ["exports"], + /* List of conditions to check for in the exports field. e.g. use ['imports'] + if you're only interested in exposed es6 modules, ['require'] for commonjs, + or all conditions at once `(['import', 'require', 'node', 'default']`) + if anything goes for you. Only works when the 'exportsFields' array is + non-empty. + + If you have a 'conditionNames' attribute in your webpack config, that one will + have precedence over the one specified here. + */ + conditionNames: ["import", "require", "node", "default", "types"], + /* + The extensions, by default are the same as the ones dependency-cruiser + can access (run `npx depcruise --info` to see which ones that are in + _your_ environment. If that list is larger than what you need (e.g. + it contains .js, .jsx, .ts, .tsx, .cts, .mts - but you don't use + TypeScript you can pass just the extensions you actually use (e.g. + [".js", ".jsx"]). This can speed up the most expensive step in + dependency cruising (module resolution) quite a bit. + */ + // extensions: [".js", ".jsx", ".ts", ".tsx", ".d.ts"], + /* + If your TypeScript project makes use of types specified in 'types' + fields in package.jsons of external dependencies, specify "types" + in addition to "main" in here, so enhanced-resolve (the resolver + dependency-cruiser uses) knows to also look there. You can also do + this if you're not sure, but still use TypeScript. In a future version + of dependency-cruiser this will likely become the default. + */ + mainFields: ["main", "types", "typings"], + /* + A list of alias fields in manifests (package.jsons). + Specify a field, such as browser, to be parsed according to + [this specification](https://github.com/defunctzombie/package-browser-field-spec). + Also see [resolve.alias](https://webpack.js.org/configuration/resolve/#resolvealiasfields) + in the webpack docs. + + Defaults to an empty array (don't use any alias fields). + */ + // aliasFields: ["browser"], + }, + reporterOptions: { + dot: { + /* pattern of modules that can be consolidated in the detailed + graphical dependency graph. The default pattern in this configuration + collapses everything in node_modules to one folder deep so you see + the external modules, but not the innards your app depends upon. + */ + collapsePattern: "node_modules/(@[^/]+/[^/]+|[^/]+)", + + /* Options to tweak the appearance of your graph.See + https://github.com/sverweij/dependency-cruiser/blob/main/doc/options-reference.md#reporteroptions + for details and some examples. If you don't specify a theme + don't worry - dependency-cruiser will fall back to the default one. + */ + // theme: { + // graph: { + // /* use splines: "ortho" for straight lines. Be aware though + // graphviz might take a long time calculating ortho(gonal) + // routings. + // */ + // splines: "true" + // }, + // modules: [ + // { + // criteria: { matchesFocus: true }, + // attributes: { + // fillcolor: "lime", + // penwidth: 2, + // }, + // }, + // { + // criteria: { matchesFocus: false }, + // attributes: { + // fillcolor: "lightgrey", + // }, + // }, + // { + // criteria: { matchesReaches: true }, + // attributes: { + // fillcolor: "lime", + // penwidth: 2, + // }, + // }, + // { + // criteria: { matchesReaches: false }, + // attributes: { + // fillcolor: "lightgrey", + // }, + // }, + // { + // criteria: { source: "^src/model" }, + // attributes: { fillcolor: "#ccccff" } + // }, + // { + // criteria: { source: "^src/view" }, + // attributes: { fillcolor: "#ccffcc" } + // }, + // ], + // dependencies: [ + // { + // criteria: { "rules[0].severity": "error" }, + // attributes: { fontcolor: "red", color: "red" } + // }, + // { + // criteria: { "rules[0].severity": "warn" }, + // attributes: { fontcolor: "orange", color: "orange" } + // }, + // { + // criteria: { "rules[0].severity": "info" }, + // attributes: { fontcolor: "blue", color: "blue" } + // }, + // { + // criteria: { resolved: "^src/model" }, + // attributes: { color: "#0000ff77" } + // }, + // { + // criteria: { resolved: "^src/view" }, + // attributes: { color: "#00770077" } + // } + // ] + // } + }, + archi: { + /* pattern of modules that can be consolidated in the high level + graphical dependency graph. If you use the high level graphical + dependency graph reporter (`archi`) you probably want to tweak + this collapsePattern to your situation. + */ + collapsePattern: "^(packages|src|lib|app|bin|test(s?)|spec(s?))/[^/]+|node_modules/(@[^/]+/[^/]+|[^/]+)", + + /* Options to tweak the appearance of your graph.See + https://github.com/sverweij/dependency-cruiser/blob/main/doc/options-reference.md#reporteroptions + for details and some examples. If you don't specify a theme + for 'archi' dependency-cruiser will use the one specified in the + dot section (see above), if any, and otherwise use the default one. + */ + // theme: { + // }, + }, + text: { + highlightFocused: true, + }, + }, + }, +}; +// generated: dependency-cruiser@16.1.0 on 2024-02-01T08:53:47.608Z diff --git a/.gitignore b/.gitignore index a4347a26..3849ad51 100644 --- a/.gitignore +++ b/.gitignore @@ -6,6 +6,7 @@ .sentryclirc .turbo .vercel +.visdeps .vscode *.log *.pem diff --git a/package-lock.json b/package-lock.json index f23fcd0a..9b0a24e8 100644 --- a/package-lock.json +++ b/package-lock.json @@ -84,6 +84,7 @@ "@types/testing-library__jest-dom": "^5.14.9", "@typescript-eslint/eslint-plugin": "^6.20.0", "@typescript-eslint/parser": "^6.20.0", + "dependency-cruiser": "^16.1.0", "eslint": "^8.56.0", "eslint-config-next": "^14.1.0", "eslint-config-prettier": "^9.1.0", @@ -10066,6 +10067,24 @@ "acorn": "^6.0.0 || ^7.0.0 || ^8.0.0" } }, + "node_modules/acorn-jsx-walk": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/acorn-jsx-walk/-/acorn-jsx-walk-2.0.0.tgz", + "integrity": "sha512-uuo6iJj4D4ygkdzd6jPtcxs8vZgDX9YFIkqczGImoypX2fQ4dVImmu3UzA4ynixCIMTrEOWW+95M2HuBaCEOVA==", + "dev": true + }, + "node_modules/acorn-loose": { + "version": "8.4.0", + "resolved": "https://registry.npmjs.org/acorn-loose/-/acorn-loose-8.4.0.tgz", + "integrity": "sha512-M0EUka6rb+QC4l9Z3T0nJEzNOO7JcoJlYMrBlyBCiFSXRyxjLKayd4TbQs2FDRWQU1h9FR7QVNHt+PEaoNL5rQ==", + "dev": true, + "dependencies": { + "acorn": "^8.11.0" + }, + "engines": { + "node": ">=0.4.0" + } + }, "node_modules/acorn-walk": { "version": "8.3.2", "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.3.2.tgz", @@ -12372,6 +12391,245 @@ "node": ">=0.10" } }, + "node_modules/dependency-cruiser": { + "version": "16.1.0", + "resolved": "https://registry.npmjs.org/dependency-cruiser/-/dependency-cruiser-16.1.0.tgz", + "integrity": "sha512-gmuLNIi4ygkf9KLKZzCWc+og7uwFTkTPauT2ma764NtHQt3r4GoWqCR/lZK/kCfOpNOPU9mB0EM/7RmRL6BFXA==", + "dev": true, + "dependencies": { + "acorn": "8.11.3", + "acorn-jsx": "5.3.2", + "acorn-jsx-walk": "2.0.0", + "acorn-loose": "8.4.0", + "acorn-walk": "8.3.2", + "ajv": "8.12.0", + "chalk": "5.3.0", + "commander": "11.1.0", + "enhanced-resolve": "5.15.0", + "figures": "6.0.1", + "ignore": "5.3.0", + "indent-string": "5.0.0", + "interpret": "^3.1.1", + "is-installed-globally": "1.0.0", + "json5": "2.2.3", + "lodash": "4.17.21", + "picomatch": "3.0.1", + "prompts": "2.4.2", + "rechoir": "^0.8.0", + "safe-regex": "2.1.1", + "semver": "^7.5.4", + "semver-try-require": "6.2.3", + "teamcity-service-messages": "0.1.14", + "tsconfig-paths-webpack-plugin": "4.1.0", + "watskeburt": "2.0.5", + "wrap-ansi": "9.0.0" + }, + "bin": { + "depcruise": "bin/dependency-cruise.mjs", + "depcruise-baseline": "bin/depcruise-baseline.mjs", + "depcruise-fmt": "bin/depcruise-fmt.mjs", + "depcruise-wrap-stream-in-html": "bin/wrap-stream-in-html.mjs", + "dependency-cruise": "bin/dependency-cruise.mjs", + "dependency-cruiser": "bin/dependency-cruise.mjs" + }, + "engines": { + "node": "^18.17||>=20" + } + }, + "node_modules/dependency-cruiser/node_modules/ajv": { + "version": "8.12.0", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.12.0.tgz", + "integrity": "sha512-sRu1kpcO9yLtYxBKvqfTeh9KzZEwO3STyX1HT+4CaDzC6HpTGYhIhPIzj9XuKU7KYDwnaeh5hcOwjy1QuJzBPA==", + "dev": true, + "dependencies": { + "fast-deep-equal": "^3.1.1", + "json-schema-traverse": "^1.0.0", + "require-from-string": "^2.0.2", + "uri-js": "^4.2.2" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/epoberezkin" + } + }, + "node_modules/dependency-cruiser/node_modules/ansi-regex": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.0.1.tgz", + "integrity": "sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA==", + "dev": true, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-regex?sponsor=1" + } + }, + "node_modules/dependency-cruiser/node_modules/ansi-styles": { + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.1.tgz", + "integrity": "sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==", + "dev": true, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/dependency-cruiser/node_modules/chalk": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-5.3.0.tgz", + "integrity": "sha512-dLitG79d+GV1Nb/VYcCDFivJeK1hiukt9QjRNVOsUtTy1rR1YJsmpGGTZ3qJos+uw7WmWF4wUwBd9jxjocFC2w==", + "dev": true, + "engines": { + "node": "^12.17.0 || ^14.13 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "node_modules/dependency-cruiser/node_modules/commander": { + "version": "11.1.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-11.1.0.tgz", + "integrity": "sha512-yPVavfyCcRhmorC7rWlkHn15b4wDVgVmBA7kV4QVBsF7kv/9TKJAbAXVTxvTnwP8HHKjRCJDClKbciiYS7p0DQ==", + "dev": true, + "engines": { + "node": ">=16" + } + }, + "node_modules/dependency-cruiser/node_modules/emoji-regex": { + "version": "10.3.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-10.3.0.tgz", + "integrity": "sha512-QpLs9D9v9kArv4lfDEgg1X/gN5XLnf/A6l9cs8SPZLRZR3ZkY9+kwIQTxm+fsSej5UMYGE8fdoaZVIBlqG0XTw==", + "dev": true + }, + "node_modules/dependency-cruiser/node_modules/figures": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/figures/-/figures-6.0.1.tgz", + "integrity": "sha512-0oY/olScYD4IhQ8u//gCPA4F3mlTn2dacYmiDm/mbDQvpmLjV4uH+zhsQ5IyXRyvqkvtUkXkNdGvg5OFJTCsuQ==", + "dev": true, + "dependencies": { + "is-unicode-supported": "^2.0.0" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/dependency-cruiser/node_modules/indent-string": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-5.0.0.tgz", + "integrity": "sha512-m6FAo/spmsW2Ab2fU35JTYwtOKa2yAwXSwgjSv1TJzh4Mh7mC3lzAOVLBprb72XsTrgkEIsl7YrFNAiDiRhIGg==", + "dev": true, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/dependency-cruiser/node_modules/interpret": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/interpret/-/interpret-3.1.1.tgz", + "integrity": "sha512-6xwYfHbajpoF0xLW+iwLkhwgvLoZDfjYfoFNu8ftMoXINzwuymNLd9u/KmwtdT2GbR+/Cz66otEGEVVUHX9QLQ==", + "dev": true, + "engines": { + "node": ">=10.13.0" + } + }, + "node_modules/dependency-cruiser/node_modules/is-unicode-supported": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-unicode-supported/-/is-unicode-supported-2.0.0.tgz", + "integrity": "sha512-FRdAyx5lusK1iHG0TWpVtk9+1i+GjrzRffhDg4ovQ7mcidMQ6mj+MhKPmvh7Xwyv5gIS06ns49CA7Sqg7lC22Q==", + "dev": true, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/dependency-cruiser/node_modules/json-schema-traverse": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", + "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==", + "dev": true + }, + "node_modules/dependency-cruiser/node_modules/picomatch": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-3.0.1.tgz", + "integrity": "sha512-I3EurrIQMlRc9IaAZnqRR044Phh2DXY+55o7uJ0V+hYZAcQYSuFWsc9q5PvyDHUSCe1Qxn/iBz+78s86zWnGag==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, + "node_modules/dependency-cruiser/node_modules/rechoir": { + "version": "0.8.0", + "resolved": "https://registry.npmjs.org/rechoir/-/rechoir-0.8.0.tgz", + "integrity": "sha512-/vxpCXddiX8NGfGO/mTafwjq4aFa/71pvamip0++IQk3zG8cbCj0fifNPrjjF1XMXUne91jL9OoxmdykoEtifQ==", + "dev": true, + "dependencies": { + "resolve": "^1.20.0" + }, + "engines": { + "node": ">= 10.13.0" + } + }, + "node_modules/dependency-cruiser/node_modules/string-width": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-7.1.0.tgz", + "integrity": "sha512-SEIJCWiX7Kg4c129n48aDRwLbFb2LJmXXFrWBG4NGaRtMQ3myKPKbwrD1BKqQn74oCoNMBVrfDEr5M9YxCsrkw==", + "dev": true, + "dependencies": { + "emoji-regex": "^10.3.0", + "get-east-asian-width": "^1.0.0", + "strip-ansi": "^7.1.0" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/dependency-cruiser/node_modules/strip-ansi": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.0.tgz", + "integrity": "sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==", + "dev": true, + "dependencies": { + "ansi-regex": "^6.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/strip-ansi?sponsor=1" + } + }, + "node_modules/dependency-cruiser/node_modules/wrap-ansi": { + "version": "9.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-9.0.0.tgz", + "integrity": "sha512-G8ura3S+3Z2G+mkgNRq8dqaFZAuxfsxpBB8OCTGRTCtp+l/v9nbFNmCUP1BZMts3G1142MsZfn6eeUKrr4PD1Q==", + "dev": true, + "dependencies": { + "ansi-styles": "^6.2.1", + "string-width": "^7.0.0", + "strip-ansi": "^7.1.0" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, "node_modules/dequal": { "version": "2.0.3", "resolved": "https://registry.npmjs.org/dequal/-/dequal-2.0.3.tgz", @@ -14407,6 +14665,18 @@ "node": "6.* || 8.* || >= 10.*" } }, + "node_modules/get-east-asian-width": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/get-east-asian-width/-/get-east-asian-width-1.2.0.tgz", + "integrity": "sha512-2nk+7SIVb14QrgXFHcm84tD4bKQz0RxPuMT8Ag5KPOq7J5fEmAg0UbXdTOSHqNuHSU28k55qnceesxXRZGzKWA==", + "dev": true, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/get-intrinsic": { "version": "1.2.2", "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.2.tgz", @@ -14522,6 +14792,30 @@ "node": ">=10" } }, + "node_modules/global-directory": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/global-directory/-/global-directory-4.0.1.tgz", + "integrity": "sha512-wHTUcDUoZ1H5/0iVqEudYW4/kAlN5cZ3j/bXn0Dpbizl9iaUVeWSHqiOjsgk6OW2bkLclbBjzewBz6weQ1zA2Q==", + "dev": true, + "dependencies": { + "ini": "4.1.1" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/global-directory/node_modules/ini": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/ini/-/ini-4.1.1.tgz", + "integrity": "sha512-QQnnxNyfvmHFIsj7gkPcYymR8Jdw/o7mp5ZFihxn6h8Ci6fh3Dx4E1gPjpQEpIuPo9XVNY/ZUwh4BPMjGyL01g==", + "dev": true, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, "node_modules/globals": { "version": "13.24.0", "resolved": "https://registry.npmjs.org/globals/-/globals-13.24.0.tgz", @@ -15481,6 +15775,34 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/is-installed-globally": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-installed-globally/-/is-installed-globally-1.0.0.tgz", + "integrity": "sha512-K55T22lfpQ63N4KEN57jZUAaAYqYHEe8veb/TycJRk9DdSCLLcovXz/mL6mOnhQaZsQGwPhuFopdQIlqGSEjiQ==", + "dev": true, + "dependencies": { + "global-directory": "^4.0.1", + "is-path-inside": "^4.0.0" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/is-installed-globally/node_modules/is-path-inside": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-4.0.0.tgz", + "integrity": "sha512-lJJV/5dYS+RcL8uQdBDW9c9uWFLLBNRyFhnAKXw5tVqLlKZ4RMGZKv+YQ/IA3OhD+RpbJa1LLFM1FQPGyIXvOA==", + "dev": true, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/is-interactive": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/is-interactive/-/is-interactive-1.0.0.tgz", @@ -20845,6 +21167,15 @@ "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.14.1.tgz", "integrity": "sha512-dYnhHh0nJoMfnkZs6GmmhFknAGRrLznOu5nc9ML+EJxGvrx6H7teuevqVqCuPcPK//3eDrrjQhehXVx9cnkGdw==" }, + "node_modules/regexp-tree": { + "version": "0.1.27", + "resolved": "https://registry.npmjs.org/regexp-tree/-/regexp-tree-0.1.27.tgz", + "integrity": "sha512-iETxpjK6YoRWJG5o6hXLwvjYAoW+FEZn9os0PD/b6AP6xQwsa/Y7lCVgIixBbUPMfhu+i2LtdeAqVTgGlQarfA==", + "dev": true, + "bin": { + "regexp-tree": "bin/regexp-tree" + } + }, "node_modules/regexp.prototype.flags": { "version": "1.5.1", "resolved": "https://registry.npmjs.org/regexp.prototype.flags/-/regexp.prototype.flags-1.5.1.tgz", @@ -20875,6 +21206,15 @@ "node": ">=0.10.0" } }, + "node_modules/require-from-string": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/require-from-string/-/require-from-string-2.0.2.tgz", + "integrity": "sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/require-main-filename": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-2.0.0.tgz", @@ -21215,6 +21555,15 @@ } ] }, + "node_modules/safe-regex": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/safe-regex/-/safe-regex-2.1.1.tgz", + "integrity": "sha512-rx+x8AMzKb5Q5lQ95Zoi6ZbJqwCLkqi3XuJXp5P3rT8OEc6sZCJG5AE5dU3lsgRr/F4Bs31jSlVN+j5KrsGu9A==", + "dev": true, + "dependencies": { + "regexp-tree": "~0.1.1" + } + }, "node_modules/safe-regex-test": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/safe-regex-test/-/safe-regex-test-1.0.2.tgz", @@ -21326,6 +21675,18 @@ "node": ">=10" } }, + "node_modules/semver-try-require": { + "version": "6.2.3", + "resolved": "https://registry.npmjs.org/semver-try-require/-/semver-try-require-6.2.3.tgz", + "integrity": "sha512-6q1N/Vr/4/G0EcQ1k4svN5kwfh3MJs4Gfl+zBAVcKn+AeIjKLwTXQ143Y6YHu6xEeN5gSCbCD1/5+NwCipLY5A==", + "dev": true, + "dependencies": { + "semver": "^7.5.3" + }, + "engines": { + "node": "^14||^16||>=18" + } + }, "node_modules/semver/node_modules/lru-cache": { "version": "6.0.0", "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", @@ -22334,6 +22695,12 @@ "safe-buffer": "^5.1.1" } }, + "node_modules/teamcity-service-messages": { + "version": "0.1.14", + "resolved": "https://registry.npmjs.org/teamcity-service-messages/-/teamcity-service-messages-0.1.14.tgz", + "integrity": "sha512-29aQwaHqm8RMX74u2o/h1KbMLP89FjNiMxD9wbF2BbWOnbM+q+d1sCEC+MqCc4QW3NJykn77OMpTFw/xTHIc0w==", + "dev": true + }, "node_modules/test-exclude": { "version": "6.0.0", "resolved": "https://registry.npmjs.org/test-exclude/-/test-exclude-6.0.0.tgz", @@ -22661,6 +23028,59 @@ "strip-bom": "^3.0.0" } }, + "node_modules/tsconfig-paths-webpack-plugin": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/tsconfig-paths-webpack-plugin/-/tsconfig-paths-webpack-plugin-4.1.0.tgz", + "integrity": "sha512-xWFISjviPydmtmgeUAuXp4N1fky+VCtfhOkDUFIv5ea7p4wuTomI4QTrXvFBX2S4jZsmyTSrStQl+E+4w+RzxA==", + "dev": true, + "dependencies": { + "chalk": "^4.1.0", + "enhanced-resolve": "^5.7.0", + "tsconfig-paths": "^4.1.2" + }, + "engines": { + "node": ">=10.13.0" + } + }, + "node_modules/tsconfig-paths-webpack-plugin/node_modules/chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "dependencies": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "node_modules/tsconfig-paths-webpack-plugin/node_modules/strip-bom": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", + "integrity": "sha512-vavAMRXOgBVNF6nyEEmL3DBK19iRpDcoIwW+swQ+CbGiu7lju6t+JklA1MHweoWtadgt4ISVUsXLyDq34ddcwA==", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/tsconfig-paths-webpack-plugin/node_modules/tsconfig-paths": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/tsconfig-paths/-/tsconfig-paths-4.2.0.tgz", + "integrity": "sha512-NoZ4roiN7LnbKn9QqE1amc9DJfzvZXxF4xDavcOWt1BPkdx+m+0gJuPM+S0vCe7zTJMYUP0R8pO2XMr+Y8oLIg==", + "dev": true, + "dependencies": { + "json5": "^2.2.2", + "minimist": "^1.2.6", + "strip-bom": "^3.0.0" + }, + "engines": { + "node": ">=6" + } + }, "node_modules/tsconfig-paths/node_modules/json5": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/json5/-/json5-1.0.2.tgz", @@ -23493,6 +23913,18 @@ "makeerror": "1.0.12" } }, + "node_modules/watskeburt": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/watskeburt/-/watskeburt-2.0.5.tgz", + "integrity": "sha512-mCxVT4o/U+nNxmYJ+Oei3qre4F28IBWR9c7RGS8aeAR7a7UY1y4ikTWcv+kaaybf1QXUANmB7XBHawHBcmg+kw==", + "dev": true, + "bin": { + "watskeburt": "dist/run-cli.js" + }, + "engines": { + "node": "^18||>=20" + } + }, "node_modules/wcwidth": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/wcwidth/-/wcwidth-1.0.1.tgz", diff --git a/package.json b/package.json index b98574e8..245b678f 100644 --- a/package.json +++ b/package.json @@ -12,7 +12,8 @@ "postinstall": "patch-package && run-s chains:*", "start": "next start", "test": "node --experimental-vm-modules --no-warnings ./node_modules/.bin/jest", - "test:e2e": "playwright test --project=chromium" + "test:e2e": "playwright test --project=chromium", + "visdeps": "bash ./src/scripts/visdeps.sh" }, "overrides": { "@cosmjs/amino": "0.31.x", @@ -101,6 +102,7 @@ "@types/testing-library__jest-dom": "^5.14.9", "@typescript-eslint/eslint-plugin": "^6.20.0", "@typescript-eslint/parser": "^6.20.0", + "dependency-cruiser": "^16.1.0", "eslint": "^8.56.0", "eslint-config-next": "^14.1.0", "eslint-config-prettier": "^9.1.0", diff --git a/src/scripts/visdeps.sh b/src/scripts/visdeps.sh new file mode 100755 index 00000000..7e633088 --- /dev/null +++ b/src/scripts/visdeps.sh @@ -0,0 +1,15 @@ +#!/usr/bin/env bash +mkdir .visdeps +dirs=( + components + constants + context + hooks + lib + pages + solve + utils +) +for dir in "${dirs[@]}"; do + npx depcruise src --include-only "^src" --focus "^src/${dir}" --output-type dot | dot -T svg >".visdeps/${dir}.svg" +done From 276a2a7b00b7632dc4a8e3731682d62f6544eeae Mon Sep 17 00:00:00 2001 From: Griko Nibras Date: Fri, 2 Feb 2024 01:50:44 +0700 Subject: [PATCH 02/30] fix: preferNoSetFee for cosmos wallets --- src/solve/context.tsx | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/solve/context.tsx b/src/solve/context.tsx index 1ba3cb41..99dfd284 100644 --- a/src/solve/context.tsx +++ b/src/solve/context.tsx @@ -41,6 +41,10 @@ export function SkipProvider({ children }: { children: ReactNode }) { throw new Error(`getCosmosSigner error: no offline signer for walletName '${walletName}'`); } + wallet.client.setDefaultSignOptions?.({ + preferNoSetFee: true, + }); + return wallet.offlineSigner; }, getEVMSigner: async (chainID) => { From d3d7214029dc1c48ea346fe4768c4bac77a54a55 Mon Sep 17 00:00:00 2001 From: Nur Fikri Date: Fri, 2 Feb 2024 11:22:13 +0700 Subject: [PATCH 03/30] fix: tx status infinite fetch after settled --- src/solve/queries.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/solve/queries.ts b/src/solve/queries.ts index e6e2be81..6865bd9c 100644 --- a/src/solve/queries.ts +++ b/src/solve/queries.ts @@ -304,7 +304,7 @@ export const useBroadcastedTxsStatus = ({ setPrevData(resData); return resData; }, - enabled: !isSettled && !!txs && txs.length > 0 && enabled !== undefined ? enabled : true, + enabled: !isSettled && (!!txs && txs.length > 0 && enabled !== undefined ? enabled : true), refetchInterval: 1000 * 2, // to make the data persist when query key changed initialData: prevData, From 4c3307bde7c535c830fa6049c72c1825d51e1d4b Mon Sep 17 00:00:00 2001 From: Nur Fikri Date: Fri, 2 Feb 2024 11:23:10 +0700 Subject: [PATCH 04/30] fix: tx hash not showing in multiple transaction --- src/components/RouteDisplay.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/components/RouteDisplay.tsx b/src/components/RouteDisplay.tsx index 01b48dc0..edb9623a 100644 --- a/src/components/RouteDisplay.tsx +++ b/src/components/RouteDisplay.tsx @@ -109,6 +109,7 @@ function TransferStep({ action, actions, id, statusData }: TransferStepProps) { // We can assume that the swap operation by the previous transfer .find((x) => Number(x.id.split("-")[2]) === operationIndex + 1) ?.id.split("-")[0] === "swap"; + const isPrevOpTransfer = actions[operationIndex - 1]?.type === "TRANSFER"; // We can assume that the transfer is successful when the state is TRANSFER_SUCCESS or TRANSFER_RECEIVED const renderTransferState = useMemo(() => { @@ -165,13 +166,14 @@ function TransferStep({ action, actions, id, statusData }: TransferStepProps) { const packetTx = (() => { if (operationIndex === 0) return transferStatus?.txs.sendTx; if (isNextOpSwap) return transferStatus?.txs.sendTx; + if (isPrevOpTransfer) return transferStatus?.txs.sendTx; return transferStatus?.txs.receiveTx; })(); if (!packetTx?.explorerLink) { return null; } return makeExplorerLink(packetTx.explorerLink); - }, [isNextOpSwap, operationIndex, transferStatus?.txs.receiveTx, transferStatus?.txs.sendTx]); + }, [isNextOpSwap, isPrevOpTransfer, operationIndex, transferStatus?.txs.receiveTx, transferStatus?.txs.sendTx]); const { getAsset } = useAssets(); From b937df8746a51359b49ac77bd9f103f83e24a6d5 Mon Sep 17 00:00:00 2001 From: Nur Fikri Date: Sat, 3 Feb 2024 03:51:01 +0700 Subject: [PATCH 05/30] chore: bump @skip-router/core --- package-lock.json | 8 ++++---- package.json | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package-lock.json b/package-lock.json index 9b0a24e8..d05cf5ee 100644 --- a/package-lock.json +++ b/package-lock.json @@ -38,7 +38,7 @@ "@radix-ui/react-scroll-area": "^1.0.5", "@radix-ui/react-tooltip": "^1.0.7", "@sentry/nextjs": "^7.99.0", - "@skip-router/core": "1.2.10", + "@skip-router/core": "1.2.11", "@tailwindcss/forms": "^0.5.7", "@tanstack/query-sync-storage-persister": "^5.18.0", "@tanstack/react-query": "^5.18.0", @@ -7785,9 +7785,9 @@ } }, "node_modules/@skip-router/core": { - "version": "1.2.10", - "resolved": "https://registry.npmjs.org/@skip-router/core/-/core-1.2.10.tgz", - "integrity": "sha512-ng/XRDxC4H3/5cGGbTWrKR3BBictSswV2EHX5XmXf5pPWfR/8vp3bSDv10l5KHETOcG2NRgzFR7S8YnJYnowZQ==", + "version": "1.2.11", + "resolved": "https://registry.npmjs.org/@skip-router/core/-/core-1.2.11.tgz", + "integrity": "sha512-NT9+XusGfvIW2OTGNG6IW+fiD54lgfbTOCIbHVDdx08pH/7OtjNLV91xAtqi6HLSX4E7xl5lQIdQjqAqhsSv2w==", "dependencies": { "@axelar-network/axelarjs-sdk": "^0.13.6", "@cosmjs/amino": "^0.31.1", diff --git a/package.json b/package.json index 245b678f..11623b94 100644 --- a/package.json +++ b/package.json @@ -56,7 +56,7 @@ "@radix-ui/react-scroll-area": "^1.0.5", "@radix-ui/react-tooltip": "^1.0.7", "@sentry/nextjs": "^7.99.0", - "@skip-router/core": "1.2.10", + "@skip-router/core": "1.2.11", "@tailwindcss/forms": "^0.5.7", "@tanstack/query-sync-storage-persister": "^5.18.0", "@tanstack/react-query": "^5.18.0", From 69075379d2f457341e3937dca9e3d3788bf46157 Mon Sep 17 00:00:00 2001 From: Nur Fikri Date: Sat, 3 Feb 2024 03:51:46 +0700 Subject: [PATCH 06/30] feat: lifecycle tracking when tracked not broadcasted --- src/components/TransactionDialog/TransactionDialogContent.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/TransactionDialog/TransactionDialogContent.tsx b/src/components/TransactionDialog/TransactionDialogContent.tsx index 974d9b7f..4393bfc6 100644 --- a/src/components/TransactionDialog/TransactionDialogContent.tsx +++ b/src/components/TransactionDialog/TransactionDialogContent.tsx @@ -66,7 +66,7 @@ function TransactionDialogContent({ route, onClose, isAmountError, transactionCo validateGasBalance: route.txsRequired === 1, slippageTolerancePercent: useSettingsStore.getState().slippage, getGasPrice: getHotfixedGasPrice, - onTransactionBroadcast: async (txStatus) => { + onTransactionTracked: async (txStatus) => { const makeExplorerUrl = await getExplorerUrl(txStatus.chainID); const explorerLink = makeExplorerUrl?.(txStatus.txHash); From b313370996d99577992e62ee235831b99e161caa Mon Sep 17 00:00:00 2001 From: Nur Fikri Date: Sat, 3 Feb 2024 04:20:49 +0700 Subject: [PATCH 07/30] feat: remove tx history failed fetch 4 times --- src/components/HistoryDialog/HistoryList.tsx | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/components/HistoryDialog/HistoryList.tsx b/src/components/HistoryDialog/HistoryList.tsx index 30a78bd0..ec0eb1fb 100644 --- a/src/components/HistoryDialog/HistoryList.tsx +++ b/src/components/HistoryDialog/HistoryList.tsx @@ -61,7 +61,11 @@ export const Item = forwardRef(function Item(props, r const headingRef = useRef(null); const estimatedFinalityTime = useFinalityTimeEstimate(data.route); - const { data: txsStatus, isLoading } = useBroadcastedTxsStatus({ + const { + data: txsStatus, + isLoading, + errorUpdateCount, + } = useBroadcastedTxsStatus({ txsRequired: data.route.txsRequired, txs: data.txStatus.map((item) => ({ chainID: item.chainId, @@ -71,6 +75,9 @@ export const Item = forwardRef(function Item(props, r }); useEffect(() => { + if (errorUpdateCount > 4) { + txHistory.remove(id); + } if (txsStatus?.isSettled) { if (txsStatus.isSuccess) { txHistory.success(id); @@ -79,7 +86,7 @@ export const Item = forwardRef(function Item(props, r txHistory.fail(id); } } - }, [id, txsStatus]); + }, [errorUpdateCount, id, txsStatus]); return ( Date: Sat, 3 Feb 2024 00:19:43 +0700 Subject: [PATCH 08/30] chore: log swap errors on console --- src/components/TransactionDialog/TransactionDialogContent.tsx | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/components/TransactionDialog/TransactionDialogContent.tsx b/src/components/TransactionDialog/TransactionDialogContent.tsx index 4393bfc6..73efcacc 100644 --- a/src/components/TransactionDialog/TransactionDialogContent.tsx +++ b/src/components/TransactionDialog/TransactionDialogContent.tsx @@ -97,9 +97,7 @@ function TransactionDialogContent({ route, onClose, isAmountError, transactionCo setTxComplete(true); } catch (err: unknown) { - if (process.env.NODE_ENV === "development") { - console.error(err); - } + console.error(err); if (err instanceof Error) { if (!isUserRejectedRequestError(err)) { Sentry.withScope((scope) => { From 6265eca83f2e12655cd63cc812ea345de62bcd16 Mon Sep 17 00:00:00 2001 From: Griko Nibras Date: Mon, 5 Feb 2024 12:37:01 +0700 Subject: [PATCH 09/30] refactor: swap ethers usage to viem --- src/components/AssetInput.tsx | 6 ++--- .../AssetSelect/AssetSelectContent.tsx | 12 ++++++---- src/components/AssetValue.tsx | 23 +++++++++---------- src/components/RouteDisplay.tsx | 11 ++++----- src/components/SwapWidget/useSwapWidget.ts | 6 ++--- src/utils/number.ts | 11 ++++----- 6 files changed, 33 insertions(+), 36 deletions(-) diff --git a/src/components/AssetInput.tsx b/src/components/AssetInput.tsx index 7c4df0a2..1205321d 100644 --- a/src/components/AssetInput.tsx +++ b/src/components/AssetInput.tsx @@ -1,8 +1,8 @@ import { BackspaceIcon } from "@heroicons/react/20/solid"; import { Asset } from "@skip-router/core"; import { BigNumber } from "bignumber.js"; -import { formatUnits } from "ethers"; import { MouseEventHandler, useMemo } from "react"; +import { formatUnits } from "viem"; import { useAssets } from "@/context/assets"; import { useAnyDisclosureOpen } from "@/context/disclosures"; @@ -69,7 +69,7 @@ function AssetInput({ const selectedAssetBalance = useMemo(() => { if (!asset || !balances) return "0"; - return formatUnits(balances[asset.denom] ?? "0", asset.decimals ?? 6); + return formatUnits(BigInt(balances[asset.denom] ?? "0"), asset.decimals ?? 6); }, [asset, balances]); const maxButtonDisabled = useMemo(() => { @@ -121,7 +121,7 @@ function AssetInput({ isLoading && "animate-pulse text-neutral-500", )} type="text" - placeholder="0.0" + placeholder="0" value={formatNumberWithCommas(amount)} inputMode="numeric" onChange={(e) => { diff --git a/src/components/AssetSelect/AssetSelectContent.tsx b/src/components/AssetSelect/AssetSelectContent.tsx index 2b7d5c8a..ac7cdf19 100644 --- a/src/components/AssetSelect/AssetSelectContent.tsx +++ b/src/components/AssetSelect/AssetSelectContent.tsx @@ -1,11 +1,10 @@ import { ArrowLeftIcon } from "@heroicons/react/20/solid"; import * as ScrollArea from "@radix-ui/react-scroll-area"; import { Asset } from "@skip-router/core"; -import { formatUnits, toBigInt } from "ethers"; import { matchSorter } from "match-sorter"; import { useEffect, useMemo, useRef, useState } from "react"; +import { formatUnits } from "viem"; -import { formatMaxFraction } from "@/utils/intl"; import { cn } from "@/utils/ui"; interface Props { @@ -39,8 +38,8 @@ function AssetSelectContent({ assets = [], balances, onChange, onClose, showChai return true; }) .sort((a, b) => { - const balanceA = balances[a.denom] ? toBigInt(balances[a.denom]) : 0n; - const balanceB = balances[b.denom] ? toBigInt(balances[b.denom]) : 0n; + const balanceA = BigInt(balances[a.denom] || "0"); + const balanceB = BigInt(balances[b.denom] || "0"); if (balanceA > balanceB) return -1; if (balanceA < balanceB) return 1; return 0; @@ -102,7 +101,10 @@ function AssetSelectContent({ assets = [], balances, onChange, onClose, showChai
{balances[asset.denom] && (

- {formatMaxFraction(parseFloat(formatUnits(balances[asset.denom], asset.decimals)))} + {parseFloat(formatUnits(BigInt(balances[asset.denom]), asset.decimals ?? 6)).toLocaleString( + "en-US", + { maximumFractionDigits: 6 }, + )}

)}
diff --git a/src/components/AssetValue.tsx b/src/components/AssetValue.tsx index 2de585ce..c5ea9551 100644 --- a/src/components/AssetValue.tsx +++ b/src/components/AssetValue.tsx @@ -1,28 +1,27 @@ -import { BigNumberish, formatUnits } from "ethers"; import { useMemo } from "react"; +import { formatUnits } from "viem"; -import { ChainId } from "@/chains/types"; import { useAssets } from "@/context/assets"; import { raise } from "@/utils/assert"; -import { formatMaxFraction } from "@/utils/intl"; interface Props { - chainId: ChainId; + chainId: string; denom: string; - value: BigNumberish; + value: string; } -export const AssetValue = ({ chainId, denom, value }: Props) => { +export function AssetValue({ chainId, denom, value }: Props) { const { getAsset } = useAssets(); - const { decimals, recommendedSymbol } = useMemo(() => { - return getAsset(denom, chainId) || raise(`No asset found for ${denom}`); + const { decimals = 6, recommendedSymbol } = useMemo(() => { + return getAsset(denom, chainId) || raise(`AssetValue error: no asset found for '${denom}' on '${chainId}'`); }, [chainId, denom, getAsset]); const formattedValue = useMemo(() => { - let v = formatUnits(value, decimals); - v = formatMaxFraction(parseFloat(v), 2); - return v; + const v = formatUnits(BigInt(value), decimals); + return parseFloat(v).toLocaleString("en-US", { + maximumFractionDigits: 2, + }); }, [decimals, value]); return ( @@ -30,4 +29,4 @@ export const AssetValue = ({ chainId, denom, value }: Props) => { {formattedValue} {recommendedSymbol} ); -}; +} diff --git a/src/components/RouteDisplay.tsx b/src/components/RouteDisplay.tsx index edb9623a..63d07769 100644 --- a/src/components/RouteDisplay.tsx +++ b/src/components/RouteDisplay.tsx @@ -1,8 +1,7 @@ -/* eslint-disable @next/next/no-img-element */ import { CheckCircleIcon, XCircleIcon } from "@heroicons/react/20/solid"; import { BridgeType, RouteResponse } from "@skip-router/core"; -import { formatUnits } from "ethers"; import { ComponentProps, Dispatch, Fragment, SetStateAction, SyntheticEvent, useMemo } from "react"; +import { formatUnits } from "viem"; import { useAssets } from "@/context/assets"; import { useBridgeByID } from "@/hooks/useBridges"; @@ -557,17 +556,17 @@ function RouteDisplay({ route, isRouteExpanded, setIsRouteExpanded, broadcastedT const amountIn = useMemo(() => { try { - return formatUnits(route.amountIn, sourceAsset?.decimals ?? 6); + return formatUnits(BigInt(route.amountIn), sourceAsset?.decimals ?? 6); } catch { - return "0.0"; + return "0"; } }, [route.amountIn, sourceAsset?.decimals]); const amountOut = useMemo(() => { try { - return formatUnits(route.amountOut ?? 0, destinationAsset?.decimals ?? 6); + return formatUnits(BigInt(route.amountOut), destinationAsset?.decimals ?? 6); } catch { - return "0.0"; + return "0"; } }, [route.amountOut, destinationAsset?.decimals]); diff --git a/src/components/SwapWidget/useSwapWidget.ts b/src/components/SwapWidget/useSwapWidget.ts index 731aa64d..7d7f0dd3 100644 --- a/src/components/SwapWidget/useSwapWidget.ts +++ b/src/components/SwapWidget/useSwapWidget.ts @@ -1,9 +1,9 @@ import { useManager as useCosmosManager } from "@cosmos-kit/react"; import { Asset, BridgeType } from "@skip-router/core"; import { BigNumber } from "bignumber.js"; -import { formatUnits } from "ethers"; import { MouseEvent, useCallback, useEffect, useMemo, useState } from "react"; import toast from "react-hot-toast"; +import { formatUnits } from "viem"; import { useAccount as useWagmiAccount, useNetwork as useWagmiNetwork, @@ -397,7 +397,7 @@ export function useSwapWidget() { * - source chain is not cosmos */ if (event.shiftKey || isDifferentAsset || isNotCosmos) { - const newAmountIn = formatUnits(balance, decimals); + const newAmountIn = formatUnits(BigInt(balance), decimals); useSwapWidgetStore.setState({ amountIn: newAmountIn, direction: "swap-in", @@ -419,7 +419,7 @@ export function useSwapWidget() { } // otherwise, max balance - const newAmountIn = formatUnits(balance, decimals); + const newAmountIn = formatUnits(BigInt(balance), decimals); useSwapWidgetStore.setState({ amountIn: newAmountIn, direction: "swap-in", diff --git a/src/utils/number.ts b/src/utils/number.ts index 28bd5a27..36490ffa 100644 --- a/src/utils/number.ts +++ b/src/utils/number.ts @@ -1,17 +1,14 @@ import { BigNumber } from "bignumber.js"; -import { formatUnits } from "ethers"; +import { formatUnits } from "viem"; export function formatNumberWithCommas(str: string | number) { - const text = String(str); - // Format integer part with commas every three digits - const parts = text.split("."); + const parts = str.toString().split("."); parts[0] = parts[0].replace(/\B(?=(\d{3})+(?!\d))/g, ","); - return parts.join("."); } export function formatNumberWithoutCommas(str: string | number) { - return String(str).replace(/,/g, ""); + return str.toString().replace(/,/g, ""); } export function getAmountWei(amount?: string, decimals = 6) { @@ -26,7 +23,7 @@ export function getAmountWei(amount?: string, decimals = 6) { export function parseAmountWei(amount?: string, decimals = 6) { if (!amount) return "0"; try { - return formatUnits(amount.replace(/,/g, ""), decimals ?? 6); + return formatUnits(BigInt(amount.replace(/,/g, "")), decimals ?? 6); } catch (err) { return "0"; } From aa73b4524c3f81d5f87d6ea7f29c6e56a0569e41 Mon Sep 17 00:00:00 2001 From: Griko Nibras Date: Mon, 5 Feb 2024 12:37:47 +0700 Subject: [PATCH 10/30] feat: add stride deps Signed-off-by: Griko Nibras --- package-lock.json | 16 ++++++++++++++++ package.json | 1 + 2 files changed, 17 insertions(+) diff --git a/package-lock.json b/package-lock.json index d05cf5ee..d838589b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -63,6 +63,7 @@ "react-dom": "^18.2.0", "react-hot-toast": "^2.4.1", "resend": "^3.1.0", + "stridejs": "^0.8.0-alpha.5", "tailwind-merge": "^2.2.1", "tailwindcss": "^3.4.1", "tailwindcss-animate": "^1.0.7", @@ -22221,6 +22222,21 @@ "node": ">=4" } }, + "node_modules/stridejs": { + "version": "0.8.0-alpha.5", + "resolved": "https://registry.npmjs.org/stridejs/-/stridejs-0.8.0-alpha.5.tgz", + "integrity": "sha512-O7smhLqIl09lmUUz4ZSDovAacoNT9t3QMpyv97eMYHF61c+HT9diYFq2EkSnanbS1hmli8eBraUEf0ChrlyCNg==", + "dependencies": { + "@babel/runtime": "^7.18.9", + "@cosmjs/amino": "^0.30.1", + "@cosmjs/proto-signing": "^0.30.1", + "@cosmjs/stargate": "^0.30.1", + "@cosmjs/tendermint-rpc": "^0.30.1", + "@osmonauts/helpers": "^0.6.0", + "@osmonauts/lcd": "^0.6.0", + "protobufjs": "^6.11.2" + } + }, "node_modules/string_decoder": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", diff --git a/package.json b/package.json index 11623b94..09c720a5 100644 --- a/package.json +++ b/package.json @@ -81,6 +81,7 @@ "react-dom": "^18.2.0", "react-hot-toast": "^2.4.1", "resend": "^3.1.0", + "stridejs": "^0.8.0-alpha.5", "tailwind-merge": "^2.2.1", "tailwindcss": "^3.4.1", "tailwindcss-animate": "^1.0.7", From a63bda05de777f7e253fe1581306f20f1308d1f8 Mon Sep 17 00:00:00 2001 From: Griko Nibras Date: Mon, 5 Feb 2024 12:38:25 +0700 Subject: [PATCH 11/30] feat: handle stride account parsing Signed-off-by: Griko Nibras --- src/utils/clients.ts | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/utils/clients.ts b/src/utils/clients.ts index 0398fb06..bda31a4b 100644 --- a/src/utils/clients.ts +++ b/src/utils/clients.ts @@ -1,5 +1,6 @@ import { CosmWasmClient } from "@cosmjs/cosmwasm-stargate"; -import { StargateClient } from "@cosmjs/stargate"; +import { AccountParser, StargateClient } from "@cosmjs/stargate"; +import { strideAccountParser } from "stridejs"; import { ChainId, chainIdToName } from "@/chains/types"; @@ -20,7 +21,14 @@ export async function getStargateClientForChainID(chainID: ChainId) { const preferredEndpoint = getNodeProxyEndpoint(chainID); - const client = await StargateClient.connect(preferredEndpoint, {}); + let accountParser: AccountParser | undefined; + if (chainID.includes("stride")) { + accountParser = strideAccountParser; + } + + const client = await StargateClient.connect(preferredEndpoint, { + accountParser, + }); STARGATE_CLIENTS[chainID] = client; From 20d6586da8ff1cda6dce1c50513c7359b7f90b5a Mon Sep 17 00:00:00 2001 From: Griko Nibras Date: Mon, 5 Feb 2024 12:39:31 +0700 Subject: [PATCH 12/30] chore: typed multicall3Abi Signed-off-by: Griko Nibras --- src/constants/abis.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/constants/abis.ts b/src/constants/abis.ts index b2db278c..37eb336b 100644 --- a/src/constants/abis.ts +++ b/src/constants/abis.ts @@ -1,4 +1,6 @@ -export const multicall3ABI = [ +import { Abi } from "viem"; + +export const multicall3ABI: Abi = [ { inputs: [ { From afde9ab44659e4510a29689c6533332a87593e25 Mon Sep 17 00:00:00 2001 From: Griko Nibras Date: Mon, 5 Feb 2024 12:39:57 +0700 Subject: [PATCH 13/30] refactor: improve endpoint resolver Signed-off-by: Griko Nibras --- src/constants/endpoints.ts | 20 +++++++++++++++ src/constants/rpc.ts | 9 ------- .../api/nodes/[$chainID]/[[...$args]].ts | 6 ++--- src/solve/context.tsx | 25 +++---------------- 4 files changed, 26 insertions(+), 34 deletions(-) create mode 100644 src/constants/endpoints.ts delete mode 100644 src/constants/rpc.ts diff --git a/src/constants/endpoints.ts b/src/constants/endpoints.ts new file mode 100644 index 00000000..c24a0ae3 --- /dev/null +++ b/src/constants/endpoints.ts @@ -0,0 +1,20 @@ +export const ALLOWLIST_LAVENDER_FIVE_CHAIN_IDS = [ + "secret-4", + // +]; + +export const ALLOWLIST_POLKACHU_BACKUP_CHAIN_IDS = [ + "osmosis-1", + // +]; + +export const OVERRIDE_REST_ENDPOINTS: Record = { + "evmos_9001-2": "https://evmos-api.polkachu.com", + "injective-1": "https://lcd.injective.network", +}; + +export const OVERRIDE_RPC_ENDPOINTS: Record = { + "axelar-testnet-lisbon-3": "https://axelar-testnet-rpc.polkachu.com", + "osmo-test-5": "https://osmosis-testnet-rpc.polkachu.com", + "pion-1": "https://neutron-testnet-rpc.polkachu.com", +}; diff --git a/src/constants/rpc.ts b/src/constants/rpc.ts deleted file mode 100644 index c4e7517c..00000000 --- a/src/constants/rpc.ts +++ /dev/null @@ -1,9 +0,0 @@ -export const CHAIN_IDS_L5_NODES = [ - "secret-4", - // -]; - -export const CHAIN_IDS_POLKACHU_BACKUP_NODES = [ - "osmosis-1", - // -]; diff --git a/src/pages/api/nodes/[$chainID]/[[...$args]].ts b/src/pages/api/nodes/[$chainID]/[[...$args]].ts index f41a8b93..8906c3d2 100644 --- a/src/pages/api/nodes/[$chainID]/[[...$args]].ts +++ b/src/pages/api/nodes/[$chainID]/[[...$args]].ts @@ -1,7 +1,7 @@ import { PageConfig } from "next"; import { NextRequest } from "next/server"; -import { CHAIN_IDS_L5_NODES, CHAIN_IDS_POLKACHU_BACKUP_NODES } from "@/constants/rpc"; +import { ALLOWLIST_LAVENDER_FIVE_CHAIN_IDS, ALLOWLIST_POLKACHU_BACKUP_CHAIN_IDS } from "@/constants/endpoints"; import { getCorsDomains } from "@/lib/edge-config"; import { getPolkachuAuthHeader } from "@/utils/api"; import { raise } from "@/utils/assert"; @@ -51,8 +51,8 @@ export default async function handler(req: NextRequest) { const args = searchParams.getAll("$args"); searchParams.delete("$args"); - const shouldUseL5 = CHAIN_IDS_L5_NODES.includes(chainID); - const shouldUsePolkachuBackup = CHAIN_IDS_POLKACHU_BACKUP_NODES.includes(chainID); + const shouldUseL5 = ALLOWLIST_LAVENDER_FIVE_CHAIN_IDS.includes(chainID); + const shouldUsePolkachuBackup = ALLOWLIST_POLKACHU_BACKUP_CHAIN_IDS.includes(chainID); const headers = new Headers(); diff --git a/src/solve/context.tsx b/src/solve/context.tsx index 99dfd284..924e1773 100644 --- a/src/solve/context.tsx +++ b/src/solve/context.tsx @@ -6,6 +6,7 @@ import { useNetwork as useWagmiNetwork } from "wagmi"; import { chainIdToName } from "@/chains/types"; import { API_URL } from "@/constants/api"; +import { OVERRIDE_REST_ENDPOINTS, OVERRIDE_RPC_ENDPOINTS } from "@/constants/endpoints"; import { trackWallet } from "@/context/track-wallet"; import { getNodeProxyEndpoint } from "@/utils/api"; import { isWalletClientUsingLedger } from "@/utils/wallet"; @@ -67,31 +68,11 @@ export function SkipProvider({ children }: { children: ReactNode }) { return evmWalletClient; }, endpointOptions: { - // TODO: move to /api/nodes getRpcEndpointForChain: async (chainID) => { - const testnets: Record = { - "osmo-test-5": "https://osmosis-testnet-rpc.polkachu.com", - "pion-1": "https://neutron-testnet-rpc.polkachu.com", - "axelar-testnet-lisbon-3": "https://axelar-testnet-rpc.polkachu.com", - }; - - if (testnets[chainID]) { - return testnets[chainID]; - } - - return getNodeProxyEndpoint(chainID); + return OVERRIDE_RPC_ENDPOINTS[chainID] || getNodeProxyEndpoint(chainID); }, - // TODO: move to /api/nodes getRestEndpointForChain: async (chainID) => { - if (chainID === "injective-1") { - return "https://lcd.injective.network"; - } - - if (chainID === "evmos_9001-2") { - return "https://evmos-api.polkachu.com"; - } - - return getNodeProxyEndpoint(chainID); + return OVERRIDE_REST_ENDPOINTS[chainID] || getNodeProxyEndpoint(chainID); }, }, }); From 0aee64ec14544fcd11e52f444ad44771795d724d Mon Sep 17 00:00:00 2001 From: Griko Nibras Date: Mon, 5 Feb 2024 12:40:05 +0700 Subject: [PATCH 14/30] chore: update deps and registry Signed-off-by: Griko Nibras --- chain-registry | 2 +- package-lock.json | 669 ++++++++++++++++------------------------------ package.json | 33 ++- 3 files changed, 249 insertions(+), 455 deletions(-) diff --git a/chain-registry b/chain-registry index 3e16e0da..d0c7c989 160000 --- a/chain-registry +++ b/chain-registry @@ -1 +1 @@ -Subproject commit 3e16e0da58c7abac40ee6f680f3dad62638f2bb8 +Subproject commit d0c7c989a518253445a788fdab0fdfd2ec18af3d diff --git a/package-lock.json b/package-lock.json index d838589b..7d7bfca1 100644 --- a/package-lock.json +++ b/package-lock.json @@ -31,20 +31,20 @@ "@heroicons/react": "^2.1.1", "@injectivelabs/sdk-ts": "^1.14.5", "@injectivelabs/utils": "^1.14.5", - "@keplr-wallet/types": "^0.12.65", + "@keplr-wallet/types": "^0.12.66", "@radix-ui/react-accordion": "^1.1.2", "@radix-ui/react-collapsible": "^1.0.3", "@radix-ui/react-dialog": "^1.0.5", "@radix-ui/react-scroll-area": "^1.0.5", "@radix-ui/react-tooltip": "^1.0.7", "@sentry/nextjs": "^7.99.0", - "@skip-router/core": "1.2.11", + "@skip-router/core": "1.2.12", "@tailwindcss/forms": "^0.5.7", - "@tanstack/query-sync-storage-persister": "^5.18.0", - "@tanstack/react-query": "^5.18.0", - "@tanstack/react-query-persist-client": "^5.18.0", - "@types/node": "^20.11.13", - "@types/react": "^18.2.48", + "@tanstack/query-sync-storage-persister": "^5.18.1", + "@tanstack/react-query": "^5.18.1", + "@tanstack/react-query-persist-client": "^5.18.1", + "@types/node": "^20.11.16", + "@types/react": "^18.2.53", "@types/react-dom": "^18.2.18", "@vercel/analytics": "^1.1.2", "@vercel/edge-config": "^0.4.1", @@ -54,7 +54,6 @@ "cosmjs-types": "0.8.x", "date-fns": "^3.3.1", "download": "^8.0.0", - "ethers": "^6.10.0", "match-sorter": "^6.3.3", "next": "^14.1.0", "next-seo": "^6.4.0", @@ -68,24 +67,24 @@ "tailwindcss": "^3.4.1", "tailwindcss-animate": "^1.0.7", "tinykeys": "^2.1.0", - "undici": "^6.5.0", + "undici": "^6.6.1", "viem": "1.x", "wagmi": "1.x", "zod": "^3.22.4", "zustand": "^4.5.0" }, "devDependencies": { - "@playwright/test": "^1.41.1", - "@tanstack/eslint-plugin-query": "^5.18.0", - "@testing-library/jest-dom": "^6.4.0", - "@testing-library/react": "^14.2.0", + "@playwright/test": "^1.41.2", + "@tanstack/eslint-plugin-query": "^5.18.1", + "@testing-library/jest-dom": "^6.4.2", + "@testing-library/react": "^14.2.1", "@testing-library/user-event": "^14.5.2", "@types/download": "^8.0.5", - "@types/jest": "^29.5.11", + "@types/jest": "^29.5.12", "@types/testing-library__jest-dom": "^5.14.9", "@typescript-eslint/eslint-plugin": "^6.20.0", "@typescript-eslint/parser": "^6.20.0", - "dependency-cruiser": "^16.1.0", + "dependency-cruiser": "^16.2.0", "eslint": "^8.56.0", "eslint-config-next": "^14.1.0", "eslint-config-prettier": "^9.1.0", @@ -95,10 +94,10 @@ "jest": "^29.7.0", "jest-environment-jsdom": "^29.7.0", "msw": "1.x", - "npm-run-all2": "^6.1.1", + "npm-run-all2": "^6.1.2", "p-map": "^7.0.1", "patch-package": "^8.0.0", - "prettier": "^3.2.4", + "prettier": "^3.2.5", "prettier-plugin-tailwindcss": "^0.5.11", "resize-observer-polyfill": "^1.5.1", "ts-jest": "^29.1.2", @@ -246,53 +245,6 @@ "resolved": "https://registry.npmjs.org/bech32/-/bech32-2.0.0.tgz", "integrity": "sha512-LcknSilhIGatDAsY1ak2I8VtGaHNhgMSYVxFrGLXv+xLHytaKZKcaUJJUE7qmBr7h33o5YQwP55pMI0xmkpJwg==" }, - "node_modules/@axelar-network/axelarjs-sdk/node_modules/ethers": { - "version": "5.7.2", - "resolved": "https://registry.npmjs.org/ethers/-/ethers-5.7.2.tgz", - "integrity": "sha512-wswUsmWo1aOK8rR7DIKiWSw9DbLWe6x98Jrn8wcTflTVvaXhAMaB5zGAXy0GYQEQp9iO1iSHWVyARQm11zUtyg==", - "funding": [ - { - "type": "individual", - "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" - }, - { - "type": "individual", - "url": "https://www.buymeacoffee.com/ricmoo" - } - ], - "dependencies": { - "@ethersproject/abi": "5.7.0", - "@ethersproject/abstract-provider": "5.7.0", - "@ethersproject/abstract-signer": "5.7.0", - "@ethersproject/address": "5.7.0", - "@ethersproject/base64": "5.7.0", - "@ethersproject/basex": "5.7.0", - "@ethersproject/bignumber": "5.7.0", - "@ethersproject/bytes": "5.7.0", - "@ethersproject/constants": "5.7.0", - "@ethersproject/contracts": "5.7.0", - "@ethersproject/hash": "5.7.0", - "@ethersproject/hdnode": "5.7.0", - "@ethersproject/json-wallets": "5.7.0", - "@ethersproject/keccak256": "5.7.0", - "@ethersproject/logger": "5.7.0", - "@ethersproject/networks": "5.7.1", - "@ethersproject/pbkdf2": "5.7.0", - "@ethersproject/properties": "5.7.0", - "@ethersproject/providers": "5.7.2", - "@ethersproject/random": "5.7.0", - "@ethersproject/rlp": "5.7.0", - "@ethersproject/sha2": "5.7.0", - "@ethersproject/signing-key": "5.7.0", - "@ethersproject/solidity": "5.7.0", - "@ethersproject/strings": "5.7.0", - "@ethersproject/transactions": "5.7.0", - "@ethersproject/units": "5.7.0", - "@ethersproject/wallet": "5.7.0", - "@ethersproject/web": "5.7.1", - "@ethersproject/wordlists": "5.7.0" - } - }, "node_modules/@axelar-network/axelarjs-sdk/node_modules/uuid": { "version": "8.3.2", "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz", @@ -2409,11 +2361,6 @@ "scrypt-js": "3.0.1" } }, - "node_modules/@ethersproject/json-wallets/node_modules/aes-js": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/aes-js/-/aes-js-3.0.0.tgz", - "integrity": "sha512-H7wUZRn8WpTq9jocdxQ2c8x2sKo9ZVmzfRE13GiNJXfp7NcKYEdvl3vspKjXox6RIG2VtaRe4JFvxG4rqp2Zuw==" - }, "node_modules/@ethersproject/keccak256": { "version": "5.7.0", "resolved": "https://registry.npmjs.org/@ethersproject/keccak256/-/keccak256-5.7.0.tgz", @@ -3296,53 +3243,6 @@ "resolved": "https://registry.npmjs.org/bech32/-/bech32-2.0.0.tgz", "integrity": "sha512-LcknSilhIGatDAsY1ak2I8VtGaHNhgMSYVxFrGLXv+xLHytaKZKcaUJJUE7qmBr7h33o5YQwP55pMI0xmkpJwg==" }, - "node_modules/@injectivelabs/sdk-ts/node_modules/ethers": { - "version": "5.7.2", - "resolved": "https://registry.npmjs.org/ethers/-/ethers-5.7.2.tgz", - "integrity": "sha512-wswUsmWo1aOK8rR7DIKiWSw9DbLWe6x98Jrn8wcTflTVvaXhAMaB5zGAXy0GYQEQp9iO1iSHWVyARQm11zUtyg==", - "funding": [ - { - "type": "individual", - "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" - }, - { - "type": "individual", - "url": "https://www.buymeacoffee.com/ricmoo" - } - ], - "dependencies": { - "@ethersproject/abi": "5.7.0", - "@ethersproject/abstract-provider": "5.7.0", - "@ethersproject/abstract-signer": "5.7.0", - "@ethersproject/address": "5.7.0", - "@ethersproject/base64": "5.7.0", - "@ethersproject/basex": "5.7.0", - "@ethersproject/bignumber": "5.7.0", - "@ethersproject/bytes": "5.7.0", - "@ethersproject/constants": "5.7.0", - "@ethersproject/contracts": "5.7.0", - "@ethersproject/hash": "5.7.0", - "@ethersproject/hdnode": "5.7.0", - "@ethersproject/json-wallets": "5.7.0", - "@ethersproject/keccak256": "5.7.0", - "@ethersproject/logger": "5.7.0", - "@ethersproject/networks": "5.7.1", - "@ethersproject/pbkdf2": "5.7.0", - "@ethersproject/properties": "5.7.0", - "@ethersproject/providers": "5.7.2", - "@ethersproject/random": "5.7.0", - "@ethersproject/rlp": "5.7.0", - "@ethersproject/sha2": "5.7.0", - "@ethersproject/signing-key": "5.7.0", - "@ethersproject/solidity": "5.7.0", - "@ethersproject/strings": "5.7.0", - "@ethersproject/transactions": "5.7.0", - "@ethersproject/units": "5.7.0", - "@ethersproject/wallet": "5.7.0", - "@ethersproject/web": "5.7.1", - "@ethersproject/wordlists": "5.7.0" - } - }, "node_modules/@injectivelabs/sdk-ts/node_modules/form-data": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.0.tgz", @@ -4302,9 +4202,9 @@ "integrity": "sha512-T2CiKS2B5n0ZA7CWw0CA6qIAH0XYI1siE50MP+i+V0ZniCGBeL+BMcDw64vFJUcEH+1L5X4sDAzV37fQxGwllA==" }, "node_modules/@keplr-wallet/types": { - "version": "0.12.65", - "resolved": "https://registry.npmjs.org/@keplr-wallet/types/-/types-0.12.65.tgz", - "integrity": "sha512-p+a4pNbeQzw5cuLl2m34KUUu46a0SBgP1yxWFldDxDQIXsxfA7jBr+gtSsbYa/r8sK0dl+JkTI3KmDWQ26JUEg==", + "version": "0.12.66", + "resolved": "https://registry.npmjs.org/@keplr-wallet/types/-/types-0.12.66.tgz", + "integrity": "sha512-OTTMdx6yf6pLUy9hmgZV8jc/qnZJAqppmodeaonjCkJaJHHn82jIo1KZwRxvvNjE0IDm0ke0Dek56fLd+L5FKg==", "dependencies": { "long": "^4.0.0" } @@ -4871,6 +4771,76 @@ "integrity": "sha512-Aq58f5HiWdyDlFffbbSjAlv596h/cOnt2DO1w3DOC7OJ5EHs0hd/nycJfiu9RJbT6Yk6F1knnRRXNSpxoIVZ9Q==", "dev": true }, + "node_modules/@osmonauts/helpers": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/@osmonauts/helpers/-/helpers-0.6.0.tgz", + "integrity": "sha512-l62tWR/0W4R+5wRvMeRK0zlaJ8WZhULKsQAZ7kNzggL0pbndIAV+0BJ/jEBbNletoeGtuV8rpi6Wo+w+RmtZGw==", + "dependencies": { + "@babel/runtime": "^7.18.9", + "@cosmjs/amino": "0.28.13", + "@cosmjs/crypto": "0.28.13", + "@cosmjs/proto-signing": "0.28.13", + "@cosmjs/stargate": "0.28.13", + "cosmjs-types": "0.5.1", + "long": "^5.2.0", + "protobufjs": "^6.11.3" + } + }, + "node_modules/@osmonauts/helpers/node_modules/@cosmjs/crypto": { + "version": "0.28.13", + "resolved": "https://registry.npmjs.org/@cosmjs/crypto/-/crypto-0.28.13.tgz", + "integrity": "sha512-ynKfM0q/tMBQMHJby6ad8lR3gkgBKaelQhIsCZTjClsnuC7oYT9y3ThSZCUWr7Pa9h0J8ahU2YV2oFWFVWJQzQ==", + "dependencies": { + "@cosmjs/encoding": "0.28.13", + "@cosmjs/math": "0.28.13", + "@cosmjs/utils": "0.28.13", + "@noble/hashes": "^1", + "bn.js": "^5.2.0", + "elliptic": "^6.5.3", + "libsodium-wrappers": "^0.7.6" + } + }, + "node_modules/@osmonauts/helpers/node_modules/@cosmjs/utils": { + "version": "0.28.13", + "resolved": "https://registry.npmjs.org/@cosmjs/utils/-/utils-0.28.13.tgz", + "integrity": "sha512-dVeMBiyg+46x7XBZEfJK8yTihphbCFpjVYmLJVqmTsHfJwymQ65cpyW/C+V/LgWARGK8hWQ/aX9HM5Ao8QmMSg==" + }, + "node_modules/@osmonauts/helpers/node_modules/long": { + "version": "5.2.3", + "resolved": "https://registry.npmjs.org/long/-/long-5.2.3.tgz", + "integrity": "sha512-lcHwpNoggQTObv5apGNCTdJrO69eHOZMi4BNC+rTLER8iHAqGrUVeLh/irVIM7zTw2bOXA8T6uNPeujwOLg/2Q==" + }, + "node_modules/@osmonauts/lcd": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/@osmonauts/lcd/-/lcd-0.6.0.tgz", + "integrity": "sha512-vz9VavXrEfxZoXbSAfNfk90MLpn34XtBYPV3L9YilE+s56AhqYxUh83nne9J5somnTRfGnyR3oeV8C+lHkqiuA==", + "dependencies": { + "@babel/runtime": "^7.18.9", + "axios": "0.27.2" + } + }, + "node_modules/@osmonauts/lcd/node_modules/axios": { + "version": "0.27.2", + "resolved": "https://registry.npmjs.org/axios/-/axios-0.27.2.tgz", + "integrity": "sha512-t+yRIyySRTp/wua5xEr+z1q60QmLq8ABsS5O9Me1AsE5dfKqgnCFzwiCZZ/cGNd1lq4/7akDWMxdhVlucjmnOQ==", + "dependencies": { + "follow-redirects": "^1.14.9", + "form-data": "^4.0.0" + } + }, + "node_modules/@osmonauts/lcd/node_modules/form-data": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.0.tgz", + "integrity": "sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==", + "dependencies": { + "asynckit": "^0.4.0", + "combined-stream": "^1.0.8", + "mime-types": "^2.1.12" + }, + "engines": { + "node": ">= 6" + } + }, "node_modules/@parcel/watcher": { "version": "2.4.0", "resolved": "https://registry.npmjs.org/@parcel/watcher/-/watcher-2.4.0.tgz", @@ -5187,12 +5157,12 @@ } }, "node_modules/@playwright/test": { - "version": "1.41.1", - "resolved": "https://registry.npmjs.org/@playwright/test/-/test-1.41.1.tgz", - "integrity": "sha512-9g8EWTjiQ9yFBXc6HjCWe41msLpxEX0KhmfmPl9RPLJdfzL4F0lg2BdJ91O9azFdl11y1pmpwdjBiSxvqc+btw==", + "version": "1.41.2", + "resolved": "https://registry.npmjs.org/@playwright/test/-/test-1.41.2.tgz", + "integrity": "sha512-qQB9h7KbibJzrDpkXkYvsmiDJK14FULCCZgEcoe2AvFAS64oCirWTwzTlAYEbKaRxWs5TFesE1Na6izMv3HfGg==", "dev": true, "dependencies": { - "playwright": "1.41.1" + "playwright": "1.41.2" }, "bin": { "playwright": "cli.js" @@ -7786,9 +7756,9 @@ } }, "node_modules/@skip-router/core": { - "version": "1.2.11", - "resolved": "https://registry.npmjs.org/@skip-router/core/-/core-1.2.11.tgz", - "integrity": "sha512-NT9+XusGfvIW2OTGNG6IW+fiD54lgfbTOCIbHVDdx08pH/7OtjNLV91xAtqi6HLSX4E7xl5lQIdQjqAqhsSv2w==", + "version": "1.2.12", + "resolved": "https://registry.npmjs.org/@skip-router/core/-/core-1.2.12.tgz", + "integrity": "sha512-ZoFH2FV8y2zf7MNS/u4utVhZF7wCPSy73mRnzLbm4eg4F1+Wq+iwA7Y/WSsiYCXwD8ujpu4nk/SmFvj0+6zyVQ==", "dependencies": { "@axelar-network/axelarjs-sdk": "^0.13.6", "@cosmjs/amino": "^0.31.1", @@ -7805,6 +7775,7 @@ "cosmjs-types": "^0.8.0", "faker": "^6.6.6", "keccak256": "^1.0.6", + "stridejs": "^0.8.0-alpha.5", "viem": "^1.12.2" } }, @@ -8051,9 +8022,9 @@ } }, "node_modules/@tanstack/eslint-plugin-query": { - "version": "5.18.0", - "resolved": "https://registry.npmjs.org/@tanstack/eslint-plugin-query/-/eslint-plugin-query-5.18.0.tgz", - "integrity": "sha512-R7x4YV304oduB9IYi660pfNpeO4XcFntkmIG0QV9/IaLeUq+H6M1C+5Th/092ScIrDtU6XgngY2YsS6bwt4vAg==", + "version": "5.18.1", + "resolved": "https://registry.npmjs.org/@tanstack/eslint-plugin-query/-/eslint-plugin-query-5.18.1.tgz", + "integrity": "sha512-pLHqd2RYSbGxhFXdjVxo5Gmi1aJfcXDpZQsjLHEkGEXFb65WzX6LMCz7n2rW3wBElDerRLFZNVLC61Pg/TlYsA==", "dev": true, "dependencies": { "@typescript-eslint/utils": "^5.62.0" @@ -8067,20 +8038,20 @@ } }, "node_modules/@tanstack/query-core": { - "version": "5.18.0", - "resolved": "https://registry.npmjs.org/@tanstack/query-core/-/query-core-5.18.0.tgz", - "integrity": "sha512-8c6nxeAnGHxIDZIyDmHdmgFt4D+LprAQaJmjsnM4szcIjsWOyFlzxdqQUuQ/XuQRvUgqYaqlJTtDADlSS7pTPQ==", + "version": "5.18.1", + "resolved": "https://registry.npmjs.org/@tanstack/query-core/-/query-core-5.18.1.tgz", + "integrity": "sha512-fYhrG7bHgSNbnkIJF2R4VUXb4lF7EBiQjKkDc5wOlB7usdQOIN4LxxHpDxyE3qjqIst1WBGvDtL48T0sHJGKCw==", "funding": { "type": "github", "url": "https://github.com/sponsors/tannerlinsley" } }, "node_modules/@tanstack/query-persist-client-core": { - "version": "5.18.0", - "resolved": "https://registry.npmjs.org/@tanstack/query-persist-client-core/-/query-persist-client-core-5.18.0.tgz", - "integrity": "sha512-CXmUP8GYW1LL9tQC8vmuaK3XKWR3GaP8Bhy2bpgbIX5aOTN0qWL4zVema4hclgNahpTlY13P67Biab8ieB6frA==", + "version": "5.18.1", + "resolved": "https://registry.npmjs.org/@tanstack/query-persist-client-core/-/query-persist-client-core-5.18.1.tgz", + "integrity": "sha512-xGTKSIx0+CgIQzmjlsVPYIvueqdP9qoPlWsEYMDyI9NDTcNooJyWLjSrRoNdZI8NYzq86qCFZg/ace2Ty0GPNQ==", "dependencies": { - "@tanstack/query-core": "5.18.0" + "@tanstack/query-core": "5.18.1" }, "funding": { "type": "github", @@ -8088,12 +8059,12 @@ } }, "node_modules/@tanstack/query-sync-storage-persister": { - "version": "5.18.0", - "resolved": "https://registry.npmjs.org/@tanstack/query-sync-storage-persister/-/query-sync-storage-persister-5.18.0.tgz", - "integrity": "sha512-a+ztQhpnWRmQN8kn/IVscgxmSnBZER2TbrLkocZGzowecxT+Lm0RzbX+Dl2lVz92XXHFmhAjAXhWG61rbqQTng==", + "version": "5.18.1", + "resolved": "https://registry.npmjs.org/@tanstack/query-sync-storage-persister/-/query-sync-storage-persister-5.18.1.tgz", + "integrity": "sha512-z5yL6R57W17qT5W4Ct2JQOUirUrkhPj6WN8eQc6CfkNR/gcIYPRzWcudo0xgQN8PaVkSmQqf8WMxGdzjRFwuWQ==", "dependencies": { - "@tanstack/query-core": "5.18.0", - "@tanstack/query-persist-client-core": "5.18.0" + "@tanstack/query-core": "5.18.1", + "@tanstack/query-persist-client-core": "5.18.1" }, "funding": { "type": "github", @@ -8101,11 +8072,11 @@ } }, "node_modules/@tanstack/react-query": { - "version": "5.18.0", - "resolved": "https://registry.npmjs.org/@tanstack/react-query/-/react-query-5.18.0.tgz", - "integrity": "sha512-7FKxNfxxKEL7n3ADpwp81Fy4FX85hNkYVzQQVQsF0JAPl93c3d1gmNZMIbEtOqgYfom1/ontGh3FiZGYj3xyWA==", + "version": "5.18.1", + "resolved": "https://registry.npmjs.org/@tanstack/react-query/-/react-query-5.18.1.tgz", + "integrity": "sha512-PdI07BbsahZ+04PxSuDQsQvBWe008eWFk/YYWzt8fvzt2sALUM0TpAJa/DFpqa7+SSo7j1EQR6Jx6znXNHyaXw==", "dependencies": { - "@tanstack/query-core": "5.18.0" + "@tanstack/query-core": "5.18.1" }, "funding": { "type": "github", @@ -8116,18 +8087,18 @@ } }, "node_modules/@tanstack/react-query-persist-client": { - "version": "5.18.0", - "resolved": "https://registry.npmjs.org/@tanstack/react-query-persist-client/-/react-query-persist-client-5.18.0.tgz", - "integrity": "sha512-XS3C3tMcnBosptRhn4kN5RBs6j8iRiE7tVr7XN73We4o3VNo86+zEe4iOwO+ziTq0Dawnc4kCjUVS3tZ2DiKhg==", + "version": "5.18.1", + "resolved": "https://registry.npmjs.org/@tanstack/react-query-persist-client/-/react-query-persist-client-5.18.1.tgz", + "integrity": "sha512-B1T9y48QwdkU8oLnDg/dRngp8bSHFPZUDzdov9OMBTUVhySpuPZJCqSArLVNipU6RSoU8ivTPkxOKvyqzMsmYg==", "dependencies": { - "@tanstack/query-persist-client-core": "5.18.0" + "@tanstack/query-persist-client-core": "5.18.1" }, "funding": { "type": "github", "url": "https://github.com/sponsors/tannerlinsley" }, "peerDependencies": { - "@tanstack/react-query": "^5.18.0", + "@tanstack/react-query": "^5.18.1", "react": "^18.0.0" } }, @@ -8175,53 +8146,6 @@ "resolved": "https://registry.npmjs.org/bech32/-/bech32-2.0.0.tgz", "integrity": "sha512-LcknSilhIGatDAsY1ak2I8VtGaHNhgMSYVxFrGLXv+xLHytaKZKcaUJJUE7qmBr7h33o5YQwP55pMI0xmkpJwg==" }, - "node_modules/@terra-money/feather.js/node_modules/ethers": { - "version": "5.7.2", - "resolved": "https://registry.npmjs.org/ethers/-/ethers-5.7.2.tgz", - "integrity": "sha512-wswUsmWo1aOK8rR7DIKiWSw9DbLWe6x98Jrn8wcTflTVvaXhAMaB5zGAXy0GYQEQp9iO1iSHWVyARQm11zUtyg==", - "funding": [ - { - "type": "individual", - "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" - }, - { - "type": "individual", - "url": "https://www.buymeacoffee.com/ricmoo" - } - ], - "dependencies": { - "@ethersproject/abi": "5.7.0", - "@ethersproject/abstract-provider": "5.7.0", - "@ethersproject/abstract-signer": "5.7.0", - "@ethersproject/address": "5.7.0", - "@ethersproject/base64": "5.7.0", - "@ethersproject/basex": "5.7.0", - "@ethersproject/bignumber": "5.7.0", - "@ethersproject/bytes": "5.7.0", - "@ethersproject/constants": "5.7.0", - "@ethersproject/contracts": "5.7.0", - "@ethersproject/hash": "5.7.0", - "@ethersproject/hdnode": "5.7.0", - "@ethersproject/json-wallets": "5.7.0", - "@ethersproject/keccak256": "5.7.0", - "@ethersproject/logger": "5.7.0", - "@ethersproject/networks": "5.7.1", - "@ethersproject/pbkdf2": "5.7.0", - "@ethersproject/properties": "5.7.0", - "@ethersproject/providers": "5.7.2", - "@ethersproject/random": "5.7.0", - "@ethersproject/rlp": "5.7.0", - "@ethersproject/sha2": "5.7.0", - "@ethersproject/signing-key": "5.7.0", - "@ethersproject/solidity": "5.7.0", - "@ethersproject/strings": "5.7.0", - "@ethersproject/transactions": "5.7.0", - "@ethersproject/units": "5.7.0", - "@ethersproject/wallet": "5.7.0", - "@ethersproject/web": "5.7.1", - "@ethersproject/wordlists": "5.7.0" - } - }, "node_modules/@terra-money/feather.js/node_modules/form-data": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.0.tgz", @@ -8404,9 +8328,9 @@ } }, "node_modules/@testing-library/jest-dom": { - "version": "6.4.0", - "resolved": "https://registry.npmjs.org/@testing-library/jest-dom/-/jest-dom-6.4.0.tgz", - "integrity": "sha512-GgGT3OR8qhIjk2SBMy51AYDWoMnAyR/cwjZO4SttuBmIQ9wWy9QmVOeaSbgT5Bm0J6qLBaf4+dsJWfisvafoaA==", + "version": "6.4.2", + "resolved": "https://registry.npmjs.org/@testing-library/jest-dom/-/jest-dom-6.4.2.tgz", + "integrity": "sha512-CzqH0AFymEMG48CpzXFriYYkOjk6ZGPCLMhW9e9jg3KMCn5OfJecF8GtGW7yGfR/IgCe3SX8BSwjdzI6BBbZLw==", "dev": true, "dependencies": { "@adobe/css-tools": "^4.3.2", @@ -8455,9 +8379,9 @@ "dev": true }, "node_modules/@testing-library/react": { - "version": "14.2.0", - "resolved": "https://registry.npmjs.org/@testing-library/react/-/react-14.2.0.tgz", - "integrity": "sha512-7uBnPHyOG6nDGCzv8SLeJbSa33ZoYw7swYpSLIgJvBALdq7l9zPNk33om4USrxy1lKTxXaVfufzLmq83WNfWIw==", + "version": "14.2.1", + "resolved": "https://registry.npmjs.org/@testing-library/react/-/react-14.2.1.tgz", + "integrity": "sha512-sGdjws32ai5TLerhvzThYFbpnF9XtL65Cjf+gB0Dhr29BGqK+mAeN7SURSdu+eqgET4ANcWoC7FQpkaiGvBr+A==", "dev": true, "dependencies": { "@babel/runtime": "^7.12.5", @@ -8641,9 +8565,9 @@ } }, "node_modules/@types/jest": { - "version": "29.5.11", - "resolved": "https://registry.npmjs.org/@types/jest/-/jest-29.5.11.tgz", - "integrity": "sha512-S2mHmYIVe13vrm6q4kN6fLYYAka15ALQki/vgDC3mIukEOx8WJlv0kQPM+d4w8Gp6u0uSdKND04IlTXBv0rwnQ==", + "version": "29.5.12", + "resolved": "https://registry.npmjs.org/@types/jest/-/jest-29.5.12.tgz", + "integrity": "sha512-eDC8bTvT/QhYdxJAulQikueigY5AsdBRH2yDKW3yveW7svY3+DzN84/2NUgkw10RTiJbWqZrTtoGVdYlvFJdLw==", "dev": true, "dependencies": { "expect": "^29.0.0", @@ -8735,19 +8659,13 @@ "integrity": "sha512-nG96G3Wp6acyAgJqGasjODb+acrI7KltPiRxzHPXnP3NgI28bpQDRv53olbqGXbfcgF5aiiHmO3xpwEpS5Ld9g==" }, "node_modules/@types/node": { - "version": "20.11.13", - "resolved": "https://registry.npmjs.org/@types/node/-/node-20.11.13.tgz", - "integrity": "sha512-5G4zQwdiQBSWYTDAH1ctw2eidqdhMJaNsiIDKHFr55ihz5Trl2qqR8fdrT732yPBho5gkNxXm67OxWFBqX9aPg==", + "version": "20.11.16", + "resolved": "https://registry.npmjs.org/@types/node/-/node-20.11.16.tgz", + "integrity": "sha512-gKb0enTmRCzXSSUJDq6/sPcqrfCv2mkkG6Jt/clpn5eiCbKTY+SgZUxo+p8ZKMof5dCp9vHQUAB7wOUTod22wQ==", "dependencies": { "undici-types": "~5.26.4" } }, - "node_modules/@types/normalize-package-data": { - "version": "2.4.4", - "resolved": "https://registry.npmjs.org/@types/normalize-package-data/-/normalize-package-data-2.4.4.tgz", - "integrity": "sha512-37i+OaWTh9qeK4LSHPsyRC7NahnGotNuZvjLSgcPzblpHB3rrCJxAOgI5gCdKm7coonsaX1Of0ILiTcnZjbfxA==", - "dev": true - }, "node_modules/@types/pbkdf2": { "version": "3.1.2", "resolved": "https://registry.npmjs.org/@types/pbkdf2/-/pbkdf2-3.1.2.tgz", @@ -8762,9 +8680,9 @@ "integrity": "sha512-ga8y9v9uyeiLdpKddhxYQkxNDrfvuPrlFb0N1qnZZByvcElJaXthF1UhvCh9TLWJBEHeNtdnbysW7Y6Uq8CVng==" }, "node_modules/@types/react": { - "version": "18.2.48", - "resolved": "https://registry.npmjs.org/@types/react/-/react-18.2.48.tgz", - "integrity": "sha512-qboRCl6Ie70DQQG9hhNREz81jqC1cs9EVNcjQ1AU+jH6NFfSAhVVbrrY/+nSF+Bsk4AOwm9Qa61InvMCyV+H3w==", + "version": "18.2.53", + "resolved": "https://registry.npmjs.org/@types/react/-/react-18.2.53.tgz", + "integrity": "sha512-52IHsMDT8qATp9B9zoOyobW8W3/0QhaJQTw1HwRj0UY2yBpCAQ7+S/CqHYQ8niAm3p4ji+rWUQ9UCib0GxQ60w==", "dependencies": { "@types/prop-types": "*", "@types/scheduler": "*", @@ -10096,9 +10014,9 @@ } }, "node_modules/aes-js": { - "version": "4.0.0-beta.5", - "resolved": "https://registry.npmjs.org/aes-js/-/aes-js-4.0.0-beta.5.tgz", - "integrity": "sha512-G965FqalsNyrPqgEGON7nIx1e/OVENSgiEIzyC63haUMuvNnwIgIjMs52hlTCKhkBny7A2ORNlfY9Zu+jmGk1Q==" + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/aes-js/-/aes-js-3.0.0.tgz", + "integrity": "sha512-H7wUZRn8WpTq9jocdxQ2c8x2sKo9ZVmzfRE13GiNJXfp7NcKYEdvl3vspKjXox6RIG2VtaRe4JFvxG4rqp2Zuw==" }, "node_modules/agent-base": { "version": "6.0.2", @@ -12393,9 +12311,9 @@ } }, "node_modules/dependency-cruiser": { - "version": "16.1.0", - "resolved": "https://registry.npmjs.org/dependency-cruiser/-/dependency-cruiser-16.1.0.tgz", - "integrity": "sha512-gmuLNIi4ygkf9KLKZzCWc+og7uwFTkTPauT2ma764NtHQt3r4GoWqCR/lZK/kCfOpNOPU9mB0EM/7RmRL6BFXA==", + "version": "16.2.0", + "resolved": "https://registry.npmjs.org/dependency-cruiser/-/dependency-cruiser-16.2.0.tgz", + "integrity": "sha512-ud6xsI7h3T5zFhGjEYg7rtBizA9kKe+uR6ynuOLftnj55nCFp1g7kgbTX/zypCUkmZnkiEvFl9C/BC2kNVvSPQ==", "dev": true, "dependencies": { "acorn": "8.11.3", @@ -12405,10 +12323,10 @@ "acorn-walk": "8.3.2", "ajv": "8.12.0", "chalk": "5.3.0", - "commander": "11.1.0", + "commander": "12.0.0", "enhanced-resolve": "5.15.0", "figures": "6.0.1", - "ignore": "5.3.0", + "ignore": "5.3.1", "indent-string": "5.0.0", "interpret": "^3.1.1", "is-installed-globally": "1.0.0", @@ -12490,12 +12408,12 @@ } }, "node_modules/dependency-cruiser/node_modules/commander": { - "version": "11.1.0", - "resolved": "https://registry.npmjs.org/commander/-/commander-11.1.0.tgz", - "integrity": "sha512-yPVavfyCcRhmorC7rWlkHn15b4wDVgVmBA7kV4QVBsF7kv/9TKJAbAXVTxvTnwP8HHKjRCJDClKbciiYS7p0DQ==", + "version": "12.0.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-12.0.0.tgz", + "integrity": "sha512-MwVNWlYjDTtOjX5PiD7o5pK0UrFU/OYgcJfjjK4RaHZETNtjJqrZa9Y9ds88+A+f+d5lv+561eZ+yCKoS3gbAA==", "dev": true, "engines": { - "node": ">=16" + "node": ">=18" } }, "node_modules/dependency-cruiser/node_modules/emoji-regex": { @@ -14038,13 +13956,13 @@ } }, "node_modules/ethers": { - "version": "6.10.0", - "resolved": "https://registry.npmjs.org/ethers/-/ethers-6.10.0.tgz", - "integrity": "sha512-nMNwYHzs6V1FR3Y4cdfxSQmNgZsRj1RiTU25JwvnJLmyzw9z3SKxNc2XKDuiXXo/v9ds5Mp9m6HBabgYQQ26tA==", + "version": "5.7.2", + "resolved": "https://registry.npmjs.org/ethers/-/ethers-5.7.2.tgz", + "integrity": "sha512-wswUsmWo1aOK8rR7DIKiWSw9DbLWe6x98Jrn8wcTflTVvaXhAMaB5zGAXy0GYQEQp9iO1iSHWVyARQm11zUtyg==", "funding": [ { "type": "individual", - "url": "https://github.com/sponsors/ethers-io/" + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" }, { "type": "individual", @@ -14052,46 +13970,36 @@ } ], "dependencies": { - "@adraffy/ens-normalize": "1.10.0", - "@noble/curves": "1.2.0", - "@noble/hashes": "1.3.2", - "@types/node": "18.15.13", - "aes-js": "4.0.0-beta.5", - "tslib": "2.4.0", - "ws": "8.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/ethers/node_modules/@types/node": { - "version": "18.15.13", - "resolved": "https://registry.npmjs.org/@types/node/-/node-18.15.13.tgz", - "integrity": "sha512-N+0kuo9KgrUQ1Sn/ifDXsvg0TTleP7rIy4zOBGECxAljqvqfqpTfzx0Q1NUedOixRMBfe2Whhb056a42cWs26Q==" - }, - "node_modules/ethers/node_modules/tslib": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.4.0.tgz", - "integrity": "sha512-d6xOpEDfsi2CZVlPQzGeux8XMwLT9hssAsaPYExaQMuYskwb+x1x7J371tWlbBdWHroy99KnVB6qIkUbs5X3UQ==" - }, - "node_modules/ethers/node_modules/ws": { - "version": "8.5.0", - "resolved": "https://registry.npmjs.org/ws/-/ws-8.5.0.tgz", - "integrity": "sha512-BWX0SWVgLPzYwF8lTzEy1egjhS4S4OEAHfsO8o65WOVsrnSRGaSiUaa9e0ggGlkMTtBlmOpEXiie9RUcBO86qg==", - "engines": { - "node": ">=10.0.0" - }, - "peerDependencies": { - "bufferutil": "^4.0.1", - "utf-8-validate": "^5.0.2" - }, - "peerDependenciesMeta": { - "bufferutil": { - "optional": true - }, - "utf-8-validate": { - "optional": true - } + "@ethersproject/abi": "5.7.0", + "@ethersproject/abstract-provider": "5.7.0", + "@ethersproject/abstract-signer": "5.7.0", + "@ethersproject/address": "5.7.0", + "@ethersproject/base64": "5.7.0", + "@ethersproject/basex": "5.7.0", + "@ethersproject/bignumber": "5.7.0", + "@ethersproject/bytes": "5.7.0", + "@ethersproject/constants": "5.7.0", + "@ethersproject/contracts": "5.7.0", + "@ethersproject/hash": "5.7.0", + "@ethersproject/hdnode": "5.7.0", + "@ethersproject/json-wallets": "5.7.0", + "@ethersproject/keccak256": "5.7.0", + "@ethersproject/logger": "5.7.0", + "@ethersproject/networks": "5.7.1", + "@ethersproject/pbkdf2": "5.7.0", + "@ethersproject/properties": "5.7.0", + "@ethersproject/providers": "5.7.2", + "@ethersproject/random": "5.7.0", + "@ethersproject/rlp": "5.7.0", + "@ethersproject/sha2": "5.7.0", + "@ethersproject/signing-key": "5.7.0", + "@ethersproject/solidity": "5.7.0", + "@ethersproject/strings": "5.7.0", + "@ethersproject/transactions": "5.7.0", + "@ethersproject/units": "5.7.0", + "@ethersproject/wallet": "5.7.0", + "@ethersproject/web": "5.7.1", + "@ethersproject/wordlists": "5.7.0" } }, "node_modules/ethjs-util": { @@ -15140,27 +15048,6 @@ "react-is": "^16.7.0" } }, - "node_modules/hosted-git-info": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-7.0.1.tgz", - "integrity": "sha512-+K84LB1DYwMHoHSgaOY/Jfhw3ucPmSET5v98Ke/HdNSw4a0UktWzyW1mjhjpuxxTqOOsfWT/7iVshHmVZ4IpOA==", - "dev": true, - "dependencies": { - "lru-cache": "^10.0.1" - }, - "engines": { - "node": "^16.14.0 || >=18.0.0" - } - }, - "node_modules/hosted-git-info/node_modules/lru-cache": { - "version": "10.2.0", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.2.0.tgz", - "integrity": "sha512-2bIM8x+VAf6JT4bKAljS1qUWgMsqZRPGJS6FSahIMPVvctcNhyVp7AJu7quxOW9jwkryBReKZY5tY5JYv2n/7Q==", - "dev": true, - "engines": { - "node": "14 || >=16.14" - } - }, "node_modules/html-encoding-sniffer": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/html-encoding-sniffer/-/html-encoding-sniffer-3.0.0.tgz", @@ -15311,9 +15198,9 @@ ] }, "node_modules/ignore": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.0.tgz", - "integrity": "sha512-g7dmpshy+gD7mh88OC9NwSGTKoc3kyLAZQRU1mt53Aw/vnvfXnbC+F/7F7QoYVKbV+KNvJx8wArewKy1vXMtlg==", + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.1.tgz", + "integrity": "sha512-5Fytz/IraMjqpwfd34ke28PTVMjZjJG2MPn5t7OE4eUCUNf8BAa7b5WUS9/Qvr6mwOQS7Mk6vdsMno5he+T8Xw==", "dev": true, "engines": { "node": ">= 4" @@ -18100,11 +17987,24 @@ "node": ">= 0.8.0" } }, + "node_modules/libsodium": { + "version": "0.7.13", + "resolved": "https://registry.npmjs.org/libsodium/-/libsodium-0.7.13.tgz", + "integrity": "sha512-mK8ju0fnrKXXfleL53vtp9xiPq5hKM0zbDQtcxQIsSmxNgSxqCj6R7Hl9PkrNe2j29T4yoDaF7DJLK9/i5iWUw==" + }, "node_modules/libsodium-sumo": { "version": "0.7.13", "resolved": "https://registry.npmjs.org/libsodium-sumo/-/libsodium-sumo-0.7.13.tgz", "integrity": "sha512-zTGdLu4b9zSNLfovImpBCbdAA4xkpkZbMnSQjP8HShyOutnGjRHmSOKlsylh1okao6QhLiz7nG98EGn+04cZjQ==" }, + "node_modules/libsodium-wrappers": { + "version": "0.7.13", + "resolved": "https://registry.npmjs.org/libsodium-wrappers/-/libsodium-wrappers-0.7.13.tgz", + "integrity": "sha512-kasvDsEi/r1fMzKouIDv7B8I6vNmknXwGiYodErGuESoFTohGSKZplFtVxZqHaoQ217AynyIFgnOVRitpHs0Qw==", + "dependencies": { + "libsodium": "^0.7.13" + } + }, "node_modules/libsodium-wrappers-sumo": { "version": "0.7.13", "resolved": "https://registry.npmjs.org/libsodium-wrappers-sumo/-/libsodium-wrappers-sumo-0.7.13.tgz", @@ -19097,21 +18997,6 @@ "node": "^14.17.0 || ^16.13.0 || >=18.0.0" } }, - "node_modules/normalize-package-data": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-6.0.0.tgz", - "integrity": "sha512-UL7ELRVxYBHBgYEtZCXjxuD5vPxnmvMGq0jp/dGPKKrN7tfsBh2IY7TlJ15WWwdjRWD3RJbnsygUurTK3xkPkg==", - "dev": true, - "dependencies": { - "hosted-git-info": "^7.0.0", - "is-core-module": "^2.8.1", - "semver": "^7.3.5", - "validate-npm-package-license": "^3.0.4" - }, - "engines": { - "node": "^16.14.0 || >=18.0.0" - } - }, "node_modules/normalize-path": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", @@ -19162,10 +19047,19 @@ "node": ">=0.10.0" } }, + "node_modules/npm-normalize-package-bin": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/npm-normalize-package-bin/-/npm-normalize-package-bin-3.0.1.tgz", + "integrity": "sha512-dMxCf+zZ+3zeQZXKxmyuCKlIDPGuv8EF940xbkC4kQVDTtqoh6rJFO+JTKSA6/Rwi0getWmtuy4Itup0AMcaDQ==", + "dev": true, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, "node_modules/npm-run-all2": { - "version": "6.1.1", - "resolved": "https://registry.npmjs.org/npm-run-all2/-/npm-run-all2-6.1.1.tgz", - "integrity": "sha512-lWLbkPZ5BSdXtN8lR+0rc8caKoPdymycpZksyDEC9MOBvfdwTXZ0uVhb7bMcGeXv2/BKtfQuo6Zn3zfc8rxNXA==", + "version": "6.1.2", + "resolved": "https://registry.npmjs.org/npm-run-all2/-/npm-run-all2-6.1.2.tgz", + "integrity": "sha512-WwwnS8Ft+RpXve6T2EIEVpFLSqN+ORHRvgNk3H9N62SZXjmzKoRhMFg3I17TK3oMaAEr+XFbRirWS2Fn3BCPSg==", "dev": true, "dependencies": { "ansi-styles": "^6.2.1", @@ -19173,7 +19067,7 @@ "memorystream": "^0.3.1", "minimatch": "^9.0.0", "pidtree": "^0.6.0", - "read-pkg": "^8.0.0", + "read-package-json-fast": "^3.0.2", "shell-quote": "^1.7.3" }, "bin": { @@ -20076,12 +19970,12 @@ } }, "node_modules/playwright": { - "version": "1.41.1", - "resolved": "https://registry.npmjs.org/playwright/-/playwright-1.41.1.tgz", - "integrity": "sha512-gdZAWG97oUnbBdRL3GuBvX3nDDmUOuqzV/D24dytqlKt+eI5KbwusluZRGljx1YoJKZ2NRPaeWiFTeGZO7SosQ==", + "version": "1.41.2", + "resolved": "https://registry.npmjs.org/playwright/-/playwright-1.41.2.tgz", + "integrity": "sha512-v0bOa6H2GJChDL8pAeLa/LZC4feoAMbSQm1/jF/ySsWWoaNItvrMP7GEkvEEFyCTUYKMxjQKaTSg5up7nR6/8A==", "dev": true, "dependencies": { - "playwright-core": "1.41.1" + "playwright-core": "1.41.2" }, "bin": { "playwright": "cli.js" @@ -20094,9 +19988,9 @@ } }, "node_modules/playwright-core": { - "version": "1.41.1", - "resolved": "https://registry.npmjs.org/playwright-core/-/playwright-core-1.41.1.tgz", - "integrity": "sha512-/KPO5DzXSMlxSX77wy+HihKGOunh3hqndhqeo/nMxfigiKzogn8kfL0ZBDu0L1RKgan5XHCPmn6zXd2NUJgjhg==", + "version": "1.41.2", + "resolved": "https://registry.npmjs.org/playwright-core/-/playwright-core-1.41.2.tgz", + "integrity": "sha512-VaTvwCA4Y8kxEe+kfm2+uUUw5Lubf38RxF7FpBxLPmGe5sdNkSg5e3ChEigaGrX7qdqT3pt2m/98LiyvU2x6CA==", "dev": true, "bin": { "playwright-core": "cli.js" @@ -20292,9 +20186,9 @@ } }, "node_modules/prettier": { - "version": "3.2.4", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.2.4.tgz", - "integrity": "sha512-FWu1oLHKCrtpO1ypU6J0SbK2d9Ckwysq6bHj/uaCP26DxrPpppCLQRGVuqAxSTvhF00AcvDRyYrLNW7ocBhFFQ==", + "version": "3.2.5", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.2.5.tgz", + "integrity": "sha512-3/GWa9aOC0YeD7LUfvOG2NiDyhOWRvt1k+rcKhOuYnMY24iiCphgneUfJDyFXd6rZCAnuLBv6UeAULtrhT/F4A==", "dev": true, "bin": { "prettier": "bin/prettier.cjs" @@ -20973,25 +20867,20 @@ "node": ">=0.10.0" } }, - "node_modules/read-pkg": { - "version": "8.1.0", - "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-8.1.0.tgz", - "integrity": "sha512-PORM8AgzXeskHO/WEv312k9U03B8K9JSiWF/8N9sUuFjBa+9SF2u6K7VClzXwDXab51jCd8Nd36CNM+zR97ScQ==", + "node_modules/read-package-json-fast": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/read-package-json-fast/-/read-package-json-fast-3.0.2.tgz", + "integrity": "sha512-0J+Msgym3vrLOUB3hzQCuZHII0xkNGCtz/HJH9xZshwv9DbDwkw1KaE3gx/e2J5rpEY5rtOy6cyhKOPrkP7FZw==", "dev": true, "dependencies": { - "@types/normalize-package-data": "^2.4.1", - "normalize-package-data": "^6.0.0", - "parse-json": "^7.0.0", - "type-fest": "^4.2.0" + "json-parse-even-better-errors": "^3.0.0", + "npm-normalize-package-bin": "^3.0.0" }, "engines": { - "node": ">=16" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" } }, - "node_modules/read-pkg/node_modules/json-parse-even-better-errors": { + "node_modules/read-package-json-fast/node_modules/json-parse-even-better-errors": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-3.0.1.tgz", "integrity": "sha512-aatBvbL26wVUCLmbWdCpeu9iF5wOyWpagiKkInA+kfws3sWdBrTnsvN2CKcyCYyUrc7rebNBlK6+kteg7ksecg==", @@ -21000,58 +20889,6 @@ "node": "^14.17.0 || ^16.13.0 || >=18.0.0" } }, - "node_modules/read-pkg/node_modules/lines-and-columns": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-2.0.4.tgz", - "integrity": "sha512-wM1+Z03eypVAVUCE7QdSqpVIvelbOakn1M0bPDoA4SGWPx3sNDVUiMo3L6To6WWGClB7VyXnhQ4Sn7gxiJbE6A==", - "dev": true, - "engines": { - "node": "^12.20.0 || ^14.13.1 || >=16.0.0" - } - }, - "node_modules/read-pkg/node_modules/parse-json": { - "version": "7.1.1", - "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-7.1.1.tgz", - "integrity": "sha512-SgOTCX/EZXtZxBE5eJ97P4yGM5n37BwRU+YMsH4vNzFqJV/oWFXXCmwFlgWUM4PrakybVOueJJ6pwHqSVhTFDw==", - "dev": true, - "dependencies": { - "@babel/code-frame": "^7.21.4", - "error-ex": "^1.3.2", - "json-parse-even-better-errors": "^3.0.0", - "lines-and-columns": "^2.0.3", - "type-fest": "^3.8.0" - }, - "engines": { - "node": ">=16" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/read-pkg/node_modules/parse-json/node_modules/type-fest": { - "version": "3.13.1", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-3.13.1.tgz", - "integrity": "sha512-tLq3bSNx+xSpwvAJnzrK0Ep5CLNWjvFTOp71URMaAEWBfRb9nnJiBoUe0tF8bI4ZFO3omgBR6NvnbzVUT3Ly4g==", - "dev": true, - "engines": { - "node": ">=14.16" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/read-pkg/node_modules/type-fest": { - "version": "4.10.2", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-4.10.2.tgz", - "integrity": "sha512-anpAG63wSpdEbLwOqH8L84urkL6PiVIov3EMmgIhhThevh9aiMQov+6Btx0wldNcvm4wV+e2/Rt1QdDwKHFbHw==", - "dev": true, - "engines": { - "node": ">=16" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/readable-stream": { "version": "2.3.8", "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.8.tgz", @@ -22039,38 +21876,6 @@ "source-map": "^0.6.0" } }, - "node_modules/spdx-correct": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.2.0.tgz", - "integrity": "sha512-kN9dJbvnySHULIluDHy32WHRUu3Og7B9sbY7tsFLctQkIqnMh3hErYgdMjTYuqmcXX+lK5T1lnUt3G7zNswmZA==", - "dev": true, - "dependencies": { - "spdx-expression-parse": "^3.0.0", - "spdx-license-ids": "^3.0.0" - } - }, - "node_modules/spdx-exceptions": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.4.0.tgz", - "integrity": "sha512-hcjppoJ68fhxA/cjbN4T8N6uCUejN8yFw69ttpqtBeCbF3u13n7mb31NB9jKwGTTWWnt9IbRA/mf1FprYS8wfw==", - "dev": true - }, - "node_modules/spdx-expression-parse": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-3.0.1.tgz", - "integrity": "sha512-cbqHunsQWnJNE6KhVSMsMeH5H/L9EpymbzqTQ3uLwNCLZ1Q481oWaofqH7nO6V07xlXwY6PhQdQ2IedWx/ZK4Q==", - "dev": true, - "dependencies": { - "spdx-exceptions": "^2.1.0", - "spdx-license-ids": "^3.0.0" - } - }, - "node_modules/spdx-license-ids": { - "version": "3.0.16", - "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.16.tgz", - "integrity": "sha512-eWN+LnM3GR6gPu35WxNgbGl8rmY1AEmoMDvL/QD6zYmPWgywxWqJWNdLGT+ke8dKNWrcYgYjPpG5gbTfghP8rw==", - "dev": true - }, "node_modules/split-on-first": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/split-on-first/-/split-on-first-1.1.0.tgz", @@ -23368,9 +23173,9 @@ "integrity": "sha512-Ql87qFHB3s/De2ClA9e0gsnS6zXG27SkTiSJwjCc9MebbfapQfuPzumMIUMi38ezPZVNFcHI9sUIepeQfw8J8Q==" }, "node_modules/undici": { - "version": "6.5.0", - "resolved": "https://registry.npmjs.org/undici/-/undici-6.5.0.tgz", - "integrity": "sha512-/MUmPb2ptTvp1j7lPvdMSofMdqPxcOhAaKZi4k55sqm6XMeKI3n1dZJ5cnD4gLjpt2l7CIlthR1IXM59xKhpxw==", + "version": "6.6.1", + "resolved": "https://registry.npmjs.org/undici/-/undici-6.6.1.tgz", + "integrity": "sha512-J0GaEp0ztu/grIE2Uq57AbK6TRb+bWbOlxu0POCzhFKA6LKbwSAev+hDQaQcgUUA9CPs8Ky+cauzTHnQrtAQEA==", "dependencies": { "@fastify/busboy": "^2.0.0" }, @@ -23704,16 +23509,6 @@ "node": ">=10.12.0" } }, - "node_modules/validate-npm-package-license": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz", - "integrity": "sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew==", - "dev": true, - "dependencies": { - "spdx-correct": "^3.0.0", - "spdx-expression-parse": "^3.0.0" - } - }, "node_modules/valtio": { "version": "1.11.2", "resolved": "https://registry.npmjs.org/valtio/-/valtio-1.11.2.tgz", diff --git a/package.json b/package.json index 09c720a5..734f4f01 100644 --- a/package.json +++ b/package.json @@ -49,20 +49,20 @@ "@heroicons/react": "^2.1.1", "@injectivelabs/sdk-ts": "^1.14.5", "@injectivelabs/utils": "^1.14.5", - "@keplr-wallet/types": "^0.12.65", + "@keplr-wallet/types": "^0.12.66", "@radix-ui/react-accordion": "^1.1.2", "@radix-ui/react-collapsible": "^1.0.3", "@radix-ui/react-dialog": "^1.0.5", "@radix-ui/react-scroll-area": "^1.0.5", "@radix-ui/react-tooltip": "^1.0.7", "@sentry/nextjs": "^7.99.0", - "@skip-router/core": "1.2.11", + "@skip-router/core": "1.2.12", "@tailwindcss/forms": "^0.5.7", - "@tanstack/query-sync-storage-persister": "^5.18.0", - "@tanstack/react-query": "^5.18.0", - "@tanstack/react-query-persist-client": "^5.18.0", - "@types/node": "^20.11.13", - "@types/react": "^18.2.48", + "@tanstack/query-sync-storage-persister": "^5.18.1", + "@tanstack/react-query": "^5.18.1", + "@tanstack/react-query-persist-client": "^5.18.1", + "@types/node": "^20.11.16", + "@types/react": "^18.2.53", "@types/react-dom": "^18.2.18", "@vercel/analytics": "^1.1.2", "@vercel/edge-config": "^0.4.1", @@ -72,7 +72,6 @@ "cosmjs-types": "0.8.x", "date-fns": "^3.3.1", "download": "^8.0.0", - "ethers": "^6.10.0", "match-sorter": "^6.3.3", "next": "^14.1.0", "next-seo": "^6.4.0", @@ -86,24 +85,24 @@ "tailwindcss": "^3.4.1", "tailwindcss-animate": "^1.0.7", "tinykeys": "^2.1.0", - "undici": "^6.5.0", + "undici": "^6.6.1", "viem": "1.x", "wagmi": "1.x", "zod": "^3.22.4", "zustand": "^4.5.0" }, "devDependencies": { - "@playwright/test": "^1.41.1", - "@tanstack/eslint-plugin-query": "^5.18.0", - "@testing-library/jest-dom": "^6.4.0", - "@testing-library/react": "^14.2.0", + "@playwright/test": "^1.41.2", + "@tanstack/eslint-plugin-query": "^5.18.1", + "@testing-library/jest-dom": "^6.4.2", + "@testing-library/react": "^14.2.1", "@testing-library/user-event": "^14.5.2", "@types/download": "^8.0.5", - "@types/jest": "^29.5.11", + "@types/jest": "^29.5.12", "@types/testing-library__jest-dom": "^5.14.9", "@typescript-eslint/eslint-plugin": "^6.20.0", "@typescript-eslint/parser": "^6.20.0", - "dependency-cruiser": "^16.1.0", + "dependency-cruiser": "^16.2.0", "eslint": "^8.56.0", "eslint-config-next": "^14.1.0", "eslint-config-prettier": "^9.1.0", @@ -113,10 +112,10 @@ "jest": "^29.7.0", "jest-environment-jsdom": "^29.7.0", "msw": "1.x", - "npm-run-all2": "^6.1.1", + "npm-run-all2": "^6.1.2", "p-map": "^7.0.1", "patch-package": "^8.0.0", - "prettier": "^3.2.4", + "prettier": "^3.2.5", "prettier-plugin-tailwindcss": "^0.5.11", "resize-observer-polyfill": "^1.5.1", "ts-jest": "^29.1.2", From 9babf88f6d87cedb2da4dbbe2d763a2d606aca4e Mon Sep 17 00:00:00 2001 From: thal0x Date: Tue, 6 Feb 2024 09:24:10 -0600 Subject: [PATCH 15/30] update sdk version --- chain-registry | 2 +- package-lock.json | 8 ++++---- package.json | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/chain-registry b/chain-registry index d0c7c989..71caad66 160000 --- a/chain-registry +++ b/chain-registry @@ -1 +1 @@ -Subproject commit d0c7c989a518253445a788fdab0fdfd2ec18af3d +Subproject commit 71caad66af9ed9b0b6a9aeb7c6ad4071af0c612e diff --git a/package-lock.json b/package-lock.json index 7d7bfca1..1ffd04b2 100644 --- a/package-lock.json +++ b/package-lock.json @@ -38,7 +38,7 @@ "@radix-ui/react-scroll-area": "^1.0.5", "@radix-ui/react-tooltip": "^1.0.7", "@sentry/nextjs": "^7.99.0", - "@skip-router/core": "1.2.12", + "@skip-router/core": "^1.2.13", "@tailwindcss/forms": "^0.5.7", "@tanstack/query-sync-storage-persister": "^5.18.1", "@tanstack/react-query": "^5.18.1", @@ -7756,9 +7756,9 @@ } }, "node_modules/@skip-router/core": { - "version": "1.2.12", - "resolved": "https://registry.npmjs.org/@skip-router/core/-/core-1.2.12.tgz", - "integrity": "sha512-ZoFH2FV8y2zf7MNS/u4utVhZF7wCPSy73mRnzLbm4eg4F1+Wq+iwA7Y/WSsiYCXwD8ujpu4nk/SmFvj0+6zyVQ==", + "version": "1.2.13", + "resolved": "https://registry.npmjs.org/@skip-router/core/-/core-1.2.13.tgz", + "integrity": "sha512-XA4RVVHsCVD+RRwEjHrUxd3ygpE+YURS5q7G3xeV9GNgNJm67n2qBJG1JR1HV3eiqCV9gRQnyip/3qPKuBhCnA==", "dependencies": { "@axelar-network/axelarjs-sdk": "^0.13.6", "@cosmjs/amino": "^0.31.1", diff --git a/package.json b/package.json index 734f4f01..ad71c603 100644 --- a/package.json +++ b/package.json @@ -56,7 +56,7 @@ "@radix-ui/react-scroll-area": "^1.0.5", "@radix-ui/react-tooltip": "^1.0.7", "@sentry/nextjs": "^7.99.0", - "@skip-router/core": "1.2.12", + "@skip-router/core": "^1.2.13", "@tailwindcss/forms": "^0.5.7", "@tanstack/query-sync-storage-persister": "^5.18.1", "@tanstack/react-query": "^5.18.1", From a7ec81a08825bc3081ef1fd25fa72adc9034ea1b Mon Sep 17 00:00:00 2001 From: thal0x Date: Tue, 6 Feb 2024 09:39:26 -0600 Subject: [PATCH 16/30] hotfix dym gas price --- src/constants/gas.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/constants/gas.ts b/src/constants/gas.ts index 7916522d..524756ea 100644 --- a/src/constants/gas.ts +++ b/src/constants/gas.ts @@ -12,4 +12,8 @@ export async function getHotfixedGasPrice(chainID: string) { if (chainID === "noble-1") { return GasPrice.fromString("0.0uusdc"); } + + if (chainID === "dymension_1100-1") { + return GasPrice.fromString("0.udym"); + } } From bc9bee30b3f03f7342a70309cb2eabbb8955ab54 Mon Sep 17 00:00:00 2001 From: thal0x Date: Tue, 6 Feb 2024 09:40:33 -0600 Subject: [PATCH 17/30] hotfix dym gas price --- src/constants/gas.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/constants/gas.ts b/src/constants/gas.ts index 524756ea..ea0fe884 100644 --- a/src/constants/gas.ts +++ b/src/constants/gas.ts @@ -14,6 +14,6 @@ export async function getHotfixedGasPrice(chainID: string) { } if (chainID === "dymension_1100-1") { - return GasPrice.fromString("0.udym"); + return GasPrice.fromString("0.4udym"); } } From 3e3307f9cfa2ba37dc71c53f60d64c1e44d2bf40 Mon Sep 17 00:00:00 2001 From: thal0x Date: Tue, 6 Feb 2024 09:48:10 -0600 Subject: [PATCH 18/30] hotfix dym gas price --- src/constants/gas.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/constants/gas.ts b/src/constants/gas.ts index ea0fe884..adca366a 100644 --- a/src/constants/gas.ts +++ b/src/constants/gas.ts @@ -14,6 +14,6 @@ export async function getHotfixedGasPrice(chainID: string) { } if (chainID === "dymension_1100-1") { - return GasPrice.fromString("0.4udym"); + return GasPrice.fromString("20000000000adym"); } } From c3c1e960125c2639fc64898a63d4defa423a45e4 Mon Sep 17 00:00:00 2001 From: Griko Nibras Date: Tue, 6 Feb 2024 23:02:01 +0700 Subject: [PATCH 19/30] refactor: drop typed chain id Signed-off-by: Griko Nibras --- src/components/ChainSymbol.tsx | 3 +-- src/hooks/useBalancesByChain.ts | 5 ++--- src/utils/chain.ts | 3 +-- src/utils/clients.ts | 18 ++---------------- src/utils/wallet.ts | 3 +-- 5 files changed, 7 insertions(+), 25 deletions(-) diff --git a/src/components/ChainSymbol.tsx b/src/components/ChainSymbol.tsx index d5411e66..c11ffefe 100644 --- a/src/components/ChainSymbol.tsx +++ b/src/components/ChainSymbol.tsx @@ -1,11 +1,10 @@ import { CubeIcon } from "@heroicons/react/20/solid"; import { useMemo } from "react"; -import { ChainId } from "@/chains/types"; import { useChainByID } from "@/hooks/useChains"; interface Props { - chainId: ChainId; + chainId: string; } export const ChainSymbol = ({ chainId }: Props) => { diff --git a/src/hooks/useBalancesByChain.ts b/src/hooks/useBalancesByChain.ts index e2d4f5dd..d9e5f221 100644 --- a/src/hooks/useBalancesByChain.ts +++ b/src/hooks/useBalancesByChain.ts @@ -2,7 +2,6 @@ import { Asset, SkipRouter } from "@skip-router/core"; import { useQuery } from "@tanstack/react-query"; import { erc20ABI, PublicClient, usePublicClient } from "wagmi"; -import { ChainId } from "@/chains/types"; import { multicall3ABI } from "@/constants/abis"; import { Chain } from "@/hooks/useChains"; import { useSkipClient } from "@/solve"; @@ -39,7 +38,7 @@ export function useBalancesByChain({ address, chain, assets, enabled = true }: A }); } -export async function getBalancesByChain(address: string, chainID: ChainId, assets: Asset[]) { +export async function getBalancesByChain(address: string, chainID: string, assets: Asset[]) { const [stargate, cosmwasm] = await Promise.all([ getStargateClientForChainID(chainID), getCosmWasmClientForChainID(chainID), @@ -76,7 +75,7 @@ export async function getEvmChainBalances( skipClient: SkipRouter, publicClient: PublicClient, address: string, - chainID: ChainId, + chainID: string, ) { const assets = await skipClient.assets({ chainID, diff --git a/src/utils/chain.ts b/src/utils/chain.ts index 697331f9..768b5669 100644 --- a/src/utils/chain.ts +++ b/src/utils/chain.ts @@ -1,9 +1,8 @@ import { Chain, FeeAsset } from "@skip-router/core"; -import { ChainId } from "@/chains/types"; import { CHAIN_NAME_TO_CHAINLIST_ID, CHAINLIST_LOGO_CHAIN_IDS } from "@/constants/chainlist"; -export async function getChainFeeAssets(chainID: ChainId): Promise { +export async function getChainFeeAssets(chainID: string): Promise { const response = await fetch(`/api/gas/${chainID}`); if (!response.ok) return []; const feeAssets = await response.json(); diff --git a/src/utils/clients.ts b/src/utils/clients.ts index bda31a4b..c73110a2 100644 --- a/src/utils/clients.ts +++ b/src/utils/clients.ts @@ -2,23 +2,15 @@ import { CosmWasmClient } from "@cosmjs/cosmwasm-stargate"; import { AccountParser, StargateClient } from "@cosmjs/stargate"; import { strideAccountParser } from "stridejs"; -import { ChainId, chainIdToName } from "@/chains/types"; - import { getNodeProxyEndpoint } from "./api"; const STARGATE_CLIENTS: Record = {}; -export async function getStargateClientForChainID(chainID: ChainId) { +export async function getStargateClientForChainID(chainID: string) { if (STARGATE_CLIENTS[chainID]) { return STARGATE_CLIENTS[chainID]; } - const chainName = chainIdToName[chainID]; - - if (!chainName) { - throw new Error(`stargateClient error: chain with ID ${chainID} not found`); - } - const preferredEndpoint = getNodeProxyEndpoint(chainID); let accountParser: AccountParser | undefined; @@ -37,17 +29,11 @@ export async function getStargateClientForChainID(chainID: ChainId) { const COSMWASM_CLIENTS: Record = {}; -export async function getCosmWasmClientForChainID(chainID: ChainId) { +export async function getCosmWasmClientForChainID(chainID: string) { if (COSMWASM_CLIENTS[chainID]) { return COSMWASM_CLIENTS[chainID]; } - const chainName = chainIdToName[chainID]; - - if (!chainName) { - throw new Error(`cosmWasmClient error: chain with ID ${chainID} not found`); - } - const preferredEndpoint = getNodeProxyEndpoint(chainID); const client = await CosmWasmClient.connect(preferredEndpoint); diff --git a/src/utils/wallet.ts b/src/utils/wallet.ts index 1ee5fb3d..f68aa59c 100644 --- a/src/utils/wallet.ts +++ b/src/utils/wallet.ts @@ -1,6 +1,5 @@ import { ChainWalletBase } from "@cosmos-kit/core"; -import { ChainId } from "@/chains/types"; import { MergedWalletClient } from "@/lib/cosmos-kit"; export async function gracefullyConnect( @@ -38,7 +37,7 @@ export async function gracefullyConnect( await wallet.connect(); } -export async function isWalletClientUsingLedger(walletClient: T, chainID: ChainId) { +export async function isWalletClientUsingLedger(walletClient: T, chainID: string) { if (!("client" in walletClient)) { return false; } From 394f4cb309061a5f11d81582bf4efd4b7c60e973 Mon Sep 17 00:00:00 2001 From: Griko Nibras Date: Tue, 6 Feb 2024 23:02:57 +0700 Subject: [PATCH 20/30] fix: prefer asset token contract for evm route Signed-off-by: Griko Nibras --- src/components/SwapWidget/useSwapWidget.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/SwapWidget/useSwapWidget.ts b/src/components/SwapWidget/useSwapWidget.ts index 7d7f0dd3..1c256425 100644 --- a/src/components/SwapWidget/useSwapWidget.ts +++ b/src/components/SwapWidget/useSwapWidget.ts @@ -92,9 +92,9 @@ export function useSwapWidget() { } = useRoute({ direction: direction, amount: direction === "swap-in" ? amountInWei : amountOutWei, - sourceAsset: srcAsset?.denom, + sourceAsset: srcAsset && (srcAsset.isEVM ? srcAsset.tokenContract : srcAsset.denom), sourceAssetChainID: srcAsset?.chainID, - destinationAsset: dstAsset?.denom, + destinationAsset: dstAsset && (dstAsset.isEVM ? dstAsset.tokenContract : dstAsset.denom), destinationAssetChainID: dstAsset?.chainID, enabled: shouldRouteLoad, }); From 8b78cfc26745bd9e6293667b38d58a79c49ce330 Mon Sep 17 00:00:00 2001 From: Griko Nibras Date: Tue, 6 Feb 2024 23:25:42 +0700 Subject: [PATCH 21/30] feat: add ethermint types --- src/lib/ethermint/types.ts | 76 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 76 insertions(+) create mode 100644 src/lib/ethermint/types.ts diff --git a/src/lib/ethermint/types.ts b/src/lib/ethermint/types.ts new file mode 100644 index 00000000..3e6fe64d --- /dev/null +++ b/src/lib/ethermint/types.ts @@ -0,0 +1,76 @@ +// https://github.com/Team-Kujira/kujira.js/blob/692d661494260cd03c3c958b4f9c47217e24e963/src/ethermint/types.ts + +import { BaseAccount } from "cosmjs-types/cosmos/auth/v1beta1/auth"; +import { base64FromBytes, bytesFromBase64, DeepPartial, Exact, isSet } from "cosmjs-types/helpers"; +import * as _m0 from "protobufjs/minimal"; + +export const protobufPackage = "ethermint.types.v1"; + +/** + * EthAccount implements the authtypes.AccountI interface and embeds an + * authtypes.BaseAccount type. It is compatible with the auth AccountKeeper. + */ +export interface EthAccount { + baseAccount?: BaseAccount; + codeHash: Uint8Array; +} +function createBaseEthAccount(): EthAccount { + return { + baseAccount: undefined, + codeHash: new Uint8Array(), + }; +} +export const EthAccount = { + typeUrl: "/ethermint.types.v1.EthAccount", + encode(message: EthAccount, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.baseAccount !== undefined) { + BaseAccount.encode(message.baseAccount, writer.uint32(10).fork()).ldelim(); + } + if (message.codeHash.length !== 0) { + writer.uint32(18).bytes(message.codeHash); + } + return writer; + }, + decode(input: _m0.Reader | Uint8Array, length?: number): EthAccount { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); + const end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseEthAccount(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.baseAccount = BaseAccount.decode(reader, reader.uint32()); + break; + case 2: + message.codeHash = reader.bytes(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + fromJSON(object: any): EthAccount { + const obj = createBaseEthAccount(); + if (isSet(object.baseAccount)) obj.baseAccount = BaseAccount.fromJSON(object.baseAccount); + if (isSet(object.codeHash)) obj.codeHash = bytesFromBase64(object.codeHash); + return obj; + }, + toJSON(message: EthAccount): unknown { + const obj: any = {}; + message.baseAccount !== undefined && + (obj.baseAccount = message.baseAccount ? BaseAccount.toJSON(message.baseAccount) : undefined); + message.codeHash !== undefined && + (obj.codeHash = base64FromBytes(message.codeHash !== undefined ? message.codeHash : new Uint8Array())); + return obj; + }, + fromPartial, I>>(object: I): EthAccount { + const message = createBaseEthAccount(); + if (object.baseAccount !== undefined && object.baseAccount !== null) { + message.baseAccount = BaseAccount.fromPartial(object.baseAccount); + } + message.codeHash = object.codeHash ?? new Uint8Array(); + return message; + }, +}; From 38c73eb0e569ed3846e2b25ca0578632b51d47b2 Mon Sep 17 00:00:00 2001 From: Griko Nibras Date: Tue, 6 Feb 2024 23:25:47 +0700 Subject: [PATCH 22/30] feat: extract custom account parser --- src/utils/clients.ts | 11 +++-------- src/utils/stargate.ts | 32 ++++++++++++++++++++++++++++++++ 2 files changed, 35 insertions(+), 8 deletions(-) create mode 100644 src/utils/stargate.ts diff --git a/src/utils/clients.ts b/src/utils/clients.ts index c73110a2..5c847e3d 100644 --- a/src/utils/clients.ts +++ b/src/utils/clients.ts @@ -1,8 +1,8 @@ import { CosmWasmClient } from "@cosmjs/cosmwasm-stargate"; -import { AccountParser, StargateClient } from "@cosmjs/stargate"; -import { strideAccountParser } from "stridejs"; +import { StargateClient } from "@cosmjs/stargate"; import { getNodeProxyEndpoint } from "./api"; +import { getCustomAccountParser } from "./stargate"; const STARGATE_CLIENTS: Record = {}; @@ -13,13 +13,8 @@ export async function getStargateClientForChainID(chainID: string) { const preferredEndpoint = getNodeProxyEndpoint(chainID); - let accountParser: AccountParser | undefined; - if (chainID.includes("stride")) { - accountParser = strideAccountParser; - } - const client = await StargateClient.connect(preferredEndpoint, { - accountParser, + accountParser: getCustomAccountParser(chainID), }); STARGATE_CLIENTS[chainID] = client; diff --git a/src/utils/stargate.ts b/src/utils/stargate.ts new file mode 100644 index 00000000..31cd6111 --- /dev/null +++ b/src/utils/stargate.ts @@ -0,0 +1,32 @@ +import { AccountParser } from "@cosmjs/stargate"; +import { strideAccountParser } from "stridejs"; + +import { EthAccount } from "@/lib/ethermint/types"; + +export function getCustomAccountParser(chainID: string): AccountParser | undefined { + if (chainID.includes("dymension_1100-1")) { + return (input) => { + if (input.typeUrl === EthAccount.typeUrl) { + const account = EthAccount.decode(input.value); + const baseEthAccount = account.baseAccount!; + const pubKeyEth = baseEthAccount.pubKey; + return { + address: baseEthAccount.address, + pubkey: pubKeyEth + ? { + type: "/ethermint.crypto.v1.ethsecp256k1.PubKey", + value: Buffer.from(pubKeyEth.value).toString("base64"), + } + : null, + accountNumber: baseEthAccount.accountNumber.toNumber(), + sequence: baseEthAccount.sequence.toNumber(), + }; + } + throw new Error(`Unsupported type: '${input.typeUrl}'`); + }; + } + + if (chainID.includes("stride")) { + return strideAccountParser; + } +} From 732ba633dcb65c3d95451d591023eb88fc78767c Mon Sep 17 00:00:00 2001 From: Griko Nibras Date: Tue, 6 Feb 2024 23:34:43 +0700 Subject: [PATCH 23/30] fix: cover multiple cases on getCosmosSigner --- src/solve/context.tsx | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/src/solve/context.tsx b/src/solve/context.tsx index 924e1773..9cefedac 100644 --- a/src/solve/context.tsx +++ b/src/solve/context.tsx @@ -26,13 +26,21 @@ export function SkipProvider({ children }: { children: ReactNode }) { throw new Error(`getCosmosSigner error: unknown chainID '${chainID}'`); } - const walletName = trackWallet.get().source?.walletName; - const wallet = getWalletRepo(chainName).wallets.find((w) => { + const walletName = (() => { + const { source, destination } = trackWallet.get(); + if (source?.chainType === "cosmos") return source.walletName; + if (destination?.chainType === "cosmos") return destination.walletName; + })(); + + let wallet = getWalletRepo(chainName).wallets.find((w) => { return w.walletName === walletName; }); + wallet ??= getWalletRepo(chainName).wallets.find((w) => { + return w.isWalletConnected && !w.isWalletDisconnected; + }); if (!wallet) { - throw new Error(`getCosmosSigner error: unknown walletName '${walletName}'`); + throw new Error(`getCosmosSigner error: unable to find cosmos wallets connected to '${chainID}'`); } const isLedger = await isWalletClientUsingLedger(wallet.client, chainID); From e8bec1d376dceb6ae5f6599437dcd1a91c3c8efd Mon Sep 17 00:00:00 2001 From: Griko Nibras Date: Tue, 6 Feb 2024 23:34:52 +0700 Subject: [PATCH 24/30] chore: update eslint config --- .eslintrc.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/.eslintrc.js b/.eslintrc.js index 0a3d0e52..83e3ff2d 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -13,9 +13,9 @@ const eslintConfig = { ], plugins: ["simple-import-sort"], rules: { - "@next/next/no-img-element": "off", - "simple-import-sort/exports": "warn", - "simple-import-sort/imports": "warn", + "@next/next/no-img-element": ["off"], + "simple-import-sort/exports": ["warn"], + "simple-import-sort/imports": ["warn"], }, ignorePatterns: ["node_modules/", ".next/", "out/", "src/chains/*"], overrides: [ @@ -35,9 +35,11 @@ const eslintConfig = { extendDefaults: true, }, ], + "@typescript-eslint/no-explicit-any": ["warn"], }, }, ], root: true, }; + module.exports = eslintConfig; From 44bf0965cd00f652632b4b78f52d64deef037df0 Mon Sep 17 00:00:00 2001 From: Griko Nibras Date: Tue, 6 Feb 2024 23:51:18 +0700 Subject: [PATCH 25/30] Revert "fix: prefer asset token contract for evm route" This reverts commit 394f4cb309061a5f11d81582bf4efd4b7c60e973. --- src/components/SwapWidget/useSwapWidget.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/SwapWidget/useSwapWidget.ts b/src/components/SwapWidget/useSwapWidget.ts index 1c256425..7d7f0dd3 100644 --- a/src/components/SwapWidget/useSwapWidget.ts +++ b/src/components/SwapWidget/useSwapWidget.ts @@ -92,9 +92,9 @@ export function useSwapWidget() { } = useRoute({ direction: direction, amount: direction === "swap-in" ? amountInWei : amountOutWei, - sourceAsset: srcAsset && (srcAsset.isEVM ? srcAsset.tokenContract : srcAsset.denom), + sourceAsset: srcAsset?.denom, sourceAssetChainID: srcAsset?.chainID, - destinationAsset: dstAsset && (dstAsset.isEVM ? dstAsset.tokenContract : dstAsset.denom), + destinationAsset: dstAsset?.denom, destinationAssetChainID: dstAsset?.chainID, enabled: shouldRouteLoad, }); From 65e634080717b29165881eab8687be3bae6f92cc Mon Sep 17 00:00:00 2001 From: Griko Nibras Date: Wed, 7 Feb 2024 00:38:30 +0700 Subject: [PATCH 26/30] fix: update getCosmosSigner resolver --- src/solve/context.tsx | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/src/solve/context.tsx b/src/solve/context.tsx index 9cefedac..b6e9c7ed 100644 --- a/src/solve/context.tsx +++ b/src/solve/context.tsx @@ -9,7 +9,7 @@ import { API_URL } from "@/constants/api"; import { OVERRIDE_REST_ENDPOINTS, OVERRIDE_RPC_ENDPOINTS } from "@/constants/endpoints"; import { trackWallet } from "@/context/track-wallet"; import { getNodeProxyEndpoint } from "@/utils/api"; -import { isWalletClientUsingLedger } from "@/utils/wallet"; +import { gracefullyConnect, isWalletClientUsingLedger } from "@/utils/wallet"; export const SkipContext = createContext<{ skipClient: SkipRouter } | undefined>(undefined); @@ -32,15 +32,16 @@ export function SkipProvider({ children }: { children: ReactNode }) { if (destination?.chainType === "cosmos") return destination.walletName; })(); - let wallet = getWalletRepo(chainName).wallets.find((w) => { + const wallet = getWalletRepo(chainName).wallets.find((w) => { return w.walletName === walletName; }); - wallet ??= getWalletRepo(chainName).wallets.find((w) => { - return w.isWalletConnected && !w.isWalletDisconnected; - }); if (!wallet) { - throw new Error(`getCosmosSigner error: unable to find cosmos wallets connected to '${chainID}'`); + throw new Error(`getCosmosSigner error: unable to find wallets connected to '${chainID}'`); + } + + if (!wallet.isWalletConnected || wallet.isWalletDisconnected) { + await gracefullyConnect(wallet); } const isLedger = await isWalletClientUsingLedger(wallet.client, chainID); From 834acdf786a0f886cc064282d66066d8ac313c3b Mon Sep 17 00:00:00 2001 From: Griko Nibras Date: Wed, 7 Feb 2024 00:57:13 +0700 Subject: [PATCH 27/30] feat: improve swap error toast Signed-off-by: Griko Nibras --- .../TransactionDialogContent.tsx | 31 +++++++++++++++---- 1 file changed, 25 insertions(+), 6 deletions(-) diff --git a/src/components/TransactionDialog/TransactionDialogContent.tsx b/src/components/TransactionDialog/TransactionDialogContent.tsx index 73efcacc..9325065c 100644 --- a/src/components/TransactionDialog/TransactionDialogContent.tsx +++ b/src/components/TransactionDialog/TransactionDialogContent.tsx @@ -126,12 +126,31 @@ function TransactionDialogContent({ route, onClose, isAmountError, transactionCo }); } - toast.error( -

- Swap Failed! -
- {err.name}: {err.message} -

, + toast( + ({ createdAt, id }) => ( +
+

Swap Failed!

+
+                {err instanceof Error ? `${err.name}: ${err.message}` : String(err)}
+                
+
+ {new Date(createdAt).toISOString()} +
+ +
+ ), + { + ariaProps: { + "aria-live": "assertive", + role: "alert", + }, + duration: Infinity, + }, ); } } finally { From 74d7d6fdf9e359ba8a927306c7054a0b6a533b1e Mon Sep 17 00:00:00 2001 From: Griko Nibras Date: Wed, 7 Feb 2024 01:12:27 +0700 Subject: [PATCH 28/30] feat: ignore user rejected tx error --- .../TransactionDialogContent.tsx | 106 +++++++++--------- src/utils/error.ts | 26 +++-- 2 files changed, 66 insertions(+), 66 deletions(-) diff --git a/src/components/TransactionDialog/TransactionDialogContent.tsx b/src/components/TransactionDialog/TransactionDialogContent.tsx index 9325065c..f6cdd51a 100644 --- a/src/components/TransactionDialog/TransactionDialogContent.tsx +++ b/src/components/TransactionDialog/TransactionDialogContent.tsx @@ -98,61 +98,59 @@ function TransactionDialogContent({ route, onClose, isAmountError, transactionCo setTxComplete(true); } catch (err: unknown) { console.error(err); - if (err instanceof Error) { - if (!isUserRejectedRequestError(err)) { - Sentry.withScope((scope) => { - scope.setUser({ - id: srcAccount?.address, - }); - scope.setTransactionName("Swap.onSubmit"); - scope.setTags({ - sourceChain: route.sourceAssetChainID, - destinationChain: route.destAssetChainID, - sourceAssetDenom: route.sourceAssetDenom, - destinationAssetDenom: route.destAssetDenom, - doesSwap: route.doesSwap, - }); - scope.setExtras({ - sourceAddress: srcAccount?.address, - destinationAddress: dstAccount?.address, - sourceChain: route.sourceAssetChainID, - destinationChain: route.destAssetChainID, - sourceAssetDenom: route.sourceAssetDenom, - destinationAssetDenom: route.destAssetDenom, - amountIn: route.amountIn, - amountOut: route.amountOut, - }); - Sentry.captureException(err); - }); - } - - toast( - ({ createdAt, id }) => ( -
-

Swap Failed!

-
-                {err instanceof Error ? `${err.name}: ${err.message}` : String(err)}
-                
-
- {new Date(createdAt).toISOString()} -
- -
- ), - { - ariaProps: { - "aria-live": "assertive", - role: "alert", - }, - duration: Infinity, - }, - ); + if (isUserRejectedRequestError(err)) { + return; } + Sentry.withScope((scope) => { + scope.setUser({ + id: srcAccount?.address, + }); + scope.setTransactionName("Swap.onSubmit"); + scope.setTags({ + sourceChain: route.sourceAssetChainID, + destinationChain: route.destAssetChainID, + sourceAssetDenom: route.sourceAssetDenom, + destinationAssetDenom: route.destAssetDenom, + doesSwap: route.doesSwap, + }); + scope.setExtras({ + sourceAddress: srcAccount?.address, + destinationAddress: dstAccount?.address, + sourceChain: route.sourceAssetChainID, + destinationChain: route.destAssetChainID, + sourceAssetDenom: route.sourceAssetDenom, + destinationAssetDenom: route.destAssetDenom, + amountIn: route.amountIn, + amountOut: route.amountOut, + }); + Sentry.captureException(err); + }); + toast( + ({ createdAt, id }) => ( +
+

Swap Failed!

+
+              {err instanceof Error ? `${err.name}: ${err.message}` : String(err)}
+              
+
+ {new Date(createdAt).toISOString()} +
+ +
+ ), + { + ariaProps: { + "aria-live": "assertive", + role: "alert", + }, + duration: Infinity, + }, + ); } finally { setOngoing(false); } diff --git a/src/utils/error.ts b/src/utils/error.ts index 3fa0b8f5..c781c19c 100644 --- a/src/utils/error.ts +++ b/src/utils/error.ts @@ -1,14 +1,16 @@ -export const isUserRejectedRequestError = (error: Error) => { - if ( - // keplr | metamask - error.message.toLowerCase().includes("rejected") || - // leap - error.message.toLowerCase().includes("declined") || - // eslint-disable-next-line @typescript-eslint/ban-ts-comment - // @ts-expect-error common user rejected request error code - error.code === 4001 - ) { - return true; +export function isUserRejectedRequestError(input: unknown): input is Error { + if (input instanceof Error) { + if ( + // keplr | metamask + input.message.toLowerCase().includes("rejected") || + // leap + input.message.toLowerCase().includes("declined") || + // eslint-disable-next-line @typescript-eslint/ban-ts-comment + // @ts-expect-error common user rejected request error code + input.code === 4001 + ) { + return true; + } } return false; -}; +} From 8c0bf177847dcdab24dd5594d5d1f7031c3a815c Mon Sep 17 00:00:00 2001 From: thal0x Date: Tue, 6 Feb 2024 12:44:14 -0600 Subject: [PATCH 29/30] bump sdk version and add dymension rest endpoint --- package-lock.json | 126 +++++++++++++++++++++++++++++++++++-- package.json | 2 +- src/constants/endpoints.ts | 1 + 3 files changed, 124 insertions(+), 5 deletions(-) diff --git a/package-lock.json b/package-lock.json index 1ffd04b2..10a35e5f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -38,7 +38,7 @@ "@radix-ui/react-scroll-area": "^1.0.5", "@radix-ui/react-tooltip": "^1.0.7", "@sentry/nextjs": "^7.99.0", - "@skip-router/core": "^1.2.13", + "@skip-router/core": "^1.2.15", "@tailwindcss/forms": "^0.5.7", "@tanstack/query-sync-storage-persister": "^5.18.1", "@tanstack/react-query": "^5.18.1", @@ -1179,6 +1179,50 @@ "xstream": "^11.14.0" } }, + "node_modules/@cosmjs/launchpad": { + "version": "0.27.1", + "resolved": "https://registry.npmjs.org/@cosmjs/launchpad/-/launchpad-0.27.1.tgz", + "integrity": "sha512-DcFwGD/z5PK8CzO2sojDxa+Be9EIEtRZb2YawgVnw2Ht/p5FlNv+OVo8qlishpBdalXEN7FvQ1dVeDFEe9TuJw==", + "dependencies": { + "@cosmjs/amino": "0.27.1", + "@cosmjs/crypto": "0.27.1", + "@cosmjs/encoding": "0.27.1", + "@cosmjs/math": "0.27.1", + "@cosmjs/utils": "0.27.1", + "axios": "^0.21.2", + "fast-deep-equal": "^3.1.3" + } + }, + "node_modules/@cosmjs/launchpad/node_modules/@cosmjs/crypto": { + "version": "0.27.1", + "resolved": "https://registry.npmjs.org/@cosmjs/crypto/-/crypto-0.27.1.tgz", + "integrity": "sha512-vbcxwSt99tIYJg8Spp00wc3zx72qx+pY3ozGuBN8gAvySnagK9dQ/jHwtWQWdammmdD6oW+75WfIHZ+gNa+Ybg==", + "dependencies": { + "@cosmjs/encoding": "0.27.1", + "@cosmjs/math": "0.27.1", + "@cosmjs/utils": "0.27.1", + "bip39": "^3.0.2", + "bn.js": "^5.2.0", + "elliptic": "^6.5.3", + "js-sha3": "^0.8.0", + "libsodium-wrappers": "^0.7.6", + "ripemd160": "^2.0.2", + "sha.js": "^2.4.11" + } + }, + "node_modules/@cosmjs/launchpad/node_modules/@cosmjs/utils": { + "version": "0.27.1", + "resolved": "https://registry.npmjs.org/@cosmjs/utils/-/utils-0.27.1.tgz", + "integrity": "sha512-VG7QPDiMUzVPxRdJahDV8PXxVdnuAHiIuG56hldV4yPnOz/si/DLNd7VAUUA5923b6jS1Hhev0Hr6AhEkcxBMg==" + }, + "node_modules/@cosmjs/launchpad/node_modules/axios": { + "version": "0.21.4", + "resolved": "https://registry.npmjs.org/axios/-/axios-0.21.4.tgz", + "integrity": "sha512-ut5vewkiu8jjGBdqpM44XxjuCjq9LAKeHVmoVfHVzy8eHgxxq8SbAVQNovDA8mVi05kP0Ea/n/UzcSHcTJQfNg==", + "dependencies": { + "follow-redirects": "^1.14.0" + } + }, "node_modules/@cosmjs/ledger-amino": { "version": "0.31.3", "resolved": "https://registry.npmjs.org/@cosmjs/ledger-amino/-/ledger-amino-0.31.3.tgz", @@ -7756,9 +7800,9 @@ } }, "node_modules/@skip-router/core": { - "version": "1.2.13", - "resolved": "https://registry.npmjs.org/@skip-router/core/-/core-1.2.13.tgz", - "integrity": "sha512-XA4RVVHsCVD+RRwEjHrUxd3ygpE+YURS5q7G3xeV9GNgNJm67n2qBJG1JR1HV3eiqCV9gRQnyip/3qPKuBhCnA==", + "version": "1.2.15", + "resolved": "https://registry.npmjs.org/@skip-router/core/-/core-1.2.15.tgz", + "integrity": "sha512-xsxBUOkiVdzMLVqpbUMBuBBsZXEwLlpn/AbvhIwlPVfejUM5QRq9Bh9so5hDlbmpxB0svELTGIjcqdQbH5jwVA==", "dependencies": { "@axelar-network/axelarjs-sdk": "^0.13.6", "@cosmjs/amino": "^0.31.1", @@ -7775,6 +7819,7 @@ "cosmjs-types": "^0.8.0", "faker": "^6.6.6", "keccak256": "^1.0.6", + "kujira.js": "^0.9.121", "stridejs": "^0.8.0-alpha.5", "viem": "^1.12.2" } @@ -8520,6 +8565,11 @@ "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.5.tgz", "integrity": "sha512-/kYRxGDLWzHOB7q+wtSUQlFrtcdUccpfy+X+9iMBpHK8QLLhx2wIPYuS5DYtR9Wa/YlZAbIovy7qVdB1Aq6Lyw==" }, + "node_modules/@types/google-protobuf": { + "version": "3.15.12", + "resolved": "https://registry.npmjs.org/@types/google-protobuf/-/google-protobuf-3.15.12.tgz", + "integrity": "sha512-40um9QqwHjRS92qnOaDpL7RmDK15NuZYo9HihiJRbYkMQZlWnuH8AdvbMy8/o6lgLmKbDUKa+OALCltHdbOTpQ==" + }, "node_modules/@types/got": { "version": "9.6.12", "resolved": "https://registry.npmjs.org/@types/got/-/got-9.6.12.tgz", @@ -17918,6 +17968,55 @@ "node": ">=6" } }, + "node_modules/kujira.js": { + "version": "0.9.121", + "resolved": "https://registry.npmjs.org/kujira.js/-/kujira.js-0.9.121.tgz", + "integrity": "sha512-4RoKNd6Hg3idwOKAf2PVuKoKfNxoA6lA8Z7u4B8HpZsvCyB1aWNAUHDug6SivVOUl3W2mqESpRm2wIsi31o7Jw==", + "dependencies": { + "@cosmjs/cosmwasm-stargate": "^0.31.1", + "@cosmjs/launchpad": "^0.27.1", + "@cosmjs/stargate": "^0.31.1", + "@ethersproject/bignumber": "^5.7.0", + "@keplr-wallet/types": "^0.11.12", + "@types/google-protobuf": "^3.15.6", + "chain-registry": "^1.27.0", + "cosmjs-types": "^0.8.0", + "long": "^4.0.0", + "text-encoding": "^0.7.0", + "yarn": "^1.22.19" + } + }, + "node_modules/kujira.js/node_modules/@keplr-wallet/types": { + "version": "0.11.64", + "resolved": "https://registry.npmjs.org/@keplr-wallet/types/-/types-0.11.64.tgz", + "integrity": "sha512-GgzeLDHHfZFyne3O7UIfFHj/uYqVbxAZI31RbBwt460OBbvwQzjrlZwvJW3vieWRAgxKSITjzEDBl2WneFTQdQ==", + "dependencies": { + "axios": "^0.27.2", + "long": "^4.0.0" + } + }, + "node_modules/kujira.js/node_modules/axios": { + "version": "0.27.2", + "resolved": "https://registry.npmjs.org/axios/-/axios-0.27.2.tgz", + "integrity": "sha512-t+yRIyySRTp/wua5xEr+z1q60QmLq8ABsS5O9Me1AsE5dfKqgnCFzwiCZZ/cGNd1lq4/7akDWMxdhVlucjmnOQ==", + "dependencies": { + "follow-redirects": "^1.14.9", + "form-data": "^4.0.0" + } + }, + "node_modules/kujira.js/node_modules/form-data": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.0.tgz", + "integrity": "sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==", + "dependencies": { + "asynckit": "^0.4.0", + "combined-stream": "^1.0.8", + "mime-types": "^2.1.12" + }, + "engines": { + "node": ">= 6" + } + }, "node_modules/language-subtag-registry": { "version": "0.3.22", "resolved": "https://registry.npmjs.org/language-subtag-registry/-/language-subtag-registry-0.3.22.tgz", @@ -22578,6 +22677,12 @@ "node": "*" } }, + "node_modules/text-encoding": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/text-encoding/-/text-encoding-0.7.0.tgz", + "integrity": "sha512-oJQ3f1hrOnbRLOcwKz0Liq2IcrvDeZRHXhd9RgLrsT+DjWY/nty1Hi7v3dtkaEYbPYe0mUoOfzRrMwfXXwgPUA==", + "deprecated": "no longer maintained" + }, "node_modules/text-encoding-utf-8": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/text-encoding-utf-8/-/text-encoding-utf-8-1.0.2.tgz", @@ -24099,6 +24204,19 @@ "node": ">=10" } }, + "node_modules/yarn": { + "version": "1.22.21", + "resolved": "https://registry.npmjs.org/yarn/-/yarn-1.22.21.tgz", + "integrity": "sha512-ynXaJsADJ9JiZ84zU25XkPGOvVMmZ5b7tmTSpKURYwgELdjucAOydqIOrOfTxVYcNXe91xvLZwcRh68SR3liCg==", + "hasInstallScript": true, + "bin": { + "yarn": "bin/yarn.js", + "yarnpkg": "bin/yarn.js" + }, + "engines": { + "node": ">=4.0.0" + } + }, "node_modules/yauzl": { "version": "2.10.0", "resolved": "https://registry.npmjs.org/yauzl/-/yauzl-2.10.0.tgz", diff --git a/package.json b/package.json index ad71c603..7110f76c 100644 --- a/package.json +++ b/package.json @@ -56,7 +56,7 @@ "@radix-ui/react-scroll-area": "^1.0.5", "@radix-ui/react-tooltip": "^1.0.7", "@sentry/nextjs": "^7.99.0", - "@skip-router/core": "^1.2.13", + "@skip-router/core": "^1.2.15", "@tailwindcss/forms": "^0.5.7", "@tanstack/query-sync-storage-persister": "^5.18.1", "@tanstack/react-query": "^5.18.1", diff --git a/src/constants/endpoints.ts b/src/constants/endpoints.ts index c24a0ae3..bbc39718 100644 --- a/src/constants/endpoints.ts +++ b/src/constants/endpoints.ts @@ -11,6 +11,7 @@ export const ALLOWLIST_POLKACHU_BACKUP_CHAIN_IDS = [ export const OVERRIDE_REST_ENDPOINTS: Record = { "evmos_9001-2": "https://evmos-api.polkachu.com", "injective-1": "https://lcd.injective.network", + "dymension_1100-1": "https://dymension-api.polkachu.com", }; export const OVERRIDE_RPC_ENDPOINTS: Record = { From 5782e9dfc5d1a56ffb0b82db6a879b9327347d1e Mon Sep 17 00:00:00 2001 From: Griko Nibras Date: Wed, 7 Feb 2024 01:47:17 +0700 Subject: [PATCH 30/30] feat: update src/constants/endpoints.ts --- src/constants/endpoints.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/constants/endpoints.ts b/src/constants/endpoints.ts index bbc39718..bed907d6 100644 --- a/src/constants/endpoints.ts +++ b/src/constants/endpoints.ts @@ -9,9 +9,9 @@ export const ALLOWLIST_POLKACHU_BACKUP_CHAIN_IDS = [ ]; export const OVERRIDE_REST_ENDPOINTS: Record = { + "dymension_1100-1": "https://dymension-api.polkachu.com", "evmos_9001-2": "https://evmos-api.polkachu.com", "injective-1": "https://lcd.injective.network", - "dymension_1100-1": "https://dymension-api.polkachu.com", }; export const OVERRIDE_RPC_ENDPOINTS: Record = {