From 7eb55c61b6e014c11f24bc3a9d03552380d7397d Mon Sep 17 00:00:00 2001 From: Dmytro Date: Mon, 16 Dec 2024 15:58:18 +0000 Subject: [PATCH] Update dictionary submodule, add test and publish pipelines for viem --- .github/workflows/publish.yml | 52 ++++++++++++++++++++++++++++++ .github/workflows/test.yml | 30 +++++++++++++++++ dictionary | 2 +- typescript/viem/src/viemAdapter.ts | 1 + 4 files changed, 84 insertions(+), 1 deletion(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index ea9e286..fe1d8e5 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -162,6 +162,58 @@ jobs: with: tag: typescript-ethers-v6-${{ env.VERSION }} prerelease: ${{ env.PRERELEASE }} + + viem: + runs-on: ubuntu-latest + + needs: + typescript + + defaults: + run: + working-directory: typescript/viem + + steps: + - uses: actions/checkout@v3 + + - name: Set up Node + uses: actions/setup-node@v3 + with: + node-version: ${{ env.NODE_VERSION }} + + - name: Install base project + run: | + yarn ../base + yarn ../base compile + + - name: Install project + run: yarn + + - name: Compile typescript + run: yarn compile + + - name: Determine version + run: | + export BRANCH=${GITHUB_REF##*/} + echo "BRANCH=$BRANCH" >> $GITHUB_ENV + echo "Branch $BRANCH" + export VERSION=$(CURRENT=true bash ../scripts/calculate_version.sh) + echo "VERSION=$VERSION" >> $GITHUB_ENV + echo "Version $VERSION" + ( test $BRANCH = "stable" && export PRERELEASE=false ) || export PRERELEASE=true + echo "PRERELEASE=$PRERELEASE" >> $GITHUB_ENV + + - name: Publish NPM package + run: ./scripts/publish_package.sh + env: + BRANCH: ${{ env.BRANCH }} + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} + + - name: Create Release + uses: ncipollo/release-action@v1 + with: + tag: typescript-viem-${{ env.VERSION }} + prerelease: ${{ env.PRERELEASE }} python: runs-on: ubuntu-latest diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 760f926..262d857 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -109,6 +109,36 @@ jobs: - name: Run static checks run: yarn fullCheck + + viem: + runs-on: ubuntu-latest + + strategy: + matrix: + node-version: [18, 20, 22] + + defaults: + run: + working-directory: typescript/viem + + steps: + - uses: actions/checkout@v3 + + - name: Set up Node + uses: actions/setup-node@v3 + with: + node-version: ${{ matrix.node-version }} + + - name: Install base project + run: | + yarn ../base + yarn ../base compile + + - name: Install project + run: yarn + + - name: Run static checks + run: yarn fullCheck python: runs-on: ubuntu-latest diff --git a/dictionary b/dictionary index cb48388..54615bb 160000 --- a/dictionary +++ b/dictionary @@ -1 +1 @@ -Subproject commit cb48388ffc15af680430e2174bb51ebc61c3ce0c +Subproject commit 54615bb7a4206d40143cb48862b2516aaeff8be3 diff --git a/typescript/viem/src/viemAdapter.ts b/typescript/viem/src/viemAdapter.ts index e83deb2..ec0d0cc 100644 --- a/typescript/viem/src/viemAdapter.ts +++ b/typescript/viem/src/viemAdapter.ts @@ -42,6 +42,7 @@ export class ViemAdapter implements Adapter { return BigInt(chainId); } + // eslint-disable-next-line class-methods-use-this isAddress(value: string): boolean { return isAddress(value); }