Skip to content

Commit

Permalink
Merge pull request #639 from threshold-network/update-t-cov-pools-dep…
Browse files Browse the repository at this point in the history
…endency

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).

Ref: #613
  • Loading branch information
michalsmiarowski authored Nov 22, 2023
2 parents 462be69 + ce23262 commit 6d8b382
Showing 1 changed file with 21 additions and 5 deletions.
26 changes: 21 additions & 5 deletions .github/workflows/reusable-build-and-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -133,6 +130,23 @@ jobs:
# version of the `keep-core` package, because using `goerli` tag results
# 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: |
Expand All @@ -141,8 +155,10 @@ jobs:
@keep-network/[email protected] \
@keep-network/keep-ecdsa@${{ inputs.environment }} \
@keep-network/tbtc@${{ inputs.environment }} \
@keep-network/coverage-pools@${{ inputs.environment }} \
@keep-network/random-beacon@${{ steps.set-packages-versions.outputs.random-beacon-contracts-version }} \
@keep-network/[email protected] \
@threshold-network/coverage-pools@npm:@keep-network/coverage-pools@${{ inputs.environment }} \
@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.
Expand Down

0 comments on commit 6d8b382

Please sign in to comment.