keep-core icon indicating copy to clipboard operation
keep-core copied to clipboard

Remove *Stub contracts from @development NPM package

Open pdyraga opened this issue 2 years ago • 0 comments

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: https://github.com/keep-network/keep-core/blob/0484ddbc1c19715afb897a914d0f0f633421ba78/solidity/ecdsa/package.json#L31-L32

deploy:test is used in tests and deploys the WalletRegistryStub with additional functions. deploy is used in regular deployments. For example: https://github.com/keep-network/keep-core/blob/0484ddbc1c19715afb897a914d0f0f633421ba78/.github/workflows/contracts-ecdsa.yml#L328

For some reason, we decided to use deploy:test for the development NPM package publication: https://github.com/keep-network/keep-core/blob/0484ddbc1c19715afb897a914d0f0f633421ba78/.github/workflows/npm-ecdsa.yml#L40-L43

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
- [ ] https://github.com/keep-network/keep-core/pull/3569
- [ ] https://github.com/keep-network/tbtc-v2/pull/623

pdyraga avatar Apr 18 '23 09:04 pdyraga