From 62db6ffc2f79e86069c0310494b0f16bf3aa265c Mon Sep 17 00:00:00 2001 From: Michalina Date: Wed, 4 Oct 2023 15:24:06 +0200 Subject: [PATCH 1/2] Update T coverage-pools dependency In the `package.json` there are two different versions of `coverage-pools` used. This is done to allow using contracts from two different cov pool versions on the mainnet (needed for computations of the TVL-related fields) - one relates to KEEP token cov pool (<2.0.0) and one to to T token one (>=2.0.0). On the testnet environmet we currently don't have the T token cov pool deployed. The latest `goerli`- tagged version of the cov-pools package (`1.1.0-goerli.0`) contains KEEP-token related contracts. We want to stick to this version (we'll need to update it once we switch to Sepolia). For the `@threshold-network/coverage-pools` ideally we'd want to use a T token related pool, which if deployed for given environment, should be present in the latest `goerli`/`sepolia` package. If the T-related pool is not yet deployed for given environment, KEEP-related cov-pool contracts will be used in all TVL computations (which differs from the mainnet behavior, but is acceptable on the test env). --- .../workflows/reusable-build-and-publish.yml | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/.github/workflows/reusable-build-and-publish.yml b/.github/workflows/reusable-build-and-publish.yml index 0c6e71482..a03d0f66e 100644 --- a/.github/workflows/reusable-build-and-publish.yml +++ b/.github/workflows/reusable-build-and-publish.yml @@ -144,6 +144,22 @@ jobs: # in `expected manifest` error - probably caused by bug in Yarn: # https://github.com/yarnpkg/yarn/issues/4731. + # In the `package.json` there are two different versions of + # `coverage-pools` used. This is done to allow using contracts from two + # different cov pool versions on the mainnet (needed for computations of + # the TVL-related fields) - one relates to KEEP token cov pool (<2.0.0) + # and one to to T token one (>=2.0.0). + # On the testnet environmet we currently don't have the T token cov pool + # deployed. The latest `goerli`- tagged version of the cov-pools package + # (`1.1.0-goerli.0`) contains KEEP-token related contracts. We want to + # stick to this version (we'll need to update it once we switch to + # Sepolia). For the `@threshold-network/coverage-pools` ideally we'd want + # to use a T token related pool, which if deployed for given environment, + # should be present in the latest `goerli`/`sepolia` package. If the + # T-related pool is not yet deployed for given environment, KEEP-related + # cov-pool contracts will be used in all TVL computations (which differs + # from the mainnet behavior, but is acceptable on the test env). + - name: Resolve contracts shell: bash run: | @@ -152,7 +168,8 @@ jobs: @keep-network/keep-core@1.8.1-goerli.0 \ @keep-network/keep-ecdsa@${{ inputs.environment }} \ @keep-network/tbtc@${{ inputs.environment }} \ - @keep-network/coverage-pools@${{ inputs.environment }} \ + @keep-network/coverage-pools@1.1.0-goerli.0 \ + @threshold-network/coverage-pools@npm:@keep-network/coverage-pools@${{ inputs.environment }} \ @keep-network/ecdsa@${{ steps.set-packages-versions.outputs.ecdsa-contracts-version }} \ @keep-network/random-beacon@${{ steps.set-packages-versions.outputs.random-beacon-contracts-version }} \ @keep-network/tbtc-v2@${{ steps.set-packages-versions.outputs.tbtc-v2-contracts-version }} \ From ce232625d16fc938a11520d0027b756b4e6d7576 Mon Sep 17 00:00:00 2001 From: Michalina Date: Wed, 22 Nov 2023 12:59:19 +0100 Subject: [PATCH 2/2] Remove obsolete actions In commit 29853e3cc74013d837221d12c04a6d7d419ecc8b we've removed `@keep-network/ecdsa, ` dependency, we no longer need to set the version of the corresponding package. We also no longer have a dependency to `@keep-network/tbtc-v2` and don't need to deploy new packages after changes of `@keep-network/tbtc-v2.ts`, so we don't need to set versions there as well. --- .github/workflows/reusable-build-and-publish.yml | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/.github/workflows/reusable-build-and-publish.yml b/.github/workflows/reusable-build-and-publish.yml index 6a043204b..96ca5f537 100644 --- a/.github/workflows/reusable-build-and-publish.yml +++ b/.github/workflows/reusable-build-and-publish.yml @@ -113,9 +113,6 @@ jobs: query: | threshold-contracts-version = github.com/threshold-network/solidity-contracts#version random-beacon-contracts-version = github.com/keep-network/keep-core/random-beacon#version - ecdsa-contracts-version = github.com/keep-network/keep-core/ecdsa#version - tbtc-v2-contracts-version = github.com/keep-network/tbtc-v2#version - tbtc-v2-ts-version = github.com/keep-network/tbtc-v2.ts#version - name: Set packages versions shell: bash @@ -160,7 +157,8 @@ jobs: @keep-network/tbtc@${{ inputs.environment }} \ @keep-network/coverage-pools@1.1.0-goerli.0 \ @threshold-network/coverage-pools@npm:@keep-network/coverage-pools@${{ inputs.environment }} \ - @keep-network/random-beacon@${{ steps.set-packages-versions.outputs.random-beacon-contracts-version }} \ + @keep-network/random-beacon@${{ steps.set-packages-versions.outputs.random-beacon-contracts-version }} + - name: Run postinstall script shell: bash # `yarn upgrade` doesn't trigger the `postinstall` script.