From f0edabc649b2864e5bac89870d906e2d6ecdc288 Mon Sep 17 00:00:00 2001 From: omar Date: Sat, 3 Feb 2024 14:29:08 -0800 Subject: [PATCH 1/3] feat: use deployment environments --- .github/workflows/deploy-app.yml | 89 +++++++++++++----- .github/workflows/deploy-site.yml | 91 ++++++++++++++----- ...ish-npm.yml => publish-typescript-sdk.yml} | 41 ++++++++- app/.eslintignore | 1 + app/.npmrc | 6 ++ dictionary.txt | 5 + flake.nix | 2 +- site/package-lock.json | 50 ++++++++-- site/package.json | 4 +- site/site.nix | 2 +- typescript-sdk/package-lock.json | 8 +- typescript-sdk/package.json | 5 +- typescript-sdk/scripts/demo.ts | 24 +++-- typescript-sdk/src/actions.ts | 6 +- typescript-sdk/src/constants/chain.ts | 19 ++-- typescript-sdk/typescript-sdk.nix | 2 +- 16 files changed, 263 insertions(+), 92 deletions(-) rename .github/workflows/{publish-npm.yml => publish-typescript-sdk.yml} (61%) diff --git a/.github/workflows/deploy-app.yml b/.github/workflows/deploy-app.yml index 121be3aea3..60b1aae769 100644 --- a/.github/workflows/deploy-app.yml +++ b/.github/workflows/deploy-app.yml @@ -23,11 +23,13 @@ env: ASTRO_TELEMETRY_DISABLED: true jobs: - deploy: - runs-on: ubuntu-latest + deploy-preview: + runs-on: ['ubuntu-latest'] permissions: write-all env: npm_config_yes: true + environment: 'app-preview' + if: github.event_name == 'pull_request' steps: - name: Checkout uses: actions/checkout@v4 @@ -46,32 +48,14 @@ jobs: - name: Build App run: nix build .#app - # deploy to `https://union.build` when branch is main AND trigger is push OR workflow_dispatch - - name: '[production] 🔶 Publish to Cloudflare Pages' - if: github.ref == 'refs/heads/main' && (github.event_name == 'push' || github.event_name == 'workflow_dispatch') - env: - CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }} - CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_WORKERS_API_TOKEN }} - run: npx --yes wrangler@latest pages --project-name="app" --branch="main" deploy result - - # create preview deployment when trigger is workflow_dispatch && branch is not main - - name: '[workflow-dispatch] 🔶 Publish to Cloudflare Pages' - if: github.event_name == 'workflow_dispatch' && github.ref != '/refs/heads/main' - env: - CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }} - CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_WORKERS_API_TOKEN }} - run: npx --yes wrangler@latest pages --project-name="app" deploy result - # create preview deployment when trigger is pull_request, then post preview deployment url as a pr comment - name: '[preview] 🔶 Publish to Cloudflare Pages' - if: github.event_name == 'pull_request' env: CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }} CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_WORKERS_API_TOKEN }} run: npx --yes wrangler@latest pages --project-name="app" deploy result >> /tmp/app_deploy.txt - name: Set Deploy Output - if: github.event_name == 'pull_request' run: | { echo 'DEPLOY_OUTPUT<> $GITHUB_ENV - name: Comment on Pull Request - if: github.event_name == 'pull_request' uses: actions/github-script@v7 env: LAST_UPDATED_AT: ${{ github.event.repository.updated_at }} @@ -99,7 +82,7 @@ jobs: owner: context.repo.owner, repo: context.repo.repo }) - const [botDeploymentComment] = prComments.data.filter(comment => comment.user?.login === 'github-actions[bot]') + const [botDeploymentComment] = prComments.data.filter(comment => comment.body.includes('App 🤌')) if (!botDeploymentComment) { await github.rest.issues.createComment({ owner: context.repo.owner, @@ -115,3 +98,65 @@ jobs: body: commentBody }) } + + deploy-manual: + runs-on: ['ubuntu-latest'] + permissions: write-all + env: + npm_config_yes: true + if: github.event_name == 'workflow_dispatch' + steps: + - name: Checkout + uses: actions/checkout@v4 + with: + lfs: true + + - name: Install Nix + uses: cachix/install-nix-action@v25 + with: + nix_path: nixpkgs=channel:${{ env.NIXPKGS_CHANNEL }} + github_access_token: ${{ github.token }} + - run: | + nix-channel --add https://nixos.org/channels/${{ env.NIXPKGS_CHANNEL }} nixpkgs + nix-channel --update + + - name: Build App + run: nix build .#app + + # create preview deployment when trigger is workflow_dispatch && branch is not main + - name: '[workflow-dispatch] 🔶 Publish to Cloudflare Pages' + env: + CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }} + CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_WORKERS_API_TOKEN }} + run: npx --yes wrangler@latest pages --project-name="app" deploy result + + deploy-production: + runs-on: ['ubuntu-latest'] + permissions: write-all + env: + npm_config_yes: true + environment: 'app-production' + if: github.event_name == 'push' && github.ref == 'refs/heads/main' + steps: + - name: Checkout + uses: actions/checkout@v4 + with: + lfs: true + + - name: Install Nix + uses: cachix/install-nix-action@v25 + with: + nix_path: nixpkgs=channel:${{ env.NIXPKGS_CHANNEL }} + github_access_token: ${{ github.token }} + - run: | + nix-channel --add https://nixos.org/channels/${{ env.NIXPKGS_CHANNEL }} nixpkgs + nix-channel --update + + - name: Build App + run: nix build .#app + + - name: '[production] 🔶 Publish to Cloudflare Pages' + env: + CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }} + CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_WORKERS_API_TOKEN }} + run: npx --yes wrangler@latest pages --project-name="app" --branch="main" deploy result diff --git a/.github/workflows/deploy-site.yml b/.github/workflows/deploy-site.yml index d82d55808d..19444e73e3 100644 --- a/.github/workflows/deploy-site.yml +++ b/.github/workflows/deploy-site.yml @@ -22,12 +22,15 @@ env: ACTIONS_RUNNER_DEBUG: true ASTRO_TELEMETRY_DISABLED: true + jobs: - deploy: - runs-on: ubuntu-latest + deploy-preview: + runs-on: ['ubuntu-latest'] permissions: write-all env: npm_config_yes: true + environment: 'site-preview' + if: github.event_name == 'pull_request' steps: - name: Checkout uses: actions/checkout@v4 @@ -46,32 +49,13 @@ jobs: - name: Build Site run: nix build .#site - # deploy to `https://union.build` when branch is main AND trigger is push OR workflow_dispatch - - name: '[production] 🔶 Publish to Cloudflare Pages' - if: github.ref == 'refs/heads/main' && (github.event_name == 'push' || github.event_name == 'workflow_dispatch') - env: - CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }} - CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_WORKERS_API_TOKEN }} - run: npx --yes wrangler@latest pages --project-name="site" --branch="main" deploy result - - # create preview deployment when trigger is workflow_dispatch && branch is not main - - name: '[workflow-dispatch] 🔶 Publish to Cloudflare Pages' - if: github.event_name == 'workflow_dispatch' && github.ref != '/refs/heads/main' - env: - CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }} - CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_WORKERS_API_TOKEN }} - run: npx --yes wrangler@latest pages --project-name="site" deploy result - - # create preview deployment when trigger is pull_request, then post preview deployment url as a pr comment - name: '[preview] 🔶 Publish to Cloudflare Pages' - if: github.event_name == 'pull_request' env: CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }} CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_WORKERS_API_TOKEN }} run: npx --yes wrangler@latest pages --project-name="site" deploy result >> /tmp/site_deploy.txt - name: Set Deploy Output - if: github.event_name == 'pull_request' run: | { echo 'DEPLOY_OUTPUT<> $GITHUB_ENV - name: Comment on Pull Request - if: github.event_name == 'pull_request' uses: actions/github-script@v7 env: LAST_UPDATED_AT: ${{ github.event.repository.updated_at }} @@ -99,7 +82,7 @@ jobs: owner: context.repo.owner, repo: context.repo.repo }) - const [botDeploymentComment] = prComments.data.filter(comment => comment.user?.login === 'github-actions[bot]') + const [botDeploymentComment] = prComments.data.filter(comment => comment.body.includes('Site/Docs 🤠')) if (!botDeploymentComment) { await github.rest.issues.createComment({ owner: context.repo.owner, @@ -115,3 +98,65 @@ jobs: body: commentBody }) } + + deploy-manual: + runs-on: ['ubuntu-latest'] + permissions: write-all + env: + npm_config_yes: true + if: github.event_name == 'workflow_dispatch' + steps: + - name: Checkout + uses: actions/checkout@v4 + with: + lfs: true + + - name: Install Nix + uses: cachix/install-nix-action@v25 + with: + nix_path: nixpkgs=channel:${{ env.NIXPKGS_CHANNEL }} + github_access_token: ${{ github.token }} + - run: | + nix-channel --add https://nixos.org/channels/${{ env.NIXPKGS_CHANNEL }} nixpkgs + nix-channel --update + + - name: Build Site + run: nix build .#site + + # create preview deployment when trigger is workflow_dispatch && branch is not main + - name: '[workflow-dispatch] 🔶 Publish to Cloudflare Pages' + env: + CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }} + CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_WORKERS_API_TOKEN }} + run: npx --yes wrangler@latest pages --project-name="site" deploy result + + deploy-production: + runs-on: ['ubuntu-latest'] + permissions: write-all + env: + npm_config_yes: true + environment: 'site-production' + if: github.event_name == 'push' && github.ref == 'refs/heads/main' + steps: + - name: Checkout + uses: actions/checkout@v4 + with: + lfs: true + + - name: Install Nix + uses: cachix/install-nix-action@v25 + with: + nix_path: nixpkgs=channel:${{ env.NIXPKGS_CHANNEL }} + github_access_token: ${{ github.token }} + - run: | + nix-channel --add https://nixos.org/channels/${{ env.NIXPKGS_CHANNEL }} nixpkgs + nix-channel --update + + - name: Build Site + run: nix build .#site + + - name: '[production] 🔶 Publish to Cloudflare Pages' + env: + CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }} + CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_WORKERS_API_TOKEN }} + run: npx --yes wrangler@latest pages --project-name="site" --branch="main" deploy result diff --git a/.github/workflows/publish-npm.yml b/.github/workflows/publish-typescript-sdk.yml similarity index 61% rename from .github/workflows/publish-npm.yml rename to .github/workflows/publish-typescript-sdk.yml index f0b7fb68c8..7e89ff7305 100644 --- a/.github/workflows/publish-npm.yml +++ b/.github/workflows/publish-typescript-sdk.yml @@ -26,6 +26,7 @@ env: jobs: changelog: + # manually temporarily disabled if: false name: 'Generate Changelog' runs-on: ['ubuntu-latest'] @@ -41,9 +42,9 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} publish-npm: + # manually temporarily disabled if: false name: 'Publish NPM Registry' - needs: [changelog] permissions: id-token: write contents: write @@ -79,3 +80,41 @@ jobs: npm publish --access='public' --no-git-checks env: NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} + + publish-github: + name: 'Publish GitHub Package Registry' + permissions: + id-token: write + contents: write + runs-on: ['ubuntu-latest'] + steps: + - name: 'Checkout' + uses: actions/checkout@v4 + + # This is needed to do npm authentication + - name: 'Setup Node.js' + uses: actions/setup-node@v4 + with: + node-version: 'lts/*' + registry-url: 'https://npm.pkg.github.com' + + - name: 'Install Nix' + uses: cachix/install-nix-action@v25 + with: + nix_path: nixpkgs=channel:${{ env.NIXPKGS_CHANNEL }} + github_access_token: ${{ github.token }} + - run: | + nix-channel --add https://nixos.org/channels/${{ env.NIXPKGS_CHANNEL }} nixpkgs + nix-channel --update + + - name: 'Build SDK' + working-directory: './typescript-sdk' + run: | + nix build .#typescript-sdk -o dist + + - name: 'Publish to GitHub Package Registry' + working-directory: './typescript-sdk' + run: | + npm publish --access='public' --no-git-checks + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} diff --git a/app/.eslintignore b/app/.eslintignore index 903ae8ff80..3f942a12ee 100644 --- a/app/.eslintignore +++ b/app/.eslintignore @@ -12,3 +12,4 @@ pnpm-lock.yaml package-lock.json yarn.lock +result diff --git a/app/.npmrc b/app/.npmrc index b6f27f1359..4c32523ec2 100644 --- a/app/.npmrc +++ b/app/.npmrc @@ -1 +1,7 @@ engine-strict=true +registry=https://registry.npmjs.org/ + +@unionlabs:registry=https://npm.pkg.github.com +//npm.pkg.github.com/:_authToken=${GITHUB_TOKEN} +always-auth=true + diff --git a/dictionary.txt b/dictionary.txt index 890692f8c4..916d3f0920 100644 --- a/dictionary.txt +++ b/dictionary.txt @@ -23,6 +23,11 @@ Counterparty DATADIR DYLD Denoms +tanstack +wagmi +vaul +eitherway +Wagmi Devconnect Devs Disket diff --git a/flake.nix b/flake.nix index c8fcf69ca0..70bb1a7b99 100644 --- a/flake.nix +++ b/flake.nix @@ -475,7 +475,7 @@ }; prettier = { enable = true; - excludes = [ "./app" "./app/**/*" ]; + excludes = [ "./app/**/*" ]; }; taplo = { enable = true; }; }; diff --git a/site/package-lock.json b/site/package-lock.json index bf34bc03fc..5a06a1e8ff 100644 --- a/site/package-lock.json +++ b/site/package-lock.json @@ -8,8 +8,8 @@ "name": "site", "version": "0.0.1", "dependencies": { - "@astrojs/markdown-remark": "^4.2.0", - "@astrojs/starlight": "^0.17.1", + "@astrojs/markdown-remark": "^4.2.1", + "@astrojs/starlight": "^0.17.2", "@astrojs/starlight-tailwind": "^2.0.1", "@astrojs/svelte": "^5.0.3", "@astrojs/tailwind": "^5.1.0", @@ -171,9 +171,9 @@ } }, "node_modules/@astrojs/markdown-remark": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/@astrojs/markdown-remark/-/markdown-remark-4.2.0.tgz", - "integrity": "sha512-qQB+LoxmIqzkhLXaQAzfzlBxZU1jeQYailsifurz89WeY0Q8ywIj8uQQSyqxb7rPPg3ZfdNdxsN9lF5UaCRn0w==", + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/@astrojs/markdown-remark/-/markdown-remark-4.2.1.tgz", + "integrity": "sha512-2RQBIwrq+2qPYtp99bH+eL5hfbK0BoxXla85lHsRpIX/IsGqFrPX6pXI2cbWPihBwGbKCdxS6uZNX2QerZWwpQ==", "dependencies": { "@astrojs/prism": "^3.0.0", "github-slugger": "^2.0.0", @@ -232,6 +232,40 @@ "astro": "^4.0.0" } }, + "node_modules/@astrojs/mdx/node_modules/@astrojs/markdown-remark": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/@astrojs/markdown-remark/-/markdown-remark-4.2.0.tgz", + "integrity": "sha512-qQB+LoxmIqzkhLXaQAzfzlBxZU1jeQYailsifurz89WeY0Q8ywIj8uQQSyqxb7rPPg3ZfdNdxsN9lF5UaCRn0w==", + "dependencies": { + "@astrojs/prism": "^3.0.0", + "github-slugger": "^2.0.0", + "import-meta-resolve": "^4.0.0", + "mdast-util-definitions": "^6.0.0", + "rehype-raw": "^7.0.0", + "rehype-stringify": "^10.0.0", + "remark-gfm": "^4.0.0", + "remark-parse": "^11.0.0", + "remark-rehype": "^11.0.0", + "remark-smartypants": "^2.0.0", + "shikiji": "^0.9.18", + "unified": "^11.0.4", + "unist-util-visit": "^5.0.0", + "vfile": "^6.0.1" + } + }, + "node_modules/@astrojs/mdx/node_modules/shikiji": { + "version": "0.9.19", + "resolved": "https://registry.npmjs.org/shikiji/-/shikiji-0.9.19.tgz", + "integrity": "sha512-Kw2NHWktdcdypCj1GkKpXH4o6Vxz8B8TykPlPuLHOGSV8VkhoCLcFOH4k19K4LXAQYRQmxg+0X/eM+m2sLhAkg==", + "dependencies": { + "shikiji-core": "0.9.19" + } + }, + "node_modules/@astrojs/mdx/node_modules/shikiji-core": { + "version": "0.9.19", + "resolved": "https://registry.npmjs.org/shikiji-core/-/shikiji-core-0.9.19.tgz", + "integrity": "sha512-AFJu/vcNT21t0e6YrfadZ+9q86gvPum6iywRyt1OtIPjPFe25RQnYJyxHQPMLKCCWA992TPxmEmbNcOZCAJclw==" + }, "node_modules/@astrojs/prism": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/@astrojs/prism/-/prism-3.0.0.tgz", @@ -253,9 +287,9 @@ } }, "node_modules/@astrojs/starlight": { - "version": "0.17.1", - "resolved": "https://registry.npmjs.org/@astrojs/starlight/-/starlight-0.17.1.tgz", - "integrity": "sha512-Aock5ZRNucVVzv1JfyULUB3Ydoyq4tlJODEgHNdLcCVtReARrZSEmgep0+bR9j/fCKzVOa+05Lh3meoMZ5HMHw==", + "version": "0.17.2", + "resolved": "https://registry.npmjs.org/@astrojs/starlight/-/starlight-0.17.2.tgz", + "integrity": "sha512-2Zme8DobPaocbALX6LqkR8thDxa0RK3qikNccvwzowuYjGMzGvldt524RimFaVB0zTNrtrw2Sp1jamF1KJae8w==", "dependencies": { "@astrojs/mdx": "^2.0.4", "@astrojs/sitemap": "^3.0.4", diff --git a/site/package.json b/site/package.json index 53d4cbfbf1..fea10c8e6b 100644 --- a/site/package.json +++ b/site/package.json @@ -13,8 +13,8 @@ "typecheck": "tsc --project tsconfig.json --noEmit" }, "dependencies": { - "@astrojs/markdown-remark": "^4.2.0", - "@astrojs/starlight": "^0.17.1", + "@astrojs/markdown-remark": "^4.2.1", + "@astrojs/starlight": "^0.17.2", "@astrojs/starlight-tailwind": "^2.0.1", "@astrojs/svelte": "^5.0.3", "@astrojs/tailwind": "^5.1.0", diff --git a/site/site.nix b/site/site.nix index 35972cce0e..0529ecba68 100644 --- a/site/site.nix +++ b/site/site.nix @@ -4,7 +4,7 @@ in { packages = { site = pkgs.buildNpmPackage { - npmDepsHash = "sha256-4Ugv1rZpDcOUq2dvWsZ5Kg8cWA7yeQGbgHsFBYxx0/E="; + npmDepsHash = "sha256-4YjZqfA13yM8XX+N18UkHtT6CddFIETntuuXyFRn59g="; src = ./.; srcs = [ ./. ./../evm/. ]; sourceRoot = "site"; diff --git a/typescript-sdk/package-lock.json b/typescript-sdk/package-lock.json index ee6ce166b5..4521f49c96 100644 --- a/typescript-sdk/package-lock.json +++ b/typescript-sdk/package-lock.json @@ -12,7 +12,7 @@ "@cosmjs/encoding": "^0.32.2", "@cosmjs/stargate": "^0.32.2", "@cosmjs/tendermint-rpc": "^0.32.2", - "viem": "^2.7.1" + "viem": "^2.7.2" }, "devDependencies": { "@arethetypeswrong/cli": "^0.13.6", @@ -4221,9 +4221,9 @@ } }, "node_modules/viem": { - "version": "2.7.1", - "resolved": "https://registry.npmjs.org/viem/-/viem-2.7.1.tgz", - "integrity": "sha512-izAX2KedTFnI2l0ZshtnlK2ZuDvSlKeuaanWyNwC4ffDgrCGtwX1bvVXO3Krh53lZgqvjd8UGpjGaBl3WqJ4yQ==", + "version": "2.7.2", + "resolved": "https://registry.npmjs.org/viem/-/viem-2.7.2.tgz", + "integrity": "sha512-uRoD9ACARMrQG24rmXAqSJh0Sph5RkE6QP7FspmIs1XtuJIT8eS7B57f03oAUi2h/v564qmu9wv1mK/xB+XghA==", "funding": [ { "type": "github", diff --git a/typescript-sdk/package.json b/typescript-sdk/package.json index 05f9f71966..91ecafd9ae 100644 --- a/typescript-sdk/package.json +++ b/typescript-sdk/package.json @@ -39,7 +39,7 @@ "@cosmjs/encoding": "^0.32.2", "@cosmjs/stargate": "^0.32.2", "@cosmjs/tendermint-rpc": "^0.32.2", - "viem": "^2.7.1" + "viem": "^2.7.2" }, "devDependencies": { "@arethetypeswrong/cli": "^0.13.6", @@ -65,8 +65,5 @@ "node": ">=18" }, "engineStrict": true, - "publishConfig": { - "access": "public" - }, "sideEffects": false } diff --git a/typescript-sdk/scripts/demo.ts b/typescript-sdk/scripts/demo.ts index 0e32c94b8a..b70ba996d1 100644 --- a/typescript-sdk/scripts/demo.ts +++ b/typescript-sdk/scripts/demo.ts @@ -61,17 +61,21 @@ async function main() { }) .then((_) => console.log({ sendAssetFromEthereumToUnion: _ })); - const balanceOnEthereum = await client.getBalance({ - chainId: "11155111", - address: demoEthereumAddress, - assetId: sepolia.token.address, - }); + await client + .getBalance({ + chainId: "11155111", + address: demoEthereumAddress, + assetId: sepolia.token.address, + }) + .then((_) => console.log({ balanceOnSepolia: _ })); - const balanceOnUnion = await client.getBalance({ - chainId: "32382", - address: demoUnionAddress, - assetId: unionTestnet.token.denom, - }); + await client + .getBalance({ + chainId: "32382", + address: demoUnionAddress, + assetId: unionTestnet.token.denom, + }) + .then((_) => console.log({ balanceOnUnion: _ })); await client .sendAsset({ diff --git a/typescript-sdk/src/actions.ts b/typescript-sdk/src/actions.ts index da8c68384a..7cc509934c 100644 --- a/typescript-sdk/src/actions.ts +++ b/typescript-sdk/src/actions.ts @@ -2,12 +2,12 @@ import type { ChainId } from "#/constants/chain.ts"; import type { ExecuteResult } from "@cosmjs/cosmwasm-stargate"; import { type GetBalanceParameters, getBalance } from "#/balance.ts"; import type { - Account, + Hash, Chain, Client, - Hash, - PublicActions, + Account, Transport, + PublicActions, WalletActions, } from "viem"; import { diff --git a/typescript-sdk/src/constants/chain.ts b/typescript-sdk/src/constants/chain.ts index fadbbd8ab5..bc173ef49b 100644 --- a/typescript-sdk/src/constants/chain.ts +++ b/typescript-sdk/src/constants/chain.ts @@ -11,33 +11,30 @@ export const chain = { ethereum: { sepolia: { ...sepolia, - portId: process.env.UCS01_SEPOLIA_PORT_ID ?? "ucs01-relay", - channelId: process.env.UCS01_SEPOLIA_SOURCE_CHANNEL ?? "channel-0", + portId: process.env.UCS01_SEPOLIA_PORT_ID, + channelId: process.env.UCS01_SEPOLIA_SOURCE_CHANNEL, token: { name: "Union", symbol: "UNO", denom: "muno", decimals: 6, - address: - process.env.MUNO_ERC20_ADDRESS ?? - "0xbCe4f3C33B330800ac11208e2726a8551B3d0E99", + address: process.env.MUNO_ERC20_ADDRESS, }, }, }, union: { testnet: { - name: "union-testnet-1", + name: "union-testnet-5", id: 32_382, - channelId: process.env.UCS01_UNION_SOURCE_CHANNEL ?? "channel-3", + channelId: process.env.UCS01_UNION_SOURCE_CHANNEL, rpcUrls: { default: { /** * @see https://docs.union.build/joining_the_testnet/public_endpoints#rpc */ http: [ + "https://rpc.testnet.bonlulu.uno", "https://union-testnet-rpc.polkachu.com", - "https://rpc-union-testnet-01.stakeflow.io", - "https://rpc-t.union.nodestake.top", ], }, }, @@ -51,9 +48,7 @@ export const chain = { symbol: "UNO", denom: "muno", decimals: 6, - address: - process.env.UCS01_UNION_ADDRESS ?? - "union1mkdwqejs8ph0q0cu4n285g83e4zmsjxdjncjl8rpktgd02jy6gwslm960p", + address: process.env.UCS01_UNION_ADDRESS, }, }, }, diff --git a/typescript-sdk/typescript-sdk.nix b/typescript-sdk/typescript-sdk.nix index 4feb0f0979..0b10af7b00 100644 --- a/typescript-sdk/typescript-sdk.nix +++ b/typescript-sdk/typescript-sdk.nix @@ -4,7 +4,7 @@ in { packages = { typescript-sdk = pkgs.buildNpmPackage { - npmDepsHash = "sha256-yqPn+Ff88Yy0AiC9k7s6PIpU8+WGXkTSdwk5INapixE="; + npmDepsHash = "sha256-/abjhwdvvagufSsZI7xSppotS72AH9jq/DjUUXdDYRg="; src = ./.; pname = "@unionlabs/client"; version = "0.0.0"; From bbe7a01bc0c9a51ee73cabbcd8d55a4872953ec3 Mon Sep 17 00:00:00 2001 From: omar Date: Sat, 3 Feb 2024 14:35:43 -0800 Subject: [PATCH 2/3] chore: make gpr publishing private --- .github/workflows/publish-typescript-sdk.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/publish-typescript-sdk.yml b/.github/workflows/publish-typescript-sdk.yml index 7e89ff7305..4dece9d8de 100644 --- a/.github/workflows/publish-typescript-sdk.yml +++ b/.github/workflows/publish-typescript-sdk.yml @@ -115,6 +115,6 @@ jobs: - name: 'Publish to GitHub Package Registry' working-directory: './typescript-sdk' run: | - npm publish --access='public' --no-git-checks + npm publish --access='private' --no-git-checks env: NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} From 35d59c2bb66fe5af445b997e069565003c1b875e Mon Sep 17 00:00:00 2001 From: omar Date: Sat, 3 Feb 2024 15:26:04 -0800 Subject: [PATCH 3/3] chore: update dictionary --- dictionary.txt | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/dictionary.txt b/dictionary.txt index 916d3f0920..92a3b6404b 100644 --- a/dictionary.txt +++ b/dictionary.txt @@ -23,11 +23,6 @@ Counterparty DATADIR DYLD Denoms -tanstack -wagmi -vaul -eitherway -Wagmi Devconnect Devs Disket @@ -125,6 +120,7 @@ Unjail Unmarshal Verkle Viridis +Wagmi Woestijne Wrapf XMSB @@ -309,6 +305,7 @@ dyld dylib echarts eget +eitherway elems eligendi elit @@ -729,6 +726,7 @@ symlinker syncmode tablist tailwindcss +tanstack taplo teku tempdir @@ -834,6 +832,7 @@ valoper valoperpub valset varint +vaul vercel verison verkle @@ -843,6 +842,7 @@ viem virtualisation vmdebug vuex +wagmi wakey wasi wasmd