Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove *Stub contracts from @development NPM package #3531

Open
2 tasks
pdyraga opened this issue Apr 18, 2023 · 0 comments · May be fixed by keep-network/tbtc-v2#623 or #3569
Open
2 tasks

Remove *Stub contracts from @development NPM package #3531

pdyraga opened this issue Apr 18, 2023 · 0 comments · May be fixed by keep-network/tbtc-v2#623 or #3569
Assignees

Comments

@pdyraga
Copy link
Member

pdyraga commented Apr 18, 2023

The problem

We have the WalletRegistryStub contract. This contract lands in the @development NPM package and is used by the client to generate bindings when running make all. The additional functionalities of the stub, forceAddWallet and getDkgData, are used only in unit tests of solidity/ecdsa.

The context

We have two deployment scripts defined:

"deploy": "hardhat deploy --export export.json",
"deploy:test": "USE_EXTERNAL_DEPLOY=true TEST_USE_STUBS_ECDSA=true hardhat deploy",

deploy:test is used in tests and deploys the WalletRegistryStub with additional functions. deploy is used in regular deployments. For example:

run: yarn deploy --network ${{ github.event.inputs.environment }}

For some reason, we decided to use deploy:test for the development NPM package publication:

# Deploy contracts to a local network to generate deployment artifacts that
# are required by dashboard and client compilation.
- name: Deploy contracts
run: yarn deploy:test --network hardhat --write true

That's why WalletRegistryStub gets into the @development package.

The solution

Having @development as a deploy from main (with no stubs) makes more sense. deploy:test should only be used for tests.

Tasks

  1. michalinacienciala
  2. michalinacienciala
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants