Add job deploying contracts from `dapp-development` branch
There are situations when team developing T Token Dashboard needs to
locally test some functionalities using modified contracts, for example
ones with shorter authorization decrease delay. We decided to create a
dapp-development branch in each of the upstream modules of
threshold-network/token-dashboard CI module, which would store the
code of these modified contracts. In this PR we create a
contracts-dapp-development-deployment-testnet job which deploys the
contracts, creates an NPM package (with dappdev<environment> suffix
an dapp-development-<environment> tag) and publishes it to the NPM
registry. At the end, the job also starts similar deployment for a
downstream module. The job gets triggered only as a result of
workflow_dispath event from a dapp-development branch. Currently
only goerli environment is supported. We don't run system and unit
tests for dapp-development branch, as the tests are not configured to
work with the modified contracts.
Generally, the goal of the changes is to have the full set of
dapp-development-friendly contracts deployed to the NPM registry, so
that the dApp developers could quickly use them by upgrading the
token-dashboard dependencies using yarn upgrade <package-name>@dapp-development-goerli.
If the workflow gets dispatched from a different branch than
dapp-development, the deploy will behave as it used to, publishing
package with deployed unmodified contracts to the NPM registry under
<environment> tag.
TODO:
- [x] Adjust the PR to be in line witch changes from #3111
- [x] Modify the secret for the deployer account in the
contracts-dapp-development-deployment-testnetjob - [x] Bump actions to latest versions
- [x] Add Docker publishing to
contracts-dapp-development-deployment-testnetjob - [x] Test the workflow. For that we need:
- [x] https://github.com/threshold-network/solidity-contracts/pull/119 merged to
mainanddapp-development-goerli-taggedthreshold-networkpackage published - [x] #3061 and #3096 merged to
main - [x] PR for
ecdsacontracts deployment on Goerli merged tomain - [x]
dapp-developmentbranch created & ready: https://github.com/keep-network/keep-core/pull/3118
- [x] https://github.com/threshold-network/solidity-contracts/pull/119 merged to
- [x] Remove the
dry-runfrom the code
Refs: https://github.com/threshold-network/token-dashboard/issues/136 https://github.com/threshold-network/solidity-contracts/pull/119 https://github.com/keep-network/tbtc-v2/pull/392
PR ready for review. I've dry-runned the random-beacon deployment here: https://github.com/keep-network/keep-core/runs/7896649853?check_suite_focus=true.
When checking deployment for ecdsa using dapp-development code I got a failure, see my comment here. I suspect it's a problem with #3118, not #3121. I think we could merge the #3121 without the fix for that issue if everything else looks ok during the review.