diff --git a/.github/workflows/tests-release.yml b/.github/workflows/tests-release.yml new file mode 100644 index 00000000..0443e399 --- /dev/null +++ b/.github/workflows/tests-release.yml @@ -0,0 +1,148 @@ +name: Tests Release +on: + pull_request: + branches: + - main + +jobs: + test-release: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v3 + with: + submodules: true + + - name: Use Node 18.x + uses: actions/setup-node@v3 + with: + node-version: 18 + + - name: Install dependencies + run: npm ci + + - name: Lint + run: npm run lint + + - name: Test + env: + NEXT_PUBLIC_API_URL: ${{ secrets.NEXT_PUBLIC_API_URL }} + run: npm test + + "e2e-test-noble-usdc-injective-inj": + timeout-minutes: 20 + runs-on: ubuntu-latest + container: + image: mcr.microsoft.com/playwright:v1.38.0-jammy + steps: + - name: Waiting for 200 from the Vercel Preview + uses: patrickedqvist/wait-for-vercel-preview@v1.3.1 + id: waitFor200 + with: + token: ${{ secrets.GITHUB_TOKEN }} + check_interval: 15 + max_timeout: 1200 + - name: Checkout + uses: actions/checkout@v3 + with: + submodules: true + - run: git config --system --add safe.directory /__w/ibc-dot-fun/ibc-dot-fun + - uses: actions/setup-node@v3 + with: + node-version: 18 + - name: Install dependencies + run: npm ci + - name: Install Playwright Browsers + run: npx playwright install --with-deps + - name: Run Playwright tests + env: + WORD_PHRASE_KEY: ${{ secrets.WORD_PHRASE_KEY }} + POLKACHU_USER: ${{ secrets.WORD_PHRASE_KEY }} + POLKACHU_PASSWORD: ${{ secrets.POLKACHU_PASSWORD }} + NEXT_PUBLIC_EDGE_CONFIG: ${{ secrets.NEXT_PUBLIC_EDGE_CONFIG }} + PLAYWRIGHT_TEST_BASE_URL: ${{ steps.waitFor200.outputs.url }} + run: xvfb-run --auto-servernum --server-args='-screen 0, 1920x1080x24' npm run test:e2e-1 + - uses: actions/upload-artifact@v3 + if: always() + with: + name: playwright-report + path: playwright-report/ + retention-days: 30 + "e2e-test-injective-inj-cosmoshub-atom": + timeout-minutes: 20 + runs-on: ubuntu-latest + container: + image: mcr.microsoft.com/playwright:v1.38.0-jammy + steps: + - name: Waiting for 200 from the Vercel Preview + uses: patrickedqvist/wait-for-vercel-preview@v1.3.1 + id: waitFor200 + with: + token: ${{ secrets.GITHUB_TOKEN }} + check_interval: 15 + max_timeout: 1200 + - name: Checkout + uses: actions/checkout@v3 + with: + submodules: true + - run: git config --system --add safe.directory /__w/ibc-dot-fun/ibc-dot-fun + - uses: actions/setup-node@v3 + with: + node-version: 18 + - name: Install dependencies + run: npm ci + - name: Install Playwright Browsers + run: npx playwright install --with-deps + - name: Run Playwright tests + env: + WORD_PHRASE_KEY: ${{ secrets.WORD_PHRASE_KEY }} + POLKACHU_USER: ${{ secrets.WORD_PHRASE_KEY }} + POLKACHU_PASSWORD: ${{ secrets.POLKACHU_PASSWORD }} + NEXT_PUBLIC_EDGE_CONFIG: ${{ secrets.NEXT_PUBLIC_EDGE_CONFIG }} + PLAYWRIGHT_TEST_BASE_URL: ${{ steps.waitFor200.outputs.url }} + run: xvfb-run --auto-servernum --server-args='-screen 0, 1920x1080x24' npm run test:e2e-2 + - uses: actions/upload-artifact@v3 + if: always() + with: + name: playwright-report + path: playwright-report/ + retention-days: 30 + "e2e-test-cosmoshub-atom-noble-usdc": + timeout-minutes: 20 + runs-on: ubuntu-latest + container: + image: mcr.microsoft.com/playwright:v1.38.0-jammy + steps: + - name: Waiting for 200 from the Vercel Preview + uses: patrickedqvist/wait-for-vercel-preview@v1.3.1 + id: waitFor200 + with: + token: ${{ secrets.GITHUB_TOKEN }} + check_interval: 15 + max_timeout: 1200 + - name: Checkout + uses: actions/checkout@v3 + with: + submodules: true + - run: git config --system --add safe.directory /__w/ibc-dot-fun/ibc-dot-fun + - uses: actions/setup-node@v3 + with: + node-version: 18 + - name: Install dependencies + run: npm ci + - name: Install Playwright Browsers + run: npx playwright install --with-deps + - name: Run Playwright tests + env: + WORD_PHRASE_KEY: ${{ secrets.WORD_PHRASE_KEY }} + POLKACHU_USER: ${{ secrets.WORD_PHRASE_KEY }} + POLKACHU_PASSWORD: ${{ secrets.POLKACHU_PASSWORD }} + NEXT_PUBLIC_EDGE_CONFIG: ${{ secrets.NEXT_PUBLIC_EDGE_CONFIG }} + PLAYWRIGHT_TEST_BASE_URL: ${{ steps.waitFor200.outputs.url }} + run: xvfb-run --auto-servernum --server-args='-screen 0, 1920x1080x24' npm run test:e2e-3 + - uses: actions/upload-artifact@v3 + if: always() + with: + name: playwright-report + path: playwright-report/ + retention-days: 30 diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index aa49ccd2..721050d0 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -25,121 +25,3 @@ jobs: env: NEXT_PUBLIC_API_URL: ${{ secrets.NEXT_PUBLIC_API_URL }} run: npm test - - "e2e-test-noble-usdc-injective-inj": - timeout-minutes: 20 - runs-on: ubuntu-latest - container: - image: mcr.microsoft.com/playwright:v1.38.0-jammy - steps: - - name: Waiting for 200 from the Vercel Preview - uses: patrickedqvist/wait-for-vercel-preview@v1.3.1 - id: waitFor200 - with: - token: ${{ secrets.GITHUB_TOKEN }} - check_interval: 15 - max_timeout: 1200 - - name: Checkout - uses: actions/checkout@v3 - with: - submodules: true - - run: git config --system --add safe.directory /__w/ibc-dot-fun/ibc-dot-fun - - uses: actions/setup-node@v3 - with: - node-version: 18 - - name: Install dependencies - run: npm ci - - name: Install Playwright Browsers - run: npx playwright install --with-deps - - name: Run Playwright tests - env: - WORD_PHRASE_KEY: ${{ secrets.WORD_PHRASE_KEY }} - POLKACHU_USER: ${{ secrets.WORD_PHRASE_KEY }} - POLKACHU_PASSWORD: ${{ secrets.POLKACHU_PASSWORD }} - NEXT_PUBLIC_EDGE_CONFIG: ${{ secrets.NEXT_PUBLIC_EDGE_CONFIG }} - PLAYWRIGHT_TEST_BASE_URL: ${{ steps.waitFor200.outputs.url }} - run: xvfb-run --auto-servernum --server-args='-screen 0, 1920x1080x24' npm run test:e2e-1 - - uses: actions/upload-artifact@v3 - if: always() - with: - name: playwright-report - path: playwright-report/ - retention-days: 30 - "e2e-test-injective-inj-cosmoshub-atom": - timeout-minutes: 20 - runs-on: ubuntu-latest - container: - image: mcr.microsoft.com/playwright:v1.38.0-jammy - steps: - - name: Waiting for 200 from the Vercel Preview - uses: patrickedqvist/wait-for-vercel-preview@v1.3.1 - id: waitFor200 - with: - token: ${{ secrets.GITHUB_TOKEN }} - check_interval: 15 - max_timeout: 1200 - - name: Checkout - uses: actions/checkout@v3 - with: - submodules: true - - run: git config --system --add safe.directory /__w/ibc-dot-fun/ibc-dot-fun - - uses: actions/setup-node@v3 - with: - node-version: 18 - - name: Install dependencies - run: npm ci - - name: Install Playwright Browsers - run: npx playwright install --with-deps - - name: Run Playwright tests - env: - WORD_PHRASE_KEY: ${{ secrets.WORD_PHRASE_KEY }} - POLKACHU_USER: ${{ secrets.WORD_PHRASE_KEY }} - POLKACHU_PASSWORD: ${{ secrets.POLKACHU_PASSWORD }} - NEXT_PUBLIC_EDGE_CONFIG: ${{ secrets.NEXT_PUBLIC_EDGE_CONFIG }} - PLAYWRIGHT_TEST_BASE_URL: ${{ steps.waitFor200.outputs.url }} - run: xvfb-run --auto-servernum --server-args='-screen 0, 1920x1080x24' npm run test:e2e-2 - - uses: actions/upload-artifact@v3 - if: always() - with: - name: playwright-report - path: playwright-report/ - retention-days: 30 - "e2e-test-cosmoshub-atom-noble-usdc": - timeout-minutes: 20 - runs-on: ubuntu-latest - container: - image: mcr.microsoft.com/playwright:v1.38.0-jammy - steps: - - name: Waiting for 200 from the Vercel Preview - uses: patrickedqvist/wait-for-vercel-preview@v1.3.1 - id: waitFor200 - with: - token: ${{ secrets.GITHUB_TOKEN }} - check_interval: 15 - max_timeout: 1200 - - name: Checkout - uses: actions/checkout@v3 - with: - submodules: true - - run: git config --system --add safe.directory /__w/ibc-dot-fun/ibc-dot-fun - - uses: actions/setup-node@v3 - with: - node-version: 18 - - name: Install dependencies - run: npm ci - - name: Install Playwright Browsers - run: npx playwright install --with-deps - - name: Run Playwright tests - env: - WORD_PHRASE_KEY: ${{ secrets.WORD_PHRASE_KEY }} - POLKACHU_USER: ${{ secrets.WORD_PHRASE_KEY }} - POLKACHU_PASSWORD: ${{ secrets.POLKACHU_PASSWORD }} - NEXT_PUBLIC_EDGE_CONFIG: ${{ secrets.NEXT_PUBLIC_EDGE_CONFIG }} - PLAYWRIGHT_TEST_BASE_URL: ${{ steps.waitFor200.outputs.url }} - run: xvfb-run --auto-servernum --server-args='-screen 0, 1920x1080x24' npm run test:e2e-3 - - uses: actions/upload-artifact@v3 - if: always() - with: - name: playwright-report - path: playwright-report/ - retention-days: 30 diff --git a/chain-registry b/chain-registry index b8c0f4e7..5d657626 160000 --- a/chain-registry +++ b/chain-registry @@ -1 +1 @@ -Subproject commit b8c0f4e7ad94493d9c52fed2db5a8b8fb11eb6fb +Subproject commit 5d657626086f156c08ebf92831c31e1d40346b54 diff --git a/initia-registry b/initia-registry index 188125b0..a25fc5e6 160000 --- a/initia-registry +++ b/initia-registry @@ -1 +1 @@ -Subproject commit 188125b0018fc70c947b2ced4aef9ddb31d41c03 +Subproject commit a25fc5e6d676b0e3d6dc1ee899c6b854ed0ae148 diff --git a/package-lock.json b/package-lock.json index 5bc07dee..4ea5fbe3 100644 --- a/package-lock.json +++ b/package-lock.json @@ -32,6 +32,7 @@ "@fontsource/jost": "^5.0.16", "@graz-sh/types": "^0.0.14", "@heroicons/react": "^2.1.1", + "@initia/initia-registry-types": "^0.0.12", "@injectivelabs/sdk-ts": "^1.14.5", "@injectivelabs/utils": "^1.14.5", "@keplr-wallet/types": "^0.12.66", @@ -43,7 +44,7 @@ "@radix-ui/react-switch": "^1.0.3", "@radix-ui/react-tooltip": "^1.0.7", "@sentry/nextjs": "^7.99.0", - "@skip-router/core": "2.0.3", + "@skip-router/core": "2.0.5", "@solana/spl-token": "^0.4.1", "@solana/wallet-adapter-react": "^0.15.35", "@solana/wallet-adapter-wallets": "^0.19.31", @@ -6755,6 +6756,14 @@ "google-protobuf": "^3.14.0" } }, + "node_modules/@initia/initia-registry-types": { + "version": "0.0.12", + "resolved": "https://registry.npmjs.org/@initia/initia-registry-types/-/initia-registry-types-0.0.12.tgz", + "integrity": "sha512-7ay1q0vgAkMamAkNRIO6CTjwGfUg/Z3MSh6PehynSn11eJ3X+UMJVNs9mewWqjijz1ofMQkiUpt/7gVtzSPtLw==", + "dependencies": { + "zod": "^3.22.4" + } + }, "node_modules/@injectivelabs/core-proto-ts": { "version": "0.0.21", "resolved": "https://registry.npmjs.org/@injectivelabs/core-proto-ts/-/core-proto-ts-0.0.21.tgz", @@ -13464,17 +13473,17 @@ } }, "node_modules/@skip-router/core": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/@skip-router/core/-/core-2.0.3.tgz", - "integrity": "sha512-1cWiz5jXKwx7N/T4inaQtm3Y+ZJGAlUUhh3cHATFQ1srm+CNiD38Ec7k6Zb4BPiTlFb9P0jnM2+LrOQ1ZyLVyQ==", - "dependencies": { - "@cosmjs/amino": "0.31.x", - "@cosmjs/cosmwasm-stargate": "0.31.x", - "@cosmjs/encoding": "0.31.x", - "@cosmjs/math": "0.31.x", - "@cosmjs/proto-signing": "0.31.x", - "@cosmjs/stargate": "0.31.x", - "@cosmjs/tendermint-rpc": "0.31.x", + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/@skip-router/core/-/core-2.0.5.tgz", + "integrity": "sha512-sL/A7I64dUoyn2rLplXqpQaddx0y7Qu7w+Zf0USdnncdgB6nyIDNpJlsUFCG2VjCfjFXWgFwpLFtV/jXa1vCqA==", + "dependencies": { + "@cosmjs/amino": "0.32.3", + "@cosmjs/cosmwasm-stargate": "0.32.3", + "@cosmjs/encoding": "0.32.3", + "@cosmjs/math": "0.32.3", + "@cosmjs/proto-signing": "0.32.3", + "@cosmjs/stargate": "0.32.3", + "@cosmjs/tendermint-rpc": "0.32.3", "@injectivelabs/core-proto-ts": "0.0.x", "@injectivelabs/sdk-ts": "1.x", "@keplr-wallet/unit": "^0.12.67", @@ -13487,7 +13496,7 @@ "viem": "2.x" }, "peerDependencies": { - "chain-registry": "^1.28.0" + "chain-registry": "^1.33.11" } }, "node_modules/@skip-router/core/node_modules/@keplr-wallet/unit": { @@ -19610,18 +19619,18 @@ "integrity": "sha512-GWlXN4wiz0vdWWXBU71Dvc1q3aBo0HytqwAZnXF1wOwjqNnDWA1vZ1gDMFLlqohak31VQzmhiYfiCX5QSSfagA==" }, "node_modules/chain-registry": { - "version": "1.30.0", - "resolved": "https://registry.npmjs.org/chain-registry/-/chain-registry-1.30.0.tgz", - "integrity": "sha512-F1CzsWARx+B066JOLmEi58BorOIAmxm3pF/RqyRM21qUNVfeHPZjCh1JBjUyk8GgoK21e9aUxmcPlf7gZM0prA==", + "version": "1.33.18", + "resolved": "https://registry.npmjs.org/chain-registry/-/chain-registry-1.33.18.tgz", + "integrity": "sha512-6UOntjjmHRDk/+BdvT7Lq3x65p3Av5MHBCOLccXtoO9Pocj+wmkU/qhSTZ5Sg37/jdOK5WVZ5/pkk21yl623Gw==", "dependencies": { "@babel/runtime": "^7.21.0", - "@chain-registry/types": "^0.18.1" + "@chain-registry/types": "^0.18.13" } }, "node_modules/chain-registry/node_modules/@chain-registry/types": { - "version": "0.18.1", - "resolved": "https://registry.npmjs.org/@chain-registry/types/-/types-0.18.1.tgz", - "integrity": "sha512-H/UnOyd7WdcWHa2FGKxy4MclDDFrbE2rFwaUh9oubNJOey7UBI4dNF10oZIWM/1by15LUgDz45fVbh6uA6W5Tg==", + "version": "0.18.13", + "resolved": "https://registry.npmjs.org/@chain-registry/types/-/types-0.18.13.tgz", + "integrity": "sha512-E76M+9ldLxjzKYl6XOVqTraI8PpSbxJlmELIRfqubGm1hzaZT4RSFmeYdAILVllx2DUmkx8bjLSKB4CB9o6d/A==", "dependencies": { "@babel/runtime": "^7.21.0" } diff --git a/package.json b/package.json index c6cbbca4..953f72b0 100644 --- a/package.json +++ b/package.json @@ -53,6 +53,7 @@ "@fontsource/jost": "^5.0.16", "@graz-sh/types": "^0.0.14", "@heroicons/react": "^2.1.1", + "@initia/initia-registry-types": "^0.0.12", "@injectivelabs/sdk-ts": "^1.14.5", "@injectivelabs/utils": "^1.14.5", "@keplr-wallet/types": "^0.12.66", @@ -64,7 +65,7 @@ "@radix-ui/react-switch": "^1.0.3", "@radix-ui/react-tooltip": "^1.0.7", "@sentry/nextjs": "^7.99.0", - "@skip-router/core": "2.0.3", + "@skip-router/core": "2.0.5", "@solana/spl-token": "^0.4.1", "@solana/wallet-adapter-react": "^0.15.35", "@solana/wallet-adapter-wallets": "^0.19.31", diff --git a/src/components/RouteDisplay/__test__/make-step.test.tsx b/src/components/RouteDisplay/__test__/make-step.test.tsx index b54c3299..6131c93b 100644 --- a/src/components/RouteDisplay/__test__/make-step.test.tsx +++ b/src/components/RouteDisplay/__test__/make-step.test.tsx @@ -6,7 +6,7 @@ import { makeStepState } from "../make-step-state"; import { cosmoshubATOMToAkashATOM } from "./route-to-test"; import { createRoute } from "./utils"; -test("make-step: Noble USDC to Injective INJ", async () => { +test("make-step: cosmoshub ATOM to Akash ATOM", async () => { const { direction, amount, sourceAsset, sourceAssetChainID, destinationAsset, destinationAssetChainID, swapVenue } = cosmoshubATOMToAkashATOM; @@ -43,7 +43,7 @@ test("make-step: Noble USDC to Injective INJ", async () => { txs: [ { chainID: "cosmoshub-4", - txHash: "F1852511F30AE8F1EC95C494963FD0B00CA5CB1BB684F6FFB4B1DE34AF33C6B7", + txHash: "F793B9F1ABCA715FF4706004AA4E220E6F0E5BE79CA97D5FD799BF6FD27BE036", }, ], enabled: true,