diff --git a/.github/workflows/dapp-deploy.yml b/.github/workflows/dapp-deploy.yml index b987c59..da6d92f 100644 --- a/.github/workflows/dapp-deploy.yml +++ b/.github/workflows/dapp-deploy.yml @@ -1,4 +1,4 @@ -name: Deploy DApp Contract +name: deploy-dapp on: workflow_dispatch: @@ -8,77 +8,60 @@ on: required: true type: choice options: - - dapp-dev - - dapp-prod - sconify-version: - description: 'Version of the sconify image to use' + - bellecour-dev + - arbitrum-sepolia-dev + price: + description: 'Sell order price (optionnel)' type: string - default: '5.9.0-v15' - -env: - DEPLOY_ENVIRONMENT: ${{ inputs.environment }} + required: false + default: '' + volume: + description: 'Sell order volume (optionnel)' + type: string + required: false + default: '' jobs: - build-and-push: + extract-tag: runs-on: ubuntu-latest outputs: - image-name: ${{ steps.set-outputs.outputs.image-name }} - image-tag: ${{ steps.set-outputs.outputs.image-tag }} + clean_tag: ${{ steps.tag.outputs.clean_tag }} steps: - name: Checkout code uses: actions/checkout@v4 - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v3 - - - name: Login to DockerHub - uses: docker/login-action@v3 - with: - username: ${{ secrets.DOCKERHUB_USERNAME }} - password: ${{ secrets.DOCKERHUB_PAT }} - - - name: Get dapp version - id: version - run: | - VERSION=$(node -p "require('./dapp/package.json').version") - echo "version=$VERSION" >> $GITHUB_OUTPUT - echo "dapp-version=$VERSION" - - - name: Set image tag - id: image-tag + - name: Extract tag + id: tag run: | - if [ "${{ inputs.environment }}" = "dapp-dev" ]; then - echo "image-tag=dev-${{ steps.version.outputs.version }}" >> $GITHUB_OUTPUT - else - echo "image-tag=${{ steps.version.outputs.version }}" >> $GITHUB_OUTPUT - fi - - - name: Build and push Docker image - id: build - uses: docker/build-push-action@v5 - with: - context: ./dapp - push: true - tags: iexechub/web3telegram-dapp:${{ steps.image-tag.outputs.image-tag }} - cache-from: type=gha - cache-to: type=gha,mode=max + echo "clean_tag=dev" | tee -a $GITHUB_OUTPUT - - name: Set outputs - id: set-outputs - run: | - echo "image-name=iexechub/web3telegram-dapp" >> $GITHUB_OUTPUT - echo "image-tag=${{ steps.image-tag.outputs.image-tag }}" >> $GITHUB_OUTPUT + docker-publish: + uses: iExecBlockchainComputing/github-actions-workflows/.github/workflows/docker-build.yml@docker-build-v2.3.1 + needs: [extract-tag] + with: + image-name: 'iexechub/web3telegram-dapp' + registry: 'docker.io' + dockerfile: 'dapp/Dockerfile' + context: 'dapp' + security-scan: true + security-report: 'sarif' + hadolint: true + push: true + image-tag: ${{ needs.extract-tag.outputs.clean_tag }} + secrets: + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_PAT }} sconify: - needs: build-and-push uses: iExecBlockchainComputing/github-actions-workflows/.github/workflows/sconify.yml@sconify-v2.0.0 + needs: [docker-publish, extract-tag] with: - image-name: ${{ needs.build-and-push.outputs.image-name }} - image-tag: ${{ needs.build-and-push.outputs.image-tag }} + image-name: 'iexechub/web3telegram-dapp' + image-tag: ${{ needs.extract-tag.outputs.clean_tag }} sconify-debug: false sconify-prod: true docker-registry: docker.io - sconify-version: ${{ inputs.sconify-version }} + sconify-version: '5.9.0-v15' binary: /usr/local/bin/node command: node /app/src/app.js host-path: | @@ -90,33 +73,16 @@ jobs: dlopen: 1 mprotect: 1 secrets: + docker-username: ${{ secrets.DOCKERHUB_USERNAME }} docker-password: ${{ secrets.DOCKERHUB_PAT }} + scontain-username: ${{ secrets.SCONTAIN_REGISTRY_USERNAME }} scontain-password: ${{ secrets.SCONTAIN_REGISTRY_PAT }} scone-signing-key: ${{ secrets.SCONIFY_SIGNING_PRIVATE_KEY }} - docker-username: ${{ secrets.DOCKERHUB_USERNAME }} - scontain-username: ${{ secrets.SCONTAIN_REGISTRY_USERNAME }} - - display-sconify-results: - runs-on: ubuntu-latest - needs: sconify - steps: - - name: Display Sconify Results - run: | - echo "## Sconify Results" >> $GITHUB_STEP_SUMMARY - echo "" >> $GITHUB_STEP_SUMMARY - - echo "### Production Image" >> $GITHUB_STEP_SUMMARY - echo "- **Image Tag**: ${{ needs.sconify.outputs.prod-image-tag }}" >> $GITHUB_STEP_SUMMARY - echo "- **Checksum**: ${{ needs.sconify.outputs.prod-checksum }}" >> $GITHUB_STEP_SUMMARY - echo "- **MrEnclave**: ${{ needs.sconify.outputs.prod-mrenclave }}" >> $GITHUB_STEP_SUMMARY - echo "" >> $GITHUB_STEP_SUMMARY - - echo "### Summary" >> $GITHUB_STEP_SUMMARY - echo "Sconification completed successfully!" >> $GITHUB_STEP_SUMMARY deploy-dapp: + needs: [extract-tag, sconify] runs-on: ubuntu-latest - needs: [build-and-push, sconify] + environment: ${{ inputs.environment }} steps: - name: Checkout code uses: actions/checkout@v4 @@ -124,7 +90,7 @@ jobs: - name: Setup Node.js uses: actions/setup-node@v4 with: - node-version: '18.19' + node-version: '20.19.0' cache: 'npm' - name: Install dependencies @@ -135,76 +101,49 @@ jobs: cd ../../deployment-dapp npm ci - - name: Create scone fingerprint file - run: | - MRENCLAVE="${{ needs.sconify.outputs.prod-mrenclave }}" - echo "$MRENCLAVE" > deployment-dapp/.scone-fingerprint - - name: Deploy dapp contract env: - DEPLOY_ENVIRONMENT: ${{ inputs.environment }} - WALLET_PRIVATE_KEY_DEV: ${{ secrets.WEB3TELEGRAM_DAPP_OWNER_DEV_PRIVATEKEY }} - WALLET_PRIVATE_KEY_PROD: ${{ secrets.WEB3TELEGRAM_DAPP_OWNER_PROD_PRIVATEKEY }} - DOCKER_IMAGE_CHECKSUM_DEV: ${{ needs.sconify.outputs.prod-checksum }} - DOCKER_IMAGE_CHECKSUM_PROD: ${{ needs.sconify.outputs.prod-checksum }} - SCONIFIED_IMAGE_TAG: ${{ needs.sconify.outputs.prod-image-tag }} + WALLET_PRIVATE_KEY: ${{ secrets.WEB3TELEGRAM_DAPP_OWNER_PRIVATEKEY }} + DOCKER_IMAGE_TAG: ${{ needs.sconify.outputs.prod-image-tag }} + CHECKSUM: ${{ needs.sconify.outputs.prod-checksum }} + FINGERPRINT: ${{ needs.sconify.outputs.prod-mrenclave }} + RPC_URL: ${{ secrets.RPC_URL }} run: | cd deployment-dapp npm run deploy-dapp - name: Push dapp secret env: - DEPLOY_ENVIRONMENT: ${{ inputs.environment }} - WALLET_PRIVATE_KEY_DEV: ${{ secrets.WEB3TELEGRAM_DAPP_OWNER_DEV_PRIVATEKEY }} - WALLET_PRIVATE_KEY_PROD: ${{ secrets.WEB3TELEGRAM_DAPP_OWNER_PROD_PRIVATEKEY }} - TELEGRAM_BOT_TOKEN_DEV: ${{ secrets.TELEGRAM_BOT_TOKEN_DEV }} - TELEGRAM_BOT_TOKEN_PROD: ${{ secrets.TELEGRAM_BOT_TOKEN_PROD }} + WALLET_PRIVATE_KEY: ${{ secrets.WEB3TELEGRAM_DAPP_OWNER_PRIVATEKEY }} + TELEGRAM_BOT_TOKEN: ${{ secrets.TELEGRAM_BOT_TOKEN_DEV }} + RPC_URL: ${{ secrets.RPC_URL }} run: | cd deployment-dapp npm run push-dapp-secret - name: Publish free sell order env: - DEPLOY_ENVIRONMENT: ${{ inputs.environment }} - WALLET_PRIVATE_KEY_DEV: ${{ secrets.WEB3TELEGRAM_DAPP_OWNER_DEV_PRIVATEKEY }} - WALLET_PRIVATE_KEY_PROD: ${{ secrets.WEB3TELEGRAM_DAPP_OWNER_PROD_PRIVATEKEY }} - PRICE: '0' - VOLUME: '1000000000' + WALLET_PRIVATE_KEY: ${{ secrets.WEB3TELEGRAM_DAPP_OWNER_PRIVATEKEY }} + PRICE: ${{ inputs.price || vars.SELL_ORDER_PRICE }} + VOLUME: ${{ inputs.volume || vars.SELL_ORDER_VOLUME }} + RPC_URL: ${{ secrets.RPC_URL }} run: | cd deployment-dapp npm run publish-sell-order - - name: Add resource to whitelist (dev) - if: inputs.environment == 'dapp-dev' + - name: Add resource to whitelist env: - WALLET_PRIVATE_KEY: ${{ secrets.DEPLOYER_DEV_PRIVATEKEY }} - CONTRACT_ADDRESS: ${{ secrets.WEB3TELEGRAM_WHITELIST_DEV_ADDRESS }} - run: | - cd node_modules/whitelist-smart-contract - export ADDRESS_TO_ADD=$(cat ../../deployment-dapp/.app-address) && npm run addResourceToWhitelist - - - name: Add resource to whitelist (prod) - if: inputs.environment == 'dapp-prod' - env: - WALLET_PRIVATE_KEY: ${{ secrets.DEPLOYER_PROD_PRIVATEKEY }} - CONTRACT_ADDRESS: ${{ secrets.WEB3TELEGRAM_WHITELIST_PROD_ADDRESS }} + CONTRACT_ADDRESS: ${{ secrets.WEB3TELEGRAM_WHITELIST_CONTRACT_ADDRESS }} + WALLET_PRIVATE_KEY: ${{ secrets.WEB3TELEGRAM_DAPP_OWNER_PRIVATEKEY }} run: | cd node_modules/whitelist-smart-contract export ADDRESS_TO_ADD=$(cat ../../deployment-dapp/.app-address) && npm run addResourceToWhitelist - name: Configure ENS + if: ${{ vars.DAPP_ENS_NAME }} env: - DEPLOY_ENVIRONMENT: ${{ inputs.environment }} - WALLET_PRIVATE_KEY_DEV: ${{ secrets.WEB3TELEGRAM_DAPP_OWNER_DEV_PRIVATEKEY }} - WALLET_PRIVATE_KEY_PROD: ${{ secrets.WEB3TELEGRAM_DAPP_OWNER_PROD_PRIVATEKEY }} + WALLET_PRIVATE_KEY: ${{ secrets.WEB3TELEGRAM_DAPP_OWNER_PRIVATEKEY }} + DAPP_ENS_NAME: ${{ vars.DAPP_ENS_NAME }} run: | cd deployment-dapp npm run configure-ens - - - name: Upload deployment artifacts - uses: actions/upload-artifact@v4 - with: - name: deployment-artifacts - path: | - deployment-dapp/.app-address - deployment-dapp/.scone-fingerprint diff --git a/.github/workflows/dapp-release.yml b/.github/workflows/dapp-release.yml new file mode 100644 index 0000000..6676f4e --- /dev/null +++ b/.github/workflows/dapp-release.yml @@ -0,0 +1,134 @@ +name: dapp-release + +on: + push: + tags: + - 'dapp-v*' + +jobs: + extract-tag: + runs-on: ubuntu-latest + outputs: + clean_tag: ${{ steps.tag.outputs.clean_tag }} + steps: + - name: Extract tag + id: tag + run: | + TAG=${GITHUB_REF#refs/tags/dapp-v} + echo "clean_tag=${TAG}" >> $GITHUB_OUTPUT + + docker-publish: + uses: iExecBlockchainComputing/github-actions-workflows/.github/workflows/docker-build.yml@docker-build-v2.3.1 + with: + image-name: 'iexechub/web3telegram-dapp' + registry: 'docker.io' + dockerfile: 'dapp/Dockerfile' + context: 'dapp' + security-scan: true + security-report: 'sarif' + hadolint: true + push: true + image-tag: ${{ needs.extract-tag.outputs.clean_tag }} + secrets: + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_PAT }} + + sconify: + uses: iExecBlockchainComputing/github-actions-workflows/.github/workflows/sconify.yml@sconify-v2.0.0 + needs: [docker-publish] + with: + image-name: 'iexechub/web3telegram-dapp' + image-tag: ${{ needs.extract-tag.outputs.clean_tag }} + sconify-debug: false + sconify-prod: true + docker-registry: docker.io + sconify-version: '5.9.0-v15' + binary: /usr/local/bin/node + command: node /app/src/app.js + host-path: | + /etc/hosts + /etc/resolv.conf + binary-fs: true + fs-dir: /app + heap: 1G + dlopen: 1 + mprotect: 1 + secrets: + docker-username: ${{ secrets.DOCKERHUB_USERNAME }} + docker-password: ${{ secrets.DOCKERHUB_PAT }} + scontain-username: ${{ secrets.SCONTAIN_REGISTRY_USERNAME }} + scontain-password: ${{ secrets.SCONTAIN_REGISTRY_PAT }} + scone-signing-key: ${{ secrets.SCONIFY_SIGNING_PRIVATE_KEY }} + + deploy-multi-env-prod: + strategy: + matrix: + # TODO: bellecour-prod already deployed add it back for next release + environment: [arbitrum-sepolia-prod, arbitrum-mainnet-prod] + needs: [extract-tag, sconify] + runs-on: ubuntu-latest + environment: ${{ matrix.environment }} + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Setup Node.js + uses: actions/setup-node@v4 + with: + node-version: '20.19.0' + cache: 'npm' + + - name: Install dependencies + run: | + npm ci + cd node_modules/whitelist-smart-contract + npm install --save-dev ts-node + cd ../../deployment-dapp + npm ci + + - name: Deploy dapp contract + env: + WALLET_PRIVATE_KEY: ${{ secrets.WEB3TELEGRAM_DAPP_OWNER_PRIVATEKEY }} + DOCKER_IMAGE_TAG: ${{ needs.sconify.outputs.prod-image-tag }} + CHECKSUM: ${{ needs.sconify.outputs.prod-checksum }} + FINGERPRINT: ${{ needs.sconify.outputs.prod-mrenclave }} + RPC_URL: ${{ secrets.RPC_URL }} + run: | + cd deployment-dapp + npm run deploy-dapp + + - name: Push dapp secret + env: + WALLET_PRIVATE_KEY: ${{ secrets.WEB3TELEGRAM_DAPP_OWNER_PRIVATEKEY }} + TELEGRAM_BOT_TOKEN: ${{ secrets.TELEGRAM_BOT_TOKEN_PROD }} + RPC_URL: ${{ secrets.RPC_URL }} + run: | + cd deployment-dapp + npm run push-dapp-secret + + - name: Publish free sell order + env: + WALLET_PRIVATE_KEY: ${{ secrets.WEB3TELEGRAM_DAPP_OWNER_PRIVATEKEY }} + PRICE: ${{ vars.SELL_ORDER_PRICE }} + VOLUME: ${{ vars.SELL_ORDER_VOLUME }} + RPC_URL: ${{ secrets.RPC_URL }} + run: | + cd deployment-dapp + npm run publish-sell-order + + - name: Add resource to whitelist + env: + CONTRACT_ADDRESS: ${{ secrets.WEB3TELEGRAM_WHITELIST_CONTRACT_ADDRESS }} + WALLET_PRIVATE_KEY: ${{ secrets.WEB3TELEGRAM_DAPP_OWNER_PRIVATEKEY }} + run: | + cd node_modules/whitelist-smart-contract + export ADDRESS_TO_ADD=$(cat ../../deployment-dapp/.app-address) && npm run addResourceToWhitelist + + - name: Configure ENS + if: ${{ vars.DAPP_ENS_NAME }} + env: + WALLET_PRIVATE_KEY: ${{ secrets.WEB3TELEGRAM_DAPP_OWNER_PRIVATEKEY }} + DAPP_ENS_NAME: ${{ vars.DAPP_ENS_NAME }} + run: | + cd deployment-dapp + npm run configure-ens diff --git a/.github/workflows/sdk-release.yml b/.github/workflows/sdk-release.yml new file mode 100644 index 0000000..1f8fd34 --- /dev/null +++ b/.github/workflows/sdk-release.yml @@ -0,0 +1,14 @@ +name: publish-npm-sdk-latest + +on: + push: + tags: + - 'web3telegram-v*' + +jobs: + publish-npm: + uses: ./.github/workflows/publish-npm-sdk.yml + with: + tag: 'latest' + secrets: + npm-token: ${{ secrets.NPM_TOKEN }} diff --git a/deployment-dapp/.env.example b/deployment-dapp/.env.example deleted file mode 100644 index dcd4c13..0000000 --- a/deployment-dapp/.env.example +++ /dev/null @@ -1,2 +0,0 @@ -WALLET_PRIVATE_KEY_DEV= -TELEGRAM_BOT_TOKEN= diff --git a/deployment-dapp/.gitignore b/deployment-dapp/.gitignore deleted file mode 100644 index 4c49bd7..0000000 --- a/deployment-dapp/.gitignore +++ /dev/null @@ -1 +0,0 @@ -.env diff --git a/deployment-dapp/README.md b/deployment-dapp/README.md deleted file mode 100644 index f87d87a..0000000 --- a/deployment-dapp/README.md +++ /dev/null @@ -1,10 +0,0 @@ -# deployment-dapp - -Create a `.env` file with the following variables: - - - `WALLET_PRIVATE_KEY_DEV` -The wallet that will be the owner of the dev iApp - - - `TELEGRAM_BOT_TOKEN` -Token that will be used in the iApp by the package [node-telegram-bot-api](https://github.com/yagop/node-telegram-bot-api) -This token needs to be pushed as an **app secret**. diff --git a/deployment-dapp/package-lock.json b/deployment-dapp/package-lock.json index 591c814..fd7021c 100644 --- a/deployment-dapp/package-lock.json +++ b/deployment-dapp/package-lock.json @@ -62,9 +62,9 @@ "license": "BSD-2-Clause" }, "node_modules/@ensdomains/ens-contracts": { - "version": "1.5.2", - "resolved": "https://registry.npmjs.org/@ensdomains/ens-contracts/-/ens-contracts-1.5.2.tgz", - "integrity": "sha512-AdHgy3Qd6iCaQC6ruWTIhI6RjQdLR1F1m4mmORijLL+gUB0260IY6dsNEXk5NJdv2yvjzb2E5Rc/zsN+QY4hGA==", + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/@ensdomains/ens-contracts/-/ens-contracts-1.4.0.tgz", + "integrity": "sha512-h10r9igVCycW8vvkEcNageOtXLJss5k3cb5jQUeLFSppp4VE3aXhwI+UapsqxKwDxSit2XxzAD9Zbwbhj2q4Fw==", "license": "MIT", "dependencies": { "@ensdomains/buffer": "^0.1.1", @@ -601,12 +601,12 @@ } }, "node_modules/@inquirer/checkbox": { - "version": "4.1.9", - "resolved": "https://registry.npmjs.org/@inquirer/checkbox/-/checkbox-4.1.9.tgz", - "integrity": "sha512-DBJBkzI5Wx4jFaYm221LHvAhpKYkhVS0k9plqHwaHhofGNxvYB7J3Bz8w+bFJ05zaMb0sZNHo4KdmENQFlNTuQ==", + "version": "4.1.8", + "resolved": "https://registry.npmjs.org/@inquirer/checkbox/-/checkbox-4.1.8.tgz", + "integrity": "sha512-d/QAsnwuHX2OPolxvYcgSj7A9DO9H6gVOy2DvBTx+P2LH2iRTo/RSGV3iwCzW024nP9hw98KIuDmdyhZQj1UQg==", "license": "MIT", "dependencies": { - "@inquirer/core": "^10.1.14", + "@inquirer/core": "^10.1.13", "@inquirer/figures": "^1.0.12", "@inquirer/type": "^3.0.7", "ansi-escapes": "^4.3.2", @@ -625,12 +625,12 @@ } }, "node_modules/@inquirer/confirm": { - "version": "5.1.13", - "resolved": "https://registry.npmjs.org/@inquirer/confirm/-/confirm-5.1.13.tgz", - "integrity": "sha512-EkCtvp67ICIVVzjsquUiVSd+V5HRGOGQfsqA4E4vMWhYnB7InUL0pa0TIWt1i+OfP16Gkds8CdIu6yGZwOM1Yw==", + "version": "5.1.12", + "resolved": "https://registry.npmjs.org/@inquirer/confirm/-/confirm-5.1.12.tgz", + "integrity": "sha512-dpq+ielV9/bqgXRUbNH//KsY6WEw9DrGPmipkpmgC1Y46cwuBTNx7PXFWTjc3MQ+urcc0QxoVHcMI0FW4Ok0hg==", "license": "MIT", "dependencies": { - "@inquirer/core": "^10.1.14", + "@inquirer/core": "^10.1.13", "@inquirer/type": "^3.0.7" }, "engines": { @@ -646,9 +646,9 @@ } }, "node_modules/@inquirer/core": { - "version": "10.1.14", - "resolved": "https://registry.npmjs.org/@inquirer/core/-/core-10.1.14.tgz", - "integrity": "sha512-Ma+ZpOJPewtIYl6HZHZckeX1STvDnHTCB2GVINNUlSEn2Am6LddWwfPkIGY0IUFVjUUrr/93XlBwTK6mfLjf0A==", + "version": "10.1.13", + "resolved": "https://registry.npmjs.org/@inquirer/core/-/core-10.1.13.tgz", + "integrity": "sha512-1viSxebkYN2nJULlzCxES6G9/stgHSepZ9LqqfdIGPHj5OHhiBUXVS0a6R0bEC2A+VL4D9w6QB66ebCr6HGllA==", "license": "MIT", "dependencies": { "@inquirer/figures": "^1.0.12", @@ -673,12 +673,12 @@ } }, "node_modules/@inquirer/editor": { - "version": "4.2.14", - "resolved": "https://registry.npmjs.org/@inquirer/editor/-/editor-4.2.14.tgz", - "integrity": "sha512-yd2qtLl4QIIax9DTMZ1ZN2pFrrj+yL3kgIWxm34SS6uwCr0sIhsNyudUjAo5q3TqI03xx4SEBkUJqZuAInp9uA==", + "version": "4.2.13", + "resolved": "https://registry.npmjs.org/@inquirer/editor/-/editor-4.2.13.tgz", + "integrity": "sha512-WbicD9SUQt/K8O5Vyk9iC2ojq5RHoCLK6itpp2fHsWe44VxxcA9z3GTWlvjSTGmMQpZr+lbVmrxdHcumJoLbMA==", "license": "MIT", "dependencies": { - "@inquirer/core": "^10.1.14", + "@inquirer/core": "^10.1.13", "@inquirer/type": "^3.0.7", "external-editor": "^3.1.0" }, @@ -695,12 +695,12 @@ } }, "node_modules/@inquirer/expand": { - "version": "4.0.16", - "resolved": "https://registry.npmjs.org/@inquirer/expand/-/expand-4.0.16.tgz", - "integrity": "sha512-oiDqafWzMtofeJyyGkb1CTPaxUkjIcSxePHHQCfif8t3HV9pHcw1Kgdw3/uGpDvaFfeTluwQtWiqzPVjAqS3zA==", + "version": "4.0.15", + "resolved": "https://registry.npmjs.org/@inquirer/expand/-/expand-4.0.15.tgz", + "integrity": "sha512-4Y+pbr/U9Qcvf+N/goHzPEXiHH8680lM3Dr3Y9h9FFw4gHS+zVpbj8LfbKWIb/jayIB4aSO4pWiBTrBYWkvi5A==", "license": "MIT", "dependencies": { - "@inquirer/core": "^10.1.14", + "@inquirer/core": "^10.1.13", "@inquirer/type": "^3.0.7", "yoctocolors-cjs": "^2.1.2" }, @@ -726,12 +726,12 @@ } }, "node_modules/@inquirer/input": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/@inquirer/input/-/input-4.2.0.tgz", - "integrity": "sha512-opqpHPB1NjAmDISi3uvZOTrjEEU5CWVu/HBkDby8t93+6UxYX0Z7Ps0Ltjm5sZiEbWenjubwUkivAEYQmy9xHw==", + "version": "4.1.12", + "resolved": "https://registry.npmjs.org/@inquirer/input/-/input-4.1.12.tgz", + "integrity": "sha512-xJ6PFZpDjC+tC1P8ImGprgcsrzQRsUh9aH3IZixm1lAZFK49UGHxM3ltFfuInN2kPYNfyoPRh+tU4ftsjPLKqQ==", "license": "MIT", "dependencies": { - "@inquirer/core": "^10.1.14", + "@inquirer/core": "^10.1.13", "@inquirer/type": "^3.0.7" }, "engines": { @@ -747,12 +747,12 @@ } }, "node_modules/@inquirer/number": { - "version": "3.0.16", - "resolved": "https://registry.npmjs.org/@inquirer/number/-/number-3.0.16.tgz", - "integrity": "sha512-kMrXAaKGavBEoBYUCgualbwA9jWUx2TjMA46ek+pEKy38+LFpL9QHlTd8PO2kWPUgI/KB+qi02o4y2rwXbzr3Q==", + "version": "3.0.15", + "resolved": "https://registry.npmjs.org/@inquirer/number/-/number-3.0.15.tgz", + "integrity": "sha512-xWg+iYfqdhRiM55MvqiTCleHzszpoigUpN5+t1OMcRkJrUrw7va3AzXaxvS+Ak7Gny0j2mFSTv2JJj8sMtbV2g==", "license": "MIT", "dependencies": { - "@inquirer/core": "^10.1.14", + "@inquirer/core": "^10.1.13", "@inquirer/type": "^3.0.7" }, "engines": { @@ -768,12 +768,12 @@ } }, "node_modules/@inquirer/password": { - "version": "4.0.16", - "resolved": "https://registry.npmjs.org/@inquirer/password/-/password-4.0.16.tgz", - "integrity": "sha512-g8BVNBj5Zeb5/Y3cSN+hDUL7CsIFDIuVxb9EPty3lkxBaYpjL5BNRKSYOF9yOLe+JOcKFd+TSVeADQ4iSY7rbg==", + "version": "4.0.15", + "resolved": "https://registry.npmjs.org/@inquirer/password/-/password-4.0.15.tgz", + "integrity": "sha512-75CT2p43DGEnfGTaqFpbDC2p2EEMrq0S+IRrf9iJvYreMy5mAWj087+mdKyLHapUEPLjN10mNvABpGbk8Wdraw==", "license": "MIT", "dependencies": { - "@inquirer/core": "^10.1.14", + "@inquirer/core": "^10.1.13", "@inquirer/type": "^3.0.7", "ansi-escapes": "^4.3.2" }, @@ -790,21 +790,21 @@ } }, "node_modules/@inquirer/prompts": { - "version": "7.6.0", - "resolved": "https://registry.npmjs.org/@inquirer/prompts/-/prompts-7.6.0.tgz", - "integrity": "sha512-jAhL7tyMxB3Gfwn4HIJ0yuJ5pvcB5maYUcouGcgd/ub79f9MqZ+aVnBtuFf+VC2GTkCBF+R+eo7Vi63w5VZlzw==", + "version": "7.5.3", + "resolved": "https://registry.npmjs.org/@inquirer/prompts/-/prompts-7.5.3.tgz", + "integrity": "sha512-8YL0WiV7J86hVAxrh3fE5mDCzcTDe1670unmJRz6ArDgN+DBK1a0+rbnNWp4DUB5rPMwqD5ZP6YHl9KK1mbZRg==", "license": "MIT", "dependencies": { - "@inquirer/checkbox": "^4.1.9", - "@inquirer/confirm": "^5.1.13", - "@inquirer/editor": "^4.2.14", - "@inquirer/expand": "^4.0.16", - "@inquirer/input": "^4.2.0", - "@inquirer/number": "^3.0.16", - "@inquirer/password": "^4.0.16", - "@inquirer/rawlist": "^4.1.4", - "@inquirer/search": "^3.0.16", - "@inquirer/select": "^4.2.4" + "@inquirer/checkbox": "^4.1.8", + "@inquirer/confirm": "^5.1.12", + "@inquirer/editor": "^4.2.13", + "@inquirer/expand": "^4.0.15", + "@inquirer/input": "^4.1.12", + "@inquirer/number": "^3.0.15", + "@inquirer/password": "^4.0.15", + "@inquirer/rawlist": "^4.1.3", + "@inquirer/search": "^3.0.15", + "@inquirer/select": "^4.2.3" }, "engines": { "node": ">=18" @@ -819,12 +819,12 @@ } }, "node_modules/@inquirer/rawlist": { - "version": "4.1.4", - "resolved": "https://registry.npmjs.org/@inquirer/rawlist/-/rawlist-4.1.4.tgz", - "integrity": "sha512-5GGvxVpXXMmfZNtvWw4IsHpR7RzqAR624xtkPd1NxxlV5M+pShMqzL4oRddRkg8rVEOK9fKdJp1jjVML2Lr7TQ==", + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/@inquirer/rawlist/-/rawlist-4.1.3.tgz", + "integrity": "sha512-7XrV//6kwYumNDSsvJIPeAqa8+p7GJh7H5kRuxirct2cgOcSWwwNGoXDRgpNFbY/MG2vQ4ccIWCi8+IXXyFMZA==", "license": "MIT", "dependencies": { - "@inquirer/core": "^10.1.14", + "@inquirer/core": "^10.1.13", "@inquirer/type": "^3.0.7", "yoctocolors-cjs": "^2.1.2" }, @@ -841,12 +841,12 @@ } }, "node_modules/@inquirer/search": { - "version": "3.0.16", - "resolved": "https://registry.npmjs.org/@inquirer/search/-/search-3.0.16.tgz", - "integrity": "sha512-POCmXo+j97kTGU6aeRjsPyuCpQQfKcMXdeTMw708ZMtWrj5aykZvlUxH4Qgz3+Y1L/cAVZsSpA+UgZCu2GMOMg==", + "version": "3.0.15", + "resolved": "https://registry.npmjs.org/@inquirer/search/-/search-3.0.15.tgz", + "integrity": "sha512-YBMwPxYBrADqyvP4nNItpwkBnGGglAvCLVW8u4pRmmvOsHUtCAUIMbUrLX5B3tFL1/WsLGdQ2HNzkqswMs5Uaw==", "license": "MIT", "dependencies": { - "@inquirer/core": "^10.1.14", + "@inquirer/core": "^10.1.13", "@inquirer/figures": "^1.0.12", "@inquirer/type": "^3.0.7", "yoctocolors-cjs": "^2.1.2" @@ -864,12 +864,12 @@ } }, "node_modules/@inquirer/select": { - "version": "4.2.4", - "resolved": "https://registry.npmjs.org/@inquirer/select/-/select-4.2.4.tgz", - "integrity": "sha512-unTppUcTjmnbl/q+h8XeQDhAqIOmwWYWNyiiP2e3orXrg6tOaa5DHXja9PChCSbChOsktyKgOieRZFnajzxoBg==", + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/@inquirer/select/-/select-4.2.3.tgz", + "integrity": "sha512-OAGhXU0Cvh0PhLz9xTF/kx6g6x+sP+PcyTiLvCrewI99P3BBeexD+VbuwkNDvqGkk3y2h5ZiWLeRP7BFlhkUDg==", "license": "MIT", "dependencies": { - "@inquirer/core": "^10.1.14", + "@inquirer/core": "^10.1.13", "@inquirer/figures": "^1.0.12", "@inquirer/type": "^3.0.7", "ansi-escapes": "^4.3.2", @@ -926,15 +926,14 @@ } }, "node_modules/@multiformats/multiaddr": { - "version": "12.5.1", - "resolved": "https://registry.npmjs.org/@multiformats/multiaddr/-/multiaddr-12.5.1.tgz", - "integrity": "sha512-+DDlr9LIRUS8KncI1TX/FfUn8F2dl6BIxJgshS/yFQCNB5IAF0OGzcwB39g5NLE22s4qqDePv0Qof6HdpJ/4aQ==", + "version": "12.4.0", + "resolved": "https://registry.npmjs.org/@multiformats/multiaddr/-/multiaddr-12.4.0.tgz", + "integrity": "sha512-FL7yBTLijJ5JkO044BGb2msf+uJLrwpD6jD6TkXlbjA9N12+18HT40jvd4o5vL4LOJMc86dPX6tGtk/uI9kYKg==", "license": "Apache-2.0 OR MIT", "dependencies": { "@chainsafe/is-ip": "^2.0.1", "@chainsafe/netmask": "^2.0.0", "@multiformats/dns": "^1.0.3", - "abort-error": "^1.0.1", "multiformats": "^13.0.0", "uint8-varint": "^2.0.1", "uint8arrays": "^5.0.0" @@ -1012,114 +1011,10 @@ "integrity": "sha512-zj/KGoW7zxWUE8qOI++rUM18v+VeLTTzKs/DJFkSzHpQFPD/jKKF0TrMxBfGLl3kpdELCNccvB3zmofSzm4nlA==", "license": "MIT" }, - "node_modules/@oxlint/darwin-arm64": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/@oxlint/darwin-arm64/-/darwin-arm64-1.6.0.tgz", - "integrity": "sha512-m3wyqBh1TOHjpr/dXeIZY7OoX+MQazb+bMHQdDtwUvefrafUx+5YHRvulYh1sZSQ449nQ3nk3qj5qj535vZRjg==", - "cpu": [ - "arm64" - ], - "license": "MIT", - "optional": true, - "os": [ - "darwin" - ] - }, - "node_modules/@oxlint/darwin-x64": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/@oxlint/darwin-x64/-/darwin-x64-1.6.0.tgz", - "integrity": "sha512-75fJfF/9xNypr7cnOYoZBhfmG1yP7ex3pUOeYGakmtZRffO9z1i1quLYhjZsmaDXsAIZ3drMhenYHMmFKS3SRg==", - "cpu": [ - "x64" - ], - "license": "MIT", - "optional": true, - "os": [ - "darwin" - ] - }, - "node_modules/@oxlint/linux-arm64-gnu": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/@oxlint/linux-arm64-gnu/-/linux-arm64-gnu-1.6.0.tgz", - "integrity": "sha512-YhXGf0FXa72bEt4F7eTVKx5X3zWpbAOPnaA/dZ6/g8tGhw1m9IFjrabVHFjzcx3dQny4MgA59EhyElkDvpUe8A==", - "cpu": [ - "arm64" - ], - "license": "MIT", - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@oxlint/linux-arm64-musl": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/@oxlint/linux-arm64-musl/-/linux-arm64-musl-1.6.0.tgz", - "integrity": "sha512-T3JDhx8mjGjvh5INsPZJrlKHmZsecgDYvtvussKRdkc1Nnn7WC+jH9sh5qlmYvwzvmetlPVNezAoNvmGO9vtMg==", - "cpu": [ - "arm64" - ], - "license": "MIT", - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@oxlint/linux-x64-gnu": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/@oxlint/linux-x64-gnu/-/linux-x64-gnu-1.6.0.tgz", - "integrity": "sha512-Dx7ghtAl8aXBdqofJpi338At6lkeCtTfoinTYQXd9/TEJx+f+zCGNlQO6nJz3ydJBX48FDuOFKkNC+lUlWrd8w==", - "cpu": [ - "x64" - ], - "license": "MIT", - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@oxlint/linux-x64-musl": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/@oxlint/linux-x64-musl/-/linux-x64-musl-1.6.0.tgz", - "integrity": "sha512-7KvMGdWmAZtAtg6IjoEJHKxTXdAcrHnUnqfgs0JpXst7trquV2mxBeRZusQXwxpu4HCSomKMvJfsp1qKaqSFDg==", - "cpu": [ - "x64" - ], - "license": "MIT", - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@oxlint/win32-arm64": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/@oxlint/win32-arm64/-/win32-arm64-1.6.0.tgz", - "integrity": "sha512-iSGC9RwX+dl7o5KFr5aH7Gq3nFbkq/3Gda6mxNPMvNkWrgXdIyiINxpyD8hJu566M+QSv1wEAu934BZotFDyoQ==", - "cpu": [ - "arm64" - ], - "license": "MIT", - "optional": true, - "os": [ - "win32" - ] - }, - "node_modules/@oxlint/win32-x64": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/@oxlint/win32-x64/-/win32-x64-1.6.0.tgz", - "integrity": "sha512-jOj3L/gfLc0IwgOTkZMiZ5c673i/hbAmidlaylT0gE6H18hln9HxPgp5GCf4E4y6mwEJlW8QC5hQi221+9otdA==", - "cpu": [ - "x64" - ], - "license": "MIT", - "optional": true, - "os": [ - "win32" - ] - }, "node_modules/@types/bn.js": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/@types/bn.js/-/bn.js-5.2.0.tgz", - "integrity": "sha512-DLbJ1BPqxvQhIGbeu8VbUC1DiAiahHtAYvA0ZEAa4P31F7IaArc8z3C3BRQdWX4mtLQuABG4yzp76ZrS02Ui1Q==", + "version": "5.1.6", + "resolved": "https://registry.npmjs.org/@types/bn.js/-/bn.js-5.1.6.tgz", + "integrity": "sha512-Xh8vSwUeMKeYYrj3cX4lGQgFSF/N03r+tv4AiLl1SucqV+uTQpxRcnM8AkXKHwYP9ZPXOYXRr2KPXpVlIvqh9w==", "license": "MIT", "dependencies": { "@types/node": "*" @@ -1147,12 +1042,12 @@ "dev": true }, "node_modules/@types/node": { - "version": "24.0.13", - "resolved": "https://registry.npmjs.org/@types/node/-/node-24.0.13.tgz", - "integrity": "sha512-Qm9OYVOFHFYg3wJoTSrz80hoec5Lia/dPp84do3X7dZvLikQvM1YpmvTBEdIr/e+U8HTkFjLHLnl78K/qjf+jQ==", + "version": "22.15.21", + "resolved": "https://registry.npmjs.org/@types/node/-/node-22.15.21.tgz", + "integrity": "sha512-EV/37Td6c+MgKAbkcLG6vqZ2zEYHD7bvSrzqqs2RIhbA6w3x+Dqz8MZM3sP6kGTeLrdoOgKZe+Xja7tUB2DNkQ==", "license": "MIT", "dependencies": { - "undici-types": "~7.8.0" + "undici-types": "~6.21.0" } }, "node_modules/@types/semver": { @@ -1381,12 +1276,6 @@ "node": ">=10" } }, - "node_modules/abort-error": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/abort-error/-/abort-error-1.0.1.tgz", - "integrity": "sha512-fxqCblJiIPdSXIUrxI0PL+eJG49QdP9SQ70qtB65MVAoMr2rASlOyAbJFOylfB467F/f+5BCLJJq58RYi7mGfg==", - "license": "Apache-2.0 OR MIT" - }, "node_modules/acorn": { "version": "8.10.0", "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.10.0.tgz", @@ -2564,9 +2453,9 @@ } }, "node_modules/ethers": { - "version": "6.15.0", - "resolved": "https://registry.npmjs.org/ethers/-/ethers-6.15.0.tgz", - "integrity": "sha512-Kf/3ZW54L4UT0pZtsY/rf+EkBU7Qi5nnhonjUb8yTXcxH3cdcWrV2cRyk0Xk/4jK6OoHhxxZHriyhje20If2hQ==", + "version": "6.14.3", + "resolved": "https://registry.npmjs.org/ethers/-/ethers-6.14.3.tgz", + "integrity": "sha512-qq7ft/oCJohoTcsNPFaXSQUm457MA5iWqkf1Mb11ujONdg7jBI6sAOrHaTi3j0CBqIGFSCeR/RMc+qwRRub7IA==", "funding": [ { "type": "individual", @@ -3221,17 +3110,17 @@ "integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==" }, "node_modules/inquirer": { - "version": "12.7.0", - "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-12.7.0.tgz", - "integrity": "sha512-KKFRc++IONSyE2UYw9CJ1V0IWx5yQKomwB+pp3cWomWs+v2+ZsG11G2OVfAjFS6WWCppKw+RfKmpqGfSzD5QBQ==", + "version": "12.6.3", + "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-12.6.3.tgz", + "integrity": "sha512-eX9beYAjr1MqYsIjx1vAheXsRk1jbZRvHLcBu5nA9wX0rXR1IfCZLnVLp4Ym4mrhqmh7AuANwcdtgQ291fZDfQ==", "license": "MIT", "dependencies": { - "@inquirer/core": "^10.1.14", - "@inquirer/prompts": "^7.6.0", + "@inquirer/core": "^10.1.13", + "@inquirer/prompts": "^7.5.3", "@inquirer/type": "^3.0.7", "ansi-escapes": "^4.3.2", "mute-stream": "^2.0.0", - "run-async": "^4.0.4", + "run-async": "^3.0.0", "rxjs": "^7.8.2" }, "engines": { @@ -3767,9 +3656,9 @@ "license": "MIT" }, "node_modules/multiformats": { - "version": "13.3.7", - "resolved": "https://registry.npmjs.org/multiformats/-/multiformats-13.3.7.tgz", - "integrity": "sha512-meL9DERHj+fFVWoOX9fXqfcYcSpUfSYJPcFvDPKrxitICbwAoWR+Ut4j5NO9zAT917HUHLQmqzQbAsGNHlDcxQ==", + "version": "13.3.6", + "resolved": "https://registry.npmjs.org/multiformats/-/multiformats-13.3.6.tgz", + "integrity": "sha512-yakbt9cPYj8d3vi/8o/XWm61MrOILo7fsTL0qxNx6zS0Nso6K5JqqS2WV7vK/KSuDBvrW3KfCwAdAgarAgOmww==", "license": "Apache-2.0 OR MIT" }, "node_modules/mute-stream": { @@ -3965,32 +3854,6 @@ "node": ">=0.10.0" } }, - "node_modules/oxlint": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/oxlint/-/oxlint-1.6.0.tgz", - "integrity": "sha512-jtaD65PqzIa1udvSxxscTKBxYKuZoFXyKGLiU1Qjo1ulq3uv/fQDtoV1yey1FrQZrQjACGPi1Widsy1TucC7Jg==", - "license": "MIT", - "bin": { - "oxc_language_server": "bin/oxc_language_server", - "oxlint": "bin/oxlint" - }, - "engines": { - "node": ">=8.*" - }, - "funding": { - "url": "https://github.com/sponsors/Boshen" - }, - "optionalDependencies": { - "@oxlint/darwin-arm64": "1.6.0", - "@oxlint/darwin-x64": "1.6.0", - "@oxlint/linux-arm64-gnu": "1.6.0", - "@oxlint/linux-arm64-musl": "1.6.0", - "@oxlint/linux-x64-gnu": "1.6.0", - "@oxlint/linux-x64-musl": "1.6.0", - "@oxlint/win32-arm64": "1.6.0", - "@oxlint/win32-x64": "1.6.0" - } - }, "node_modules/p-queue": { "version": "8.1.0", "resolved": "https://registry.npmjs.org/p-queue/-/p-queue-8.1.0.tgz", @@ -4082,10 +3945,10 @@ } }, "node_modules/prettier": { - "version": "3.6.2", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.6.2.tgz", - "integrity": "sha512-I7AIg5boAr5R0FFtJ6rCfD+LFsWHp81dolrFD8S79U9tb8Az2nGrJncnMSnys+bpQJfRUzqs9hnA81OAA3hCuQ==", - "license": "MIT", + "version": "3.2.5", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.2.5.tgz", + "integrity": "sha512-3/GWa9aOC0YeD7LUfvOG2NiDyhOWRvt1k+rcKhOuYnMY24iiCphgneUfJDyFXd6rZCAnuLBv6UeAULtrhT/F4A==", + "dev": true, "bin": { "prettier": "bin/prettier.cjs" }, @@ -4134,9 +3997,9 @@ } }, "node_modules/query-string": { - "version": "9.2.2", - "resolved": "https://registry.npmjs.org/query-string/-/query-string-9.2.2.tgz", - "integrity": "sha512-pDSIZJ9sFuOp6VnD+5IkakSVf+rICAuuU88Hcsr6AKL0QtxSIfVuKiVP2oahFI7tk3CRSexwV+Ya6MOoTxzg9g==", + "version": "9.2.0", + "resolved": "https://registry.npmjs.org/query-string/-/query-string-9.2.0.tgz", + "integrity": "sha512-YIRhrHujoQxhexwRLxfy3VSjOXmvZRd2nyw1PwL1UUqZ/ys1dEZd1+NSgXkne2l/4X/7OXkigEAuhTX0g/ivJQ==", "license": "MIT", "dependencies": { "decode-uri-component": "^0.4.1", @@ -4279,14 +4142,10 @@ "integrity": "sha512-pGQyIMcLIUQraCTNIcA4B9FY1g2vJHB8qWg3qbwjA1YUj1490LStKDlA4YlPwPgO/a0NWg0UHD7R9ki3DMGACQ==" }, "node_modules/run-async": { - "version": "4.0.4", - "resolved": "https://registry.npmjs.org/run-async/-/run-async-4.0.4.tgz", - "integrity": "sha512-2cgeRHnV11lSXBEhq7sN7a5UVjTKm9JTb9x8ApIT//16D7QL96AgnNeWSGoB4gIHc0iYw/Ha0Z+waBaCYZVNhg==", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/run-async/-/run-async-3.0.0.tgz", + "integrity": "sha512-540WwVDOMxA6dN6We19EcT9sc3hkXPw5mzRNGM3FkdN/vtE9NFvj5lFAPNwUDmJjXidm3v7TC1cTE7t17Ulm1Q==", "license": "MIT", - "dependencies": { - "oxlint": "^1.2.0", - "prettier": "^3.5.3" - }, "engines": { "node": ">=0.12.0" } @@ -4847,9 +4706,9 @@ } }, "node_modules/undici-types": { - "version": "7.8.0", - "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-7.8.0.tgz", - "integrity": "sha512-9UJ2xGDvQ43tYyVMpuHlsgApydB8ZKfVYTsLDhXkFL/6gfkp+U8xTGdh8pMJv1SpZna0zxG1DwsKZsreLbXBxw==", + "version": "6.21.0", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.21.0.tgz", + "integrity": "sha512-iwDZqg0QAGrg9Rav5H4n0M64c3mkR59cJ6wQp+7C4nI0gsmExaedaYLNO44eT4AtBBwjbTiGPMlt2Md0T9H9JQ==", "license": "MIT" }, "node_modules/universalify": { diff --git a/deployment-dapp/src/config/config.ts b/deployment-dapp/src/config/config.ts index 2e822a7..68ad574 100644 --- a/deployment-dapp/src/config/config.ts +++ b/deployment-dapp/src/config/config.ts @@ -1,37 +1,11 @@ //hosting url -export const HOST = 'https://bellecour.iex.ec'; //deployment parameters export const APP_NAME = 'web3telegram'; export const APP_TYPE = 'DOCKER'; export const FRAMEWORK = 'scone'; -//publish sell order parameters -export const DEFAULT_APP_PRICE = 0; -export const DEFAULT_APP_VOLUME = 1000000; export const APP_TAG = ['tee', 'scone']; -//ENS name -export const WEB3_TELEGRAM_ENS_DOMAIN = 'apps.iexec.eth'; -export const WEB3_TELEGRAM_ENS_NAME_DEV = `web3telegram-test.${WEB3_TELEGRAM_ENS_DOMAIN}`; -export const WEB3_TELEGRAM_ENS_NAME_PROD = `web3telegram.${WEB3_TELEGRAM_ENS_DOMAIN}`; - export const DOCKER_IMAGE_NAMESPACE = 'iexechub'; export const DOCKER_IMAGE_REPOSITORY = 'web3telegram-dapp'; - -// Use environment variable for sconified image tag if provided, otherwise fallback to computed tags -export const DOCKER_IMAGE_PROD_TAG = process.env.SCONIFIED_IMAGE_TAG; -export const DOCKER_IMAGE_DEV_TAG = process.env.SCONIFIED_IMAGE_TAG; - -//deployment targets for GitHub Actions -export const DEPLOY_TARGET_DEV = 'dapp-dev'; -export const DEPLOY_TARGET_PROD = 'dapp-prod'; -export const DEPLOY_TARGET_SELL_ORDER_DEV = 'dapp-publish-sell-order-dev'; -export const DEPLOY_TARGET_SELL_ORDER_PROD = 'dapp-publish-sell-order-prod'; -export const DEPLOY_TARGET_REVOKE_SELL_ORDER_DEV = 'dapp-revoke-sell-order-dev'; -export const DEPLOY_TARGET_REVOKE_SELL_ORDER_PROD = - 'dapp-revoke-sell-order-prod'; -export const DEPLOY_TARGET_PUSH_SECRET_DEV = 'dapp-push-secret-dev'; -export const DEPLOY_TARGET_PUSH_SECRET_PROD = 'dapp-push-secret-prod'; -export const DEPLOY_TARGET_CONFIGURE_ENS_DEV = 'configure-ens-dev'; -export const DEPLOY_TARGET_CONFIGURE_ENS_PROD = 'configure-ens-prod'; diff --git a/deployment-dapp/src/configureEnsNameScript.ts b/deployment-dapp/src/configureEnsNameScript.ts index 6e60211..ff6217d 100644 --- a/deployment-dapp/src/configureEnsNameScript.ts +++ b/deployment-dapp/src/configureEnsNameScript.ts @@ -1,61 +1,19 @@ -import { - DEPLOY_TARGET_CONFIGURE_ENS_DEV, - DEPLOY_TARGET_CONFIGURE_ENS_PROD, - DEPLOY_TARGET_DEV, - DEPLOY_TARGET_PROD, - WEB3_TELEGRAM_ENS_NAME_DEV, - WEB3_TELEGRAM_ENS_NAME_PROD, -} from './config/config.js'; -import { getIExec, loadAppAddress } from './utils/utils.js'; import { configureEnsName } from './singleFunction/configureEnsName.js'; +import { getIExec, loadAppAddress } from './utils/utils.js'; const main = async () => { - // get env variables from GitHub Actions - const { - DEPLOY_ENVIRONMENT, - WALLET_PRIVATE_KEY_DEV, - WALLET_PRIVATE_KEY_PROD, - DEPLOYED_APP_ADDRESS, // if already deployed in a previous step and want to configure ENS promoting configure-ens pipeline - ENS_NAME, - } = process.env; - - const deployTarget = DEPLOY_ENVIRONMENT; - - if ( - !deployTarget || - (deployTarget !== DEPLOY_TARGET_DEV && - deployTarget !== DEPLOY_TARGET_PROD && - deployTarget !== DEPLOY_TARGET_CONFIGURE_ENS_DEV && - deployTarget !== DEPLOY_TARGET_CONFIGURE_ENS_PROD) - ) - throw Error(`Invalid promote target ${deployTarget}`); - - const appAddress = DEPLOYED_APP_ADDRESS ?? (await loadAppAddress()); // use ALREADY_DEPLOYED_APP_ADDRESS when promoting configure-ens pipeline - let privateKey; - let ensName; - if ( - deployTarget === DEPLOY_TARGET_DEV || - deployTarget === DEPLOY_TARGET_CONFIGURE_ENS_DEV - ) { - privateKey = WALLET_PRIVATE_KEY_DEV; - ensName = ENS_NAME ?? WEB3_TELEGRAM_ENS_NAME_DEV; - } else if ( - deployTarget === DEPLOY_TARGET_PROD || - deployTarget === DEPLOY_TARGET_CONFIGURE_ENS_PROD - ) { - privateKey = WALLET_PRIVATE_KEY_PROD; - ensName = ENS_NAME ?? WEB3_TELEGRAM_ENS_NAME_PROD; - } + const { RPC_URL, WALLET_PRIVATE_KEY, DAPP_ENS_NAME } = process.env; - if (!privateKey) - throw Error(`Failed to get privateKey for target ${deployTarget}`); + const appAddress = await loadAppAddress(); - if (!ensName) - throw Error(`Failed to get ens name for target ${deployTarget}`); + if (!WALLET_PRIVATE_KEY) + throw Error(`Failed to get privateKey from environment variables`); - const iexec = getIExec(privateKey); + if (!DAPP_ENS_NAME) + throw Error(`Failed to get DAPP_ENS_NAME from environment variables`); - await configureEnsName(iexec, appAddress, ensName); + const iexec = getIExec(WALLET_PRIVATE_KEY, RPC_URL); + await configureEnsName(iexec, appAddress, DAPP_ENS_NAME); }; main().catch((e) => { diff --git a/deployment-dapp/src/deployScript.ts b/deployment-dapp/src/deployScript.ts index 5e284bf..aa33c48 100644 --- a/deployment-dapp/src/deployScript.ts +++ b/deployment-dapp/src/deployScript.ts @@ -1,65 +1,30 @@ import { deployApp } from './singleFunction/deployApp.js'; -import { - DOCKER_IMAGE_DEV_TAG, - DOCKER_IMAGE_PROD_TAG, - DEPLOY_TARGET_DEV, - DEPLOY_TARGET_PROD, -} from './config/config.js'; import { getIExec, saveAppAddress } from './utils/utils.js'; const main = async () => { // get env variables from GitHub Actions const { - DEPLOY_ENVIRONMENT, - WALLET_PRIVATE_KEY_DEV, - WALLET_PRIVATE_KEY_PROD, - DOCKER_IMAGE_CHECKSUM_DEV, - DOCKER_IMAGE_CHECKSUM_PROD, + RPC_URL, + WALLET_PRIVATE_KEY, + DOCKER_IMAGE_TAG, + CHECKSUM, + FINGERPRINT, } = process.env; - const deployTarget = DEPLOY_ENVIRONMENT; + if (!WALLET_PRIVATE_KEY) + throw Error(`Missing WALLET_PRIVATE_KEY environment variable`); - if ( - !deployTarget || - (deployTarget !== DEPLOY_TARGET_DEV && deployTarget !== DEPLOY_TARGET_PROD) - ) - throw Error(`Invalid promote target ${deployTarget}`); + const iexec = getIExec(WALLET_PRIVATE_KEY, RPC_URL); - let privateKey; - let checksum; - if (deployTarget === DEPLOY_TARGET_DEV) { - privateKey = WALLET_PRIVATE_KEY_DEV; - checksum = DOCKER_IMAGE_CHECKSUM_DEV; - } else if (deployTarget === DEPLOY_TARGET_PROD) { - privateKey = WALLET_PRIVATE_KEY_PROD; - checksum = DOCKER_IMAGE_CHECKSUM_PROD; + if (!DOCKER_IMAGE_TAG) { + throw Error(`Missing DOCKER_IMAGE_TAG environment variable.`); } - if (!privateKey) - throw Error(`Failed to get privateKey for target ${deployTarget}`); - - const iexec = getIExec(privateKey); - - let dockerImageTag; - if (deployTarget === DEPLOY_TARGET_DEV) { - dockerImageTag = DOCKER_IMAGE_DEV_TAG; - } else if (deployTarget === DEPLOY_TARGET_PROD) { - dockerImageTag = DOCKER_IMAGE_PROD_TAG; - } - - console.log(`Deploying with environment: ${deployTarget}`); - console.log(`Using image tag: ${dockerImageTag}`); - if (checksum) { - console.log(`Using pre-computed checksum: ${checksum}`); - } else { - console.log('Fetching checksum from Docker Hub...'); - } - - //deploy app const address = await deployApp({ iexec, - dockerTag: dockerImageTag, - checksum, + dockerTag: DOCKER_IMAGE_TAG, + checksum: CHECKSUM, + fingerprint: FINGERPRINT, }); await saveAppAddress(address); }; diff --git a/deployment-dapp/src/publishSellOrderScript.ts b/deployment-dapp/src/publishSellOrderScript.ts index 7175600..593b36e 100644 --- a/deployment-dapp/src/publishSellOrderScript.ts +++ b/deployment-dapp/src/publishSellOrderScript.ts @@ -1,83 +1,26 @@ -import { getIExec, loadAppAddress } from './utils/utils.js'; import { publishSellOrder } from './singleFunction/publishSellOrder.js'; -import { resolveName } from './singleFunction/resolveName.js'; -import { - DEPLOY_TARGET_SELL_ORDER_DEV, - DEPLOY_TARGET_SELL_ORDER_PROD, - DEPLOY_TARGET_DEV, - DEPLOY_TARGET_PROD, - DEFAULT_APP_PRICE, - DEFAULT_APP_VOLUME, - WEB3_TELEGRAM_ENS_NAME_DEV, - WEB3_TELEGRAM_ENS_NAME_PROD, -} from './config/config.js'; +import { getIExec, loadAppAddress } from './utils/utils.js'; import { - positiveStrictIntegerSchema, positiveNumberSchema, + positiveStrictIntegerSchema, } from './utils/validator.js'; const main = async () => { - // get env variables from GitHub Actions - const { - DEPLOY_ENVIRONMENT, - WALLET_PRIVATE_KEY_DEV, - WALLET_PRIVATE_KEY_PROD, - PRICE, - VOLUME, - } = process.env; - - const deployTarget = DEPLOY_ENVIRONMENT; - - if ( - !deployTarget || - ![ - DEPLOY_TARGET_DEV, - DEPLOY_TARGET_SELL_ORDER_DEV, - DEPLOY_TARGET_PROD, - DEPLOY_TARGET_SELL_ORDER_PROD, - ].includes(deployTarget) - ) - throw Error(`Invalid promote target ${deployTarget}`); - - let privateKey; - if ( - [DEPLOY_TARGET_DEV, DEPLOY_TARGET_SELL_ORDER_DEV].includes(deployTarget) - ) { - privateKey = WALLET_PRIVATE_KEY_DEV; - } else if ( - [DEPLOY_TARGET_PROD, DEPLOY_TARGET_SELL_ORDER_PROD].includes(deployTarget) - ) { - privateKey = WALLET_PRIVATE_KEY_PROD; - } - - if (!privateKey) { - throw Error(`Failed to get privateKey for target ${deployTarget}`); - } + const { RPC_URL, WALLET_PRIVATE_KEY, PRICE, VOLUME } = process.env; - const iexec = getIExec(privateKey); + const iexec = getIExec(WALLET_PRIVATE_KEY, RPC_URL); - const appAddress = await loadAppAddress().catch(() => { - console.log('No app address found falling back to ENS'); - let ensName; - if (deployTarget === DEPLOY_TARGET_SELL_ORDER_DEV) { - ensName = WEB3_TELEGRAM_ENS_NAME_DEV; - } else if (deployTarget === DEPLOY_TARGET_SELL_ORDER_PROD) { - ensName = WEB3_TELEGRAM_ENS_NAME_PROD; - } - if (!ensName) - throw Error(`Failed to get ens name for target ${deployTarget}`); - return resolveName(iexec, ensName); - }); + const appAddress = await loadAppAddress(); if (!appAddress) throw Error('Failed to get app address'); // If the app was not deployed, do not continue // validate params const price = await positiveNumberSchema() - .default(DEFAULT_APP_PRICE) + .required() .label('PRICE') .validate(PRICE); const volume = await positiveStrictIntegerSchema() - .default(DEFAULT_APP_VOLUME) + .required() .label('VOLUME') .validate(VOLUME); diff --git a/deployment-dapp/src/pushSecretScript.ts b/deployment-dapp/src/pushSecretScript.ts index 64c6dd1..5beafb9 100644 --- a/deployment-dapp/src/pushSecretScript.ts +++ b/deployment-dapp/src/pushSecretScript.ts @@ -1,78 +1,26 @@ -import { - DEPLOY_TARGET_DEV, - DEPLOY_TARGET_PROD, - DEPLOY_TARGET_PUSH_SECRET_DEV, - DEPLOY_TARGET_PUSH_SECRET_PROD, - WEB3_TELEGRAM_ENS_NAME_DEV, - WEB3_TELEGRAM_ENS_NAME_PROD, -} from './config/config.js'; import { pushSecret } from './singleFunction/pushSecret.js'; -import { resolveName } from './singleFunction/resolveName.js'; import { getIExec, loadAppAddress } from './utils/utils.js'; const main = async () => { - // get env variables from GitHub Actions - const { - DEPLOY_ENVIRONMENT, - WALLET_PRIVATE_KEY_DEV, - WALLET_PRIVATE_KEY_PROD, - TELEGRAM_BOT_TOKEN_DEV, - TELEGRAM_BOT_TOKEN_PROD, - } = process.env; + const { RPC_URL, WALLET_PRIVATE_KEY, TELEGRAM_BOT_TOKEN } = process.env; - const deployTarget = DEPLOY_ENVIRONMENT; + if (!WALLET_PRIVATE_KEY) + throw Error(`Missing WALLET_PRIVATE_KEY environment variable`); + if (!TELEGRAM_BOT_TOKEN) throw Error('Missing env TELEGRAM_BOT_TOKEN'); - if ( - !deployTarget || - ![ - DEPLOY_TARGET_DEV, - DEPLOY_TARGET_PROD, - DEPLOY_TARGET_PUSH_SECRET_DEV, - DEPLOY_TARGET_PUSH_SECRET_PROD, - ].includes(deployTarget) - ) - throw Error(`Invalid promote target ${deployTarget}`); + if (!WALLET_PRIVATE_KEY) + throw Error(`Missing WALLET_PRIVATE_KEY environment variable`); - let telegramBotToken; - let privateKey; - if ( - deployTarget === DEPLOY_TARGET_DEV || - deployTarget === DEPLOY_TARGET_PUSH_SECRET_DEV - ) { - telegramBotToken = TELEGRAM_BOT_TOKEN_DEV; - privateKey = WALLET_PRIVATE_KEY_DEV; - } else if ( - deployTarget === DEPLOY_TARGET_PROD || - deployTarget === DEPLOY_TARGET_PUSH_SECRET_PROD - ) { - telegramBotToken = TELEGRAM_BOT_TOKEN_PROD; - privateKey = WALLET_PRIVATE_KEY_PROD; - } - if (!telegramBotToken) throw Error('Missing env TELEGRAM_BOT_TOKEN'); - if (!privateKey) - throw Error(`Failed to get privateKey for target ${deployTarget}`); + const iexec = getIExec(WALLET_PRIVATE_KEY, RPC_URL); - const iexec = getIExec(privateKey); - - const appAddress = await loadAppAddress().catch(() => { - console.log('No app address found falling back to ENS'); - let ensName; - if (deployTarget === DEPLOY_TARGET_PUSH_SECRET_DEV) { - ensName = WEB3_TELEGRAM_ENS_NAME_DEV; - } else if (deployTarget === DEPLOY_TARGET_PUSH_SECRET_PROD) { - ensName = WEB3_TELEGRAM_ENS_NAME_PROD; - } - if (!ensName) - throw Error(`Failed to get ens name for target ${deployTarget}`); - return resolveName(iexec, ensName); - }); + const appAddress = await loadAppAddress(); if (!appAddress) throw Error('Failed to get app address'); // If the app was not deployed, do not continue - //push app secret to the secret management const jsonSecret = JSON.stringify({ - TELEGRAM_BOT_TOKEN: telegramBotToken, + TELEGRAM_BOT_TOKEN, }); + await pushSecret(iexec, appAddress, jsonSecret); }; diff --git a/deployment-dapp/src/revokeSellOrderScript.ts b/deployment-dapp/src/revokeSellOrderScript.ts index acda06a..b3e97c8 100644 --- a/deployment-dapp/src/revokeSellOrderScript.ts +++ b/deployment-dapp/src/revokeSellOrderScript.ts @@ -1,70 +1,16 @@ -import { getIExec, loadAppAddress } from './utils/utils.js'; import { revokeSellOrder } from './singleFunction/revokeSellOrder.js'; -import { resolveName } from './singleFunction/resolveName.js'; -import { - DEPLOY_TARGET_REVOKE_SELL_ORDER_DEV, - DEPLOY_TARGET_REVOKE_SELL_ORDER_PROD, - DEPLOY_TARGET_DEV, - DEPLOY_TARGET_PROD, - WEB3_TELEGRAM_ENS_NAME_DEV, - WEB3_TELEGRAM_ENS_NAME_PROD, -} from './config/config.js'; +import { getIExec, loadAppAddress } from './utils/utils.js'; import { orderHashSchema } from './utils/validator.js'; const main = async () => { // get env variables from GitHub Actions - const { - DEPLOY_ENVIRONMENT, - WALLET_PRIVATE_KEY_DEV, - WALLET_PRIVATE_KEY_PROD, - ORDER_HASH, - } = process.env; - - const deployTarget = DEPLOY_ENVIRONMENT; - - if ( - !deployTarget || - ![ - DEPLOY_TARGET_DEV, - DEPLOY_TARGET_REVOKE_SELL_ORDER_DEV, - DEPLOY_TARGET_PROD, - DEPLOY_TARGET_REVOKE_SELL_ORDER_PROD, - ].includes(deployTarget) - ) - throw Error(`Invalid promote target ${deployTarget}`); - - let privateKey; - if ( - [DEPLOY_TARGET_DEV, DEPLOY_TARGET_REVOKE_SELL_ORDER_DEV].includes( - deployTarget - ) - ) { - privateKey = WALLET_PRIVATE_KEY_DEV; - } else if ( - [DEPLOY_TARGET_PROD, DEPLOY_TARGET_REVOKE_SELL_ORDER_PROD].includes( - deployTarget - ) - ) { - privateKey = WALLET_PRIVATE_KEY_PROD; - } - - if (!privateKey) - throw Error(`Failed to get privateKey for target ${deployTarget}`); + const { RPC_URL, WALLET_PRIVATE_KEY, ORDER_HASH } = process.env; + if (!WALLET_PRIVATE_KEY) + throw Error(`Missing WALLET_PRIVATE_KEY environment variable`); - const iexec = getIExec(privateKey); + const iexec = getIExec(WALLET_PRIVATE_KEY, RPC_URL); - const appAddress = await loadAppAddress().catch(() => { - console.log('No app address found falling back to ENS'); - let ensName; - if (deployTarget === DEPLOY_TARGET_REVOKE_SELL_ORDER_DEV) { - ensName = WEB3_TELEGRAM_ENS_NAME_DEV; - } else if (deployTarget === DEPLOY_TARGET_REVOKE_SELL_ORDER_PROD) { - ensName = WEB3_TELEGRAM_ENS_NAME_PROD; - } - if (!ensName) - throw Error(`Failed to get ens name for target ${deployTarget}`); - return resolveName(iexec, ensName); - }); + const appAddress = await loadAppAddress(); if (!appAddress) throw Error('Failed to get app address'); // If the app was not deployed, do not continue diff --git a/deployment-dapp/src/singleFunction/configureEnsName.ts b/deployment-dapp/src/singleFunction/configureEnsName.ts index c4f0af7..ffd748b 100644 --- a/deployment-dapp/src/singleFunction/configureEnsName.ts +++ b/deployment-dapp/src/singleFunction/configureEnsName.ts @@ -1,5 +1,4 @@ import { ENS, IExec } from 'iexec'; -import { WEB3_TELEGRAM_ENS_DOMAIN } from '../config/config'; export const configureEnsName = async ( iexec: IExec, @@ -7,12 +6,6 @@ export const configureEnsName = async ( name: ENS ): Promise => { console.log(`Configuring ENS ${name} for app ${appAddress}`); - const label = name.split(`.${WEB3_TELEGRAM_ENS_DOMAIN}`)[0]; - const { registeredName, registerTxHash } = await iexec.ens.claimName( - label, - WEB3_TELEGRAM_ENS_DOMAIN - ); - console.log(`Claimed ${registeredName} (tx: ${registerTxHash})`); const result = await iexec.ens.configureResolution(name, appAddress); console.log(`Configured:\n${JSON.stringify(result, undefined, 2)}`); }; diff --git a/deployment-dapp/src/singleFunction/deployApp.ts b/deployment-dapp/src/singleFunction/deployApp.ts index 9c1ad4e..3b53cb7 100644 --- a/deployment-dapp/src/singleFunction/deployApp.ts +++ b/deployment-dapp/src/singleFunction/deployApp.ts @@ -5,10 +5,6 @@ import { DOCKER_IMAGE_NAMESPACE, DOCKER_IMAGE_REPOSITORY, } from '../config/config.js'; -import { - getDockerImageChecksum, - loadSconeFingerprint, -} from '../utils/utils.js'; export const deployApp = async ({ iexec, @@ -16,39 +12,31 @@ export const deployApp = async ({ dockerRepository = DOCKER_IMAGE_REPOSITORY, dockerTag, checksum, + fingerprint, }: { iexec: IExec; dockerNamespace?: string; dockerRepository?: string; dockerTag: string; checksum?: string; + fingerprint?: string; }): Promise => { const name = APP_NAME; const type = APP_TYPE; - // Use provided checksum or fetch from Docker Hub - const imageChecksum = - checksum || - (await getDockerImageChecksum( - dockerNamespace, - dockerRepository, - dockerTag - )); - - const fingerprint = await loadSconeFingerprint(); const mrenclave = { framework: 'SCONE' as any, // workaround framework not auto capitalized version: 'v5', entrypoint: 'node /app/app.js', heapSize: 1073741824, - fingerprint: fingerprint, + fingerprint, }; const app = { owner: await iexec.wallet.getAddress(), name, type, multiaddr: `${dockerNamespace}/${dockerRepository}:${dockerTag}`, - checksum: imageChecksum, + checksum, mrenclave, }; console.log(`Deploying app:\n${JSON.stringify(app, undefined, 2)}`); diff --git a/deployment-dapp/src/utils/utils.ts b/deployment-dapp/src/utils/utils.ts index 51a2f30..6e8e533 100644 --- a/deployment-dapp/src/utils/utils.ts +++ b/deployment-dapp/src/utils/utils.ts @@ -1,44 +1,22 @@ import fs from 'fs/promises'; import { IExec, utils } from 'iexec'; -import { HOST } from '../config/config.js'; -export const getIExec = (privateKey: string): IExec => { - const ethProvider = utils.getSignerFromPrivateKey(HOST, privateKey); - return new IExec({ - ethProvider, +export const getIExec = ( + privateKey: string, + host: string = 'bellecour' +): IExec => { + const ethProvider = utils.getSignerFromPrivateKey(host, privateKey, { + providers: {}, + allowExperimentalNetworks: true, }); -}; - -export const getDockerImageChecksum = async ( - namespace: string, - repository: string, - tag: string -): Promise => { - try { - const manifest = await fetch( - `https://hub.docker.com/v2/namespaces/${namespace}/repositories/${repository}/tags/${tag}` - ).then((res) => res.json()); - const digest = manifest.digest as string; - if (digest) { - return digest.replace('sha256:', '0x'); + return new IExec( + { + ethProvider, + }, + { + allowExperimentalNetworks: true, } - } catch (err) { - throw Error( - `Error inspecting image ${namespace}/${repository}:${tag}: ${err}` - ); - } -}; - -/** - * read the scone fingerprint from previously generated `.scone-fingerprint` - */ -export const loadSconeFingerprint = async (): Promise => { - try { - const fingerprint = await fs.readFile('.scone-fingerprint', 'utf8'); - return fingerprint.trim(); - } catch (err) { - throw Error(`Error reading .scone-fingerprint: ${err}`); - } + ); }; const APP_ADDRESS_FILE = '.app-address'; @@ -52,8 +30,8 @@ export const saveAppAddress = async (address: string) => */ export const loadAppAddress = async () => { try { - const appAddress = await fs.readFile(APP_ADDRESS_FILE, 'utf8'); - return appAddress.trim(); + const fingerprint = await fs.readFile(APP_ADDRESS_FILE, 'utf8'); + return fingerprint.trim(); } catch (err) { throw Error(`Error reading .app-address: ${err}`); }