├── .npmrc ├── run.sh ├── static ├── robots.txt └── favicon.png ├── .gitignore ├── src ├── index.test.ts ├── chain-registry │ ├── index.ts │ └── README.md ├── app.d.ts ├── app.html └── routes │ └── +page.svelte ├── .eslintignore ├── .prettierignore ├── tests └── test.ts ├── installs.txt ├── vite.config.js ├── .prettierrc ├── playwright.config.ts ├── .vscode └── settings.json ├── svelte.config.js ├── .eslintrc.cjs ├── tsconfig.json ├── README.md └── package.json /.npmrc: -------------------------------------------------------------------------------- 1 | engine-strict=true 2 | -------------------------------------------------------------------------------- /run.sh: -------------------------------------------------------------------------------- 1 | # production 2 | git pull && npm i && npm run build && npm run preview -------------------------------------------------------------------------------- /static/robots.txt: -------------------------------------------------------------------------------- 1 | User-agent: Googlebot 2 | 3 | User-agent: * 4 | Allow: / -------------------------------------------------------------------------------- /static/favicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Reecepbcups/ibc-anywhere-webapp/HEAD/static/favicon.png -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | node_modules 3 | /build 4 | /.svelte-kit 5 | /package 6 | .env 7 | .env.* 8 | !.env.example 9 | vite.config.js.timestamp-* 10 | vite.config.ts.timestamp-* 11 | -------------------------------------------------------------------------------- /src/index.test.ts: -------------------------------------------------------------------------------- 1 | import { describe, it, expect } from 'vitest'; 2 | 3 | describe('sum test', () => { 4 | it('adds 1 + 2 to equal 3', () => { 5 | expect(1 + 2).toBe(3); 6 | }); 7 | }); 8 | -------------------------------------------------------------------------------- /.eslintignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | node_modules 3 | /build 4 | /.svelte-kit 5 | /package 6 | .env 7 | .env.* 8 | !.env.example 9 | 10 | # Ignore files for PNPM, NPM and YARN 11 | pnpm-lock.yaml 12 | package-lock.json 13 | yarn.lock 14 | -------------------------------------------------------------------------------- /.prettierignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | node_modules 3 | /build 4 | /.svelte-kit 5 | /package 6 | .env 7 | .env.* 8 | !.env.example 9 | 10 | # Ignore files for PNPM, NPM and YARN 11 | pnpm-lock.yaml 12 | package-lock.json 13 | yarn.lock 14 | -------------------------------------------------------------------------------- /tests/test.ts: -------------------------------------------------------------------------------- 1 | import { expect, test } from '@playwright/test'; 2 | 3 | test('index page has expected h1', async ({ page }) => { 4 | await page.goto('/'); 5 | expect(await page.textContent('h1')).toBe('Welcome to SvelteKit'); 6 | }); 7 | -------------------------------------------------------------------------------- /src/chain-registry/index.ts: -------------------------------------------------------------------------------- 1 | import assets from './assets'; 2 | import chains from './chains'; 3 | import ibc from './ibc'; 4 | 5 | export default { 6 | assets, 7 | chains, 8 | ibc 9 | }; 10 | 11 | export { assets, chains, ibc }; 12 | -------------------------------------------------------------------------------- /installs.txt: -------------------------------------------------------------------------------- 1 | 2 | # gets all chains we need to make it easy for what we want to transfer 3 | # https://github.com/cosmology-tech/chain-registry 4 | npm install chain-registry 5 | 6 | 7 | # keplr 8 | # https://github.com/cosmology-tech/cosmos-kit/tree/main/packages/keplr -------------------------------------------------------------------------------- /vite.config.js: -------------------------------------------------------------------------------- 1 | import { sveltekit } from '@sveltejs/kit/vite'; 2 | 3 | /** @type {import('vite').UserConfig} */ 4 | const config = { 5 | plugins: [sveltekit()], 6 | test: { 7 | include: ['src/**/*.{test,spec}.{js,ts}'] 8 | } 9 | }; 10 | 11 | export default config; 12 | -------------------------------------------------------------------------------- /.prettierrc: -------------------------------------------------------------------------------- 1 | { 2 | "useTabs": true, 3 | "singleQuote": true, 4 | "trailingComma": "none", 5 | "printWidth": 100, 6 | "plugins": ["prettier-plugin-svelte"], 7 | "pluginSearchDirs": ["."], 8 | "overrides": [{ "files": "*.svelte", "options": { "parser": "svelte" } }] 9 | } 10 | -------------------------------------------------------------------------------- /playwright.config.ts: -------------------------------------------------------------------------------- 1 | import type { PlaywrightTestConfig } from '@playwright/test'; 2 | 3 | const config: PlaywrightTestConfig = { 4 | webServer: { 5 | command: 'npm run build && npm run preview', 6 | port: 4173 7 | }, 8 | testDir: 'tests' 9 | }; 10 | 11 | export default config; 12 | -------------------------------------------------------------------------------- /src/app.d.ts: -------------------------------------------------------------------------------- 1 | // See https://kit.svelte.dev/docs/types#app 2 | // for information about these interfaces 3 | // and what to do when importing types 4 | declare namespace App { 5 | // interface Error {} 6 | // interface Locals {} 7 | // interface PageData {} 8 | // interface Platform {} 9 | } 10 | -------------------------------------------------------------------------------- /src/chain-registry/README.md: -------------------------------------------------------------------------------- 1 | ## Chain Registry 2 | 3 | I had some issues getting my fork to work and import (TS/npm noob). This is a simple 'hacky' solution to get the objects to import correctly. 4 | 5 | git clone reecepbcups/chain-registry-ts 6 | 7 | generate latest from the chain-registry submodule 8 | 9 | copy the chain-registry/src/*.ts files to this area. -------------------------------------------------------------------------------- /.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "files.exclude": { 3 | "**/.git": true, 4 | "**/.svn": true, 5 | "**/.hg": true, 6 | "**/CVS": true, 7 | "**/.DS_Store": true, 8 | "**/Thumbs.db": true, 9 | "**/.classpath": true, 10 | "**/.project": true, 11 | "**/.settings": true, 12 | "**/.factorypath": true, 13 | "**/node_modules": false 14 | } 15 | } -------------------------------------------------------------------------------- /svelte.config.js: -------------------------------------------------------------------------------- 1 | import adapter from '@sveltejs/adapter-auto'; 2 | import { vitePreprocess } from '@sveltejs/kit/vite'; 3 | 4 | /** @type {import('@sveltejs/kit').Config} */ 5 | const config = { 6 | // Consult https://kit.svelte.dev/docs/integrations#preprocessors 7 | // for more information about preprocessors 8 | preprocess: vitePreprocess(), 9 | 10 | kit: { 11 | adapter: adapter() 12 | } 13 | }; 14 | 15 | export default config; 16 | -------------------------------------------------------------------------------- /.eslintrc.cjs: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | root: true, 3 | parser: '@typescript-eslint/parser', 4 | extends: ['eslint:recommended', 'plugin:@typescript-eslint/recommended', 'prettier'], 5 | plugins: ['svelte3', '@typescript-eslint'], 6 | ignorePatterns: ['*.cjs'], 7 | overrides: [{ files: ['*.svelte'], processor: 'svelte3/svelte3' }], 8 | settings: { 9 | 'svelte3/typescript': () => require('typescript') 10 | }, 11 | parserOptions: { 12 | sourceType: 'module', 13 | ecmaVersion: 2020 14 | }, 15 | env: { 16 | browser: true, 17 | es2017: true, 18 | node: true 19 | } 20 | }; 21 | -------------------------------------------------------------------------------- /tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./.svelte-kit/tsconfig.json", 3 | "compilerOptions": { 4 | "allowJs": true, 5 | "checkJs": true, 6 | "esModuleInterop": true, 7 | "forceConsistentCasingInFileNames": true, 8 | "resolveJsonModule": true, 9 | "skipLibCheck": true, 10 | "sourceMap": true, 11 | "strict": true, 12 | } 13 | // Path aliases are handled by https://kit.svelte.dev/docs/configuration#alias 14 | // 15 | // If you want to overwrite includes/excludes, make sure to copy over the relevant includes/excludes 16 | // from the referenced tsconfig.json - TypeScript does not merge them in 17 | } 18 | -------------------------------------------------------------------------------- /src/app.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | IBC Anywhere 8 | 9 | 10 | 11 | 12 | 13 | %sveltekit.head% 14 | 15 | 16 |
%sveltekit.body%
17 | 18 | 19 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # ibc-anywhere 2 | 3 | 4 | 5 | A simple website interface for transferring tokens with IBC. 6 | The goal is to make it super simple to transfer a token from any network to any other network in which a relayer channel is already setup. 7 | 8 | Currently, the only way to do this is with JunoSwap, Osmosis, but that only transfers to a single network. If you want to transfer your ATOM to a network without a DEX interface, you have to do it manually in Keplr / CLI. This removes that requirement. 9 | 10 | In the future, add support for IBCMemo 11 | 12 | Goal: Make it a few clicks (<4-5) to transfer an IBC packet for ICS-20 (native tokens) to another chain which has a relayer. 13 | 14 | --- 15 | 16 | ## Developing 17 | 18 | Once you've created a project and installed dependencies with `npm install` (or `pnpm install` or `yarn`), start a development server: 19 | 20 | ```bash 21 | npm run dev 22 | ``` 23 | 24 | ## Building 25 | 26 | To create a production version of your app: 27 | 28 | ```bash 29 | npm run build 30 | ``` 31 | 32 | You can preview the production build with `npm run preview`. 33 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "ibc-anywhere", 3 | "version": "0.0.1", 4 | "private": true, 5 | "scripts": { 6 | "dev": "vite dev --port 6001 --host 0.0.0.0", 7 | "build": "vite build", 8 | "preview": "vite preview --port 6001 --host", 9 | "test": "playwright test", 10 | "check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json", 11 | "check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch", 12 | "test:unit": "vitest", 13 | "lint": "prettier --plugin-search-dir . --check . && eslint .", 14 | "format": "prettier --plugin-search-dir . --write ." 15 | }, 16 | "devDependencies": { 17 | "@playwright/test": "^1.28.1", 18 | "@sveltejs/adapter-auto": "^1.0.0", 19 | "@sveltejs/kit": "^1.0.0", 20 | "@typescript-eslint/eslint-plugin": "^5.45.0", 21 | "@typescript-eslint/parser": "^5.45.0", 22 | "eslint": "^8.28.0", 23 | "eslint-config-prettier": "^8.5.0", 24 | "eslint-plugin-svelte3": "^4.0.0", 25 | "prettier": "^2.8.0", 26 | "prettier-plugin-svelte": "^2.8.1", 27 | "svelte": "^3.54.0", 28 | "svelte-check": "^2.9.2", 29 | "tslib": "^2.4.1", 30 | "typescript": "^4.9.3", 31 | "vite": "^4.0.0", 32 | "vitest": "^0.25.3" 33 | }, 34 | "type": "module", 35 | "dependencies": { 36 | "@cosmjs/stargate": "^0.30.1", 37 | "@cosmos-kit/keplr": "^0.32.14", 38 | "chain-registry": "^1.6.0", 39 | "cosmjs-types": "^0.8.0", 40 | "svelte-french-toast": "^1.0.3" 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /src/routes/+page.svelte: -------------------------------------------------------------------------------- 1 | 14 | 497 | 498 | 499 | 500 | 501 | 502 | {#each balances as balance} 503 | 504 | {/each} 505 | 506 | 507 | 508 | 509 | {#each chains as chain} 510 | 511 | {/each} 512 | 513 | 514 | 515 | 516 | {#each balances as denom} 517 | 518 | {/each} 519 | 520 | 521 | 522 | 523 | {#each chains as chain} 524 | 525 | {/each} 526 | 527 | 528 |
529 | 530 |

IBC Anywhere

531 |

Easily IBC token transfer from and to any chain in a few clicks (Get Support)

532 |

Open Source

533 | 534 |
535 | 536 |
537 |
538 |

From Chain

539 |

Type the chain you want and select in in the dropdown box

540 | 547 | 548 | 549 | connect_wallet_get_balances()} /> 550 |
551 | 552 | 623 | 624 | 627 |
628 |
629 | 630 | 704 | --------------------------------------------------------------------------------