From d884c03ff932c4817aa0ab903c551c488bfb29ae Mon Sep 17 00:00:00 2001 From: omar Date: Fri, 10 May 2024 17:33:07 -0700 Subject: [PATCH] feat: sepolia token balances --- app/app.nix | 2 +- app/package-lock.json | 111 ++++++++++-------- app/package.json | 22 ++-- app/src/lib/components/footer.svelte | 2 +- app/src/lib/components/header/header.svelte | 2 +- app/src/lib/constants/assets.ts | 2 +- app/src/lib/constants/keys.ts | 10 ++ app/src/lib/queries/balance.ts | 74 +++++++++++- app/src/lib/queries/token-info.ts | 28 +++++ app/src/lib/wallet/evm/config.ts | 25 ++-- app/src/routes/+layout.svelte | 3 +- app/src/routes/send/+page.svelte | 6 +- app/tsconfig.json | 8 +- typescript-sdk/README.md | 124 +------------------- typescript-sdk/scripts/sepolia-to-union.ts | 12 +- typescript-sdk/scripts/to-osmosis.ts | 4 +- typescript-sdk/src/mod.ts | 3 + 17 files changed, 222 insertions(+), 216 deletions(-) create mode 100644 app/src/lib/constants/keys.ts create mode 100644 app/src/lib/queries/token-info.ts diff --git a/app/app.nix b/app/app.nix index ce152924ce..772b9ed7fc 100644 --- a/app/app.nix +++ b/app/app.nix @@ -9,7 +9,7 @@ { packages = { app = unstablePkgs.buildNpmPackage { - npmDepsHash = "sha256-fxbZgI5iNQjgYugrogceeqB9JF5s/AXjt/sp4bvw5hY="; + npmDepsHash = "sha256-aDWbPxAj2FRjBN/SxrsOeLXNIQcqPKohEdNMYFB56i0="; src = ./.; sourceRoot = "app"; npmFlags = [ "--legacy-peer-deps" ]; diff --git a/app/package-lock.json b/app/package-lock.json index 7fa4ec0d35..58f866b242 100644 --- a/app/package-lock.json +++ b/app/package-lock.json @@ -13,13 +13,13 @@ "@cosmjs/cosmwasm-stargate": "^0.32.3", "@cosmjs/stargate": "0.32.3", "@leapwallet/cosmos-snap-provider": "^0.1.26", - "@tanstack/svelte-query": "^5.35.1", + "@tanstack/svelte-query": "^5.35.5", "@union/client": "npm:@jsr/union__client@^0.0.1-rc.8", - "@urql/exchange-persisted": "^4.2.0", - "@urql/exchange-retry": "^1.2.1", - "@urql/svelte": "^4.1.1", - "@wagmi/connectors": "^4.3.5", - "@wagmi/core": "^2.9.3", + "@urql/exchange-persisted": "^4.3.0", + "@urql/exchange-retry": "^1.3.0", + "@urql/svelte": "^4.2.0", + "@wagmi/connectors": "^4.3.7", + "@wagmi/core": "^2.9.5", "bits-ui": "^0.21.7", "cmdk-sv": "^0.0.17", "formsnap": "^1.0.0", @@ -35,7 +35,7 @@ "uint8array-extras": "^1.1.0", "valibot": "^0.30.0", "vaul-svelte": "^0.3.0", - "viem": "^2.10.2" + "viem": "^2.10.3" }, "devDependencies": { "@0no-co/graphqlsp": "^1.12.2", @@ -44,10 +44,10 @@ "@iconify-json/lucide": "^1.1.187", "@iconify-json/mdi": "^1.1.66", "@iconify-json/tabler": "^1.1.111", - "@keplr-wallet/types": "^0.12.87", + "@keplr-wallet/types": "^0.12.88", "@leapwallet/types": "^0.0.5", "@melt-ui/pp": "^0.3.2", - "@melt-ui/svelte": "^0.79.0", + "@melt-ui/svelte": "^0.79.1", "@svelte-put/copy": "^3.0.0", "@svelte-put/shortcut": "^3.1.0", "@sveltejs/adapter-static": "^3.0.1", @@ -56,7 +56,7 @@ "@tailwindcss/aspect-ratio": "^0.4.2", "@tailwindcss/container-queries": "^0.1.1", "@tailwindcss/typography": "^0.5.13", - "@tanstack/svelte-query-devtools": "^5.35.1", + "@tanstack/svelte-query-devtools": "^5.35.5", "@total-typescript/ts-reset": "^0.5.1", "@types/node": "^20.12.11", "@types/postcss-import": "^14.0.3", @@ -83,7 +83,7 @@ "tailwindcss": "^3.4.3", "tailwindcss-animate": "^1.0.7", "tslib": "^2.6.2", - "tsx": "^4.9.3", + "tsx": "^4.9.4", "typed-query-selector": "^2.11.2", "typescript": "^5.4.5", "unplugin-icons": "^0.19.0", @@ -1427,9 +1427,9 @@ } }, "node_modules/@keplr-wallet/types": { - "version": "0.12.87", - "resolved": "https://registry.npmjs.org/@keplr-wallet/types/-/types-0.12.87.tgz", - "integrity": "sha512-E13u8Z/sRjwZLEAPBcq91MNnFfs5YJcTLQgUv4ojpvncfGBiSfq8Z3hMWVXDk9VZhXodYoEsii+R1Hv6RSzbHg==", + "version": "0.12.88", + "resolved": "https://registry.npmjs.org/@keplr-wallet/types/-/types-0.12.88.tgz", + "integrity": "sha512-OKLQO2DSzoPfxnZ/iy3TdOfjoYARN78eZy2qQEKNNpPaX6PJ14dKYD9+49ducakDrx8h9641jIV7y1NLgjWruw==", "dev": true, "dependencies": { "long": "^4.0.0" @@ -1485,9 +1485,9 @@ } }, "node_modules/@melt-ui/svelte": { - "version": "0.79.0", - "resolved": "https://registry.npmjs.org/@melt-ui/svelte/-/svelte-0.79.0.tgz", - "integrity": "sha512-kUQNlwF0STzuvmzESEw7jgSSUsTd0rvoYxEvYeVkogWRBS2egM+WeK4ziabu08O0313XWZzrHhiwJRAWsZdHfQ==", + "version": "0.79.1", + "resolved": "https://registry.npmjs.org/@melt-ui/svelte/-/svelte-0.79.1.tgz", + "integrity": "sha512-8XQ8qfAvZz/m6k5aMOiaOlDOTY98zoPAPqWB+7p/peI46AGFygPCYOaAGFAHK+f2YcnddCh1vUYQXYjoHjipYg==", "dev": true, "dependencies": { "@floating-ui/core": "^1.3.1", @@ -3087,9 +3087,9 @@ } }, "node_modules/@tanstack/query-core": { - "version": "5.35.1", - "resolved": "https://registry.npmjs.org/@tanstack/query-core/-/query-core-5.35.1.tgz", - "integrity": "sha512-0Dnpybqb8+ps6WgqBnqFEC+1F/xLvUosRAq+wiGisTgolOZzqZfkE2995dEXmhuzINiTM7/a6xSGznU0NIvBkw==", + "version": "5.35.5", + "resolved": "https://registry.npmjs.org/@tanstack/query-core/-/query-core-5.35.5.tgz", + "integrity": "sha512-OMWvlEqG01RfGj+XZb/piDzPp0eZkkHWSDHt2LvE/fd1zWburP/xwm0ghk6Iv8cuPlP+ACFkZviKXK0OVt6lhg==", "funding": { "type": "github", "url": "https://github.com/sponsors/tannerlinsley" @@ -3106,11 +3106,11 @@ } }, "node_modules/@tanstack/svelte-query": { - "version": "5.35.1", - "resolved": "https://registry.npmjs.org/@tanstack/svelte-query/-/svelte-query-5.35.1.tgz", - "integrity": "sha512-DlgzwhYYN2fUIdE71xh0UWJ8r1VslYBgiP6xcMBPc3YU8eCdiY6fgtBwTkyuNOfaNJlyEiH9X/XxqjjKULp0PQ==", + "version": "5.35.5", + "resolved": "https://registry.npmjs.org/@tanstack/svelte-query/-/svelte-query-5.35.5.tgz", + "integrity": "sha512-LVDl7XhGJqw2vbnNJXGBMylWGf6vrxMaEZmrHWCTGEVoxGbDRFSGGIjXpbF/A3qOpVZV8xJ+70XiMoeks/nzPw==", "dependencies": { - "@tanstack/query-core": "5.35.1" + "@tanstack/query-core": "5.35.5" }, "funding": { "type": "github", @@ -3121,9 +3121,9 @@ } }, "node_modules/@tanstack/svelte-query-devtools": { - "version": "5.35.1", - "resolved": "https://registry.npmjs.org/@tanstack/svelte-query-devtools/-/svelte-query-devtools-5.35.1.tgz", - "integrity": "sha512-giL6JoumJTem1QyQTrUl5gWaS3XpLs4IWNHreUeuJNLB5FdXCrwjXeX8864M9pEs+QFrPIs8igdwhOTB7v4+og==", + "version": "5.35.5", + "resolved": "https://registry.npmjs.org/@tanstack/svelte-query-devtools/-/svelte-query-devtools-5.35.5.tgz", + "integrity": "sha512-uQjVj8s5U8pG2KTFUyJIh7TnAD07s67alnO3ofcfKgkCQJ+AQaPgNMhEQK85IkJ1ZBvwWKQ5ssp8wCXEeE3Qjw==", "dev": true, "dependencies": { "@tanstack/query-devtools": "5.32.1", @@ -3134,7 +3134,7 @@ "url": "https://github.com/sponsors/tannerlinsley" }, "peerDependencies": { - "@tanstack/svelte-query": "^5.35.1", + "@tanstack/svelte-query": "^5.35.5", "svelte": "^3.54.0 || ^4.0.0 || ^5.0.0-next.0" } }, @@ -3260,32 +3260,39 @@ } }, "node_modules/@urql/exchange-persisted": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/@urql/exchange-persisted/-/exchange-persisted-4.2.0.tgz", - "integrity": "sha512-Q23UOcO9YPibPcAZ+4+PMPstijoVIzjqAfPufOmgK3rmuEjnIQYlzRJGxn90r3uunXYiVj3gHXo9qhfrzGRreQ==", + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/@urql/exchange-persisted/-/exchange-persisted-4.3.0.tgz", + "integrity": "sha512-gI3i5uA9K/f0z5VLqKL5SGJpTrPjsN+BOMvAGJj13Bg4JUmJCaqYYHKetay27q4K2GDZIMGDoeytR7XkpP5ftg==", "dependencies": { - "@urql/core": ">=4.3.0", + "@urql/core": "^5.0.0", "wonka": "^6.3.2" + }, + "peerDependencies": { + "@urql/core": "^5.0.0" } }, "node_modules/@urql/exchange-retry": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/@urql/exchange-retry/-/exchange-retry-1.2.1.tgz", - "integrity": "sha512-+BP73EJA0zJpGbdU1V6l2v8hb2m7/9dMHnF85ZjkaG6INkq4O7Tu9+jfC2wYxt2cajRxgxOoAL3iEJ5Xeerzyg==", + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/@urql/exchange-retry/-/exchange-retry-1.3.0.tgz", + "integrity": "sha512-FLt+d81gP4oiHah4hWFDApimc+/xABWMU1AMYsZ1PVB0L0YPtrMCjbOp9WMM7hBzy4gbTDrG24sio0dCfSh/HQ==", "dependencies": { - "@urql/core": ">=4.2.0", + "@urql/core": "^5.0.0", "wonka": "^6.3.2" + }, + "peerDependencies": { + "@urql/core": "^5.0.0" } }, "node_modules/@urql/svelte": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/@urql/svelte/-/svelte-4.1.1.tgz", - "integrity": "sha512-GqgfTtOB6VkQGEazfNl5UasviWjyEZp15I+rG5bpTDQZJSZgkkGZJF+4CdaNNQVBdnWeQlKOsyXRiadYXfe5Vw==", + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/@urql/svelte/-/svelte-4.2.0.tgz", + "integrity": "sha512-88mvnJ+x1Dh/rKrbo7T0C0UnfY1Tv7HEeEg+hMsrZVAqxFbzGR7mXBaZo0XL0AYrvhtGGWsK3l/+Sfj8OoKDSg==", "dependencies": { "@urql/core": "^5.0.0", "wonka": "^6.3.2" }, "peerDependencies": { + "@urql/core": "^5.0.0", "svelte": "^3.0.0 || ^4.0.0" } }, @@ -3456,9 +3463,9 @@ "integrity": "sha512-Fg4zwR0GNnjzodMt3KRy2AWGMKQXByl56+4HjN87soxLNU9P5xcJkstAlIeEF3cU6UYOzmJl1tV0dVPGIljCnQ==" }, "node_modules/@wagmi/connectors": { - "version": "4.3.5", - "resolved": "https://registry.npmjs.org/@wagmi/connectors/-/connectors-4.3.5.tgz", - "integrity": "sha512-6olw6H4Zlp9H6WQeKJv0pJHUYbq2ckXc/57qOKhruvksuXde94gY34nUDZUNRKRTiYlXiUVtwJK7OP0/on7bGw==", + "version": "4.3.7", + "resolved": "https://registry.npmjs.org/@wagmi/connectors/-/connectors-4.3.7.tgz", + "integrity": "sha512-q6c2UbKUv4WyPPVVtwmmjYHvW/y654ErnLh3tsAXUbbhL0DuzG3nnFctNhnV0sHQ5Bc3K/p+5U6AAWzcLZY/6g==", "dependencies": { "@coinbase/wallet-sdk": "3.9.1", "@metamask/sdk": "0.18.6", @@ -3471,7 +3478,7 @@ "url": "https://github.com/sponsors/wevm" }, "peerDependencies": { - "@wagmi/core": "2.9.3", + "@wagmi/core": "2.9.5", "typescript": ">=5.0.4", "viem": "2.x" }, @@ -3482,9 +3489,9 @@ } }, "node_modules/@wagmi/core": { - "version": "2.9.3", - "resolved": "https://registry.npmjs.org/@wagmi/core/-/core-2.9.3.tgz", - "integrity": "sha512-Mbhbmyz0wLbAOkjNoUoSJ0nI43sHz6/NyxTuzQ+g4ZMz9dAlMq5qNNqecfyaeXfOvSKuahlWu/frTIz8+jMgsw==", + "version": "2.9.5", + "resolved": "https://registry.npmjs.org/@wagmi/core/-/core-2.9.5.tgz", + "integrity": "sha512-gDaJ3Gis0z72N5Wjwh8hcDKXBKH3yWWrCdIIWvpL7kQO8FbcKVvWrB00z9zJo11LFAaI04eCikhx/LxM8xEY2A==", "dependencies": { "eventemitter3": "5.0.1", "mipd": "0.0.5", @@ -9656,9 +9663,9 @@ "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==" }, "node_modules/tsx": { - "version": "4.9.3", - "resolved": "https://registry.npmjs.org/tsx/-/tsx-4.9.3.tgz", - "integrity": "sha512-czVbetlILiyJZI5zGlj2kw9vFiSeyra9liPD4nG+Thh4pKTi0AmMEQ8zdV/L2xbIVKrIqif4sUNrsMAOksx9Zg==", + "version": "4.9.4", + "resolved": "https://registry.npmjs.org/tsx/-/tsx-4.9.4.tgz", + "integrity": "sha512-TlSJTVn2taGGDgdV3jAqCj7WQ/CafCB5p4SbG7W2Bl/0AJWH1ShJlBbc0y2lOFTjQEVAAULSTlmehw/Mwv3S/Q==", "dev": true, "dependencies": { "esbuild": "~0.20.2", @@ -10136,9 +10143,9 @@ } }, "node_modules/viem": { - "version": "2.10.2", - "resolved": "https://registry.npmjs.org/viem/-/viem-2.10.2.tgz", - "integrity": "sha512-gcOL+XxA0UWDarli856OEgumaBz4df/qNMpgno4NTSSZtJSC1XixIb3gWjVBei6Vx085ivw/U9ZE8gdniIo7fA==", + "version": "2.10.3", + "resolved": "https://registry.npmjs.org/viem/-/viem-2.10.3.tgz", + "integrity": "sha512-GmPMH+D/SDSXpVSjLM0GN1H1/h4NUPHaIqnFLwAit8nkfCiDuajKflGFiMPCIs1h7QZlBICuKvON/rc09H+w6Q==", "funding": [ { "type": "github", diff --git a/app/package.json b/app/package.json index 120a08ea63..f6e40ffa99 100644 --- a/app/package.json +++ b/app/package.json @@ -18,13 +18,13 @@ "@cosmjs/cosmwasm-stargate": "^0.32.3", "@cosmjs/stargate": "0.32.3", "@leapwallet/cosmos-snap-provider": "^0.1.26", - "@tanstack/svelte-query": "^5.35.1", + "@tanstack/svelte-query": "^5.35.5", "@union/client": "npm:@jsr/union__client@^0.0.1-rc.8", - "@urql/exchange-persisted": "^4.2.0", - "@urql/exchange-retry": "^1.2.1", - "@urql/svelte": "^4.1.1", - "@wagmi/connectors": "^4.3.5", - "@wagmi/core": "^2.9.3", + "@urql/exchange-persisted": "^4.3.0", + "@urql/exchange-retry": "^1.3.0", + "@urql/svelte": "^4.2.0", + "@wagmi/connectors": "^4.3.7", + "@wagmi/core": "^2.9.5", "bits-ui": "^0.21.7", "cmdk-sv": "^0.0.17", "formsnap": "^1.0.0", @@ -40,7 +40,7 @@ "uint8array-extras": "^1.1.0", "valibot": "^0.30.0", "vaul-svelte": "^0.3.0", - "viem": "^2.10.2" + "viem": "^2.10.3" }, "devDependencies": { "@0no-co/graphqlsp": "^1.12.2", @@ -49,10 +49,10 @@ "@iconify-json/lucide": "^1.1.187", "@iconify-json/mdi": "^1.1.66", "@iconify-json/tabler": "^1.1.111", - "@keplr-wallet/types": "^0.12.87", + "@keplr-wallet/types": "^0.12.88", "@leapwallet/types": "^0.0.5", "@melt-ui/pp": "^0.3.2", - "@melt-ui/svelte": "^0.79.0", + "@melt-ui/svelte": "^0.79.1", "@svelte-put/copy": "^3.0.0", "@svelte-put/shortcut": "^3.1.0", "@sveltejs/adapter-static": "^3.0.1", @@ -61,7 +61,7 @@ "@tailwindcss/aspect-ratio": "^0.4.2", "@tailwindcss/container-queries": "^0.1.1", "@tailwindcss/typography": "^0.5.13", - "@tanstack/svelte-query-devtools": "^5.35.1", + "@tanstack/svelte-query-devtools": "^5.35.5", "@total-typescript/ts-reset": "^0.5.1", "@types/node": "^20.12.11", "@types/postcss-import": "^14.0.3", @@ -88,7 +88,7 @@ "tailwindcss": "^3.4.3", "tailwindcss-animate": "^1.0.7", "tslib": "^2.6.2", - "tsx": "^4.9.3", + "tsx": "^4.9.4", "typed-query-selector": "^2.11.2", "typescript": "^5.4.5", "unplugin-icons": "^0.19.0", diff --git a/app/src/lib/components/footer.svelte b/app/src/lib/components/footer.svelte index 9883c29ece..45560ae433 100644 --- a/app/src/lib/components/footer.svelte +++ b/app/src/lib/components/footer.svelte @@ -21,7 +21,7 @@ const navigationIconStyle = "size-9 min-w-6 hover:text-white text-zinc-accent"