Skip to content

Conversation

@nkuba
Copy link
Member

@nkuba nkuba commented Apr 25, 2022

When a KeepRegistry deployed contract is not found for local network we
wan to deploy a stub. The script can also be used by external projects
to deploy threshold network contract dependencies. When we used
keepDeployer the external projects deployment was failing as it
required the account to be defined also in the other project's hardhat
configuration file. To fix that we use deployer named account to
deploy the stub, as it will for sure be defined in other projects.

To call the approveOperatorContract we use keepRegistryKeeper which
is defined by default as account 0 and it matches the deployer.

When a KeepRegistry deployed contract is not found for local network we
wan to deploy a stub. The script can also be used by external projects
to deploy threshold network contract dependencies. When we used
`keepDeployer` the external projects deployment was failing as it
required the account to be defined also in the other project's hardhat
configuration file. To fix that we use `deployer` named account to
deploy the stub, as it will for sure be defined in other projects.

To call the `approveOperatorContract` we use `keepRegistryKeeper` which
is defined by default as account `0` and it matches the `deployer`.
},
keepDeployer: {
default: 0,
keepRegistryKeeper: {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe keepRegistryOwner or keepRegistryGuvnor? Keeper of keep registry sounds weird but if you don't think the alternatives are any better, I can also merge as-is.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree it doesn't sound good, but I wanted to match the role that is defined in KeepRegistry that is named registryKeeper.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, makes sense!

@pdyraga pdyraga enabled auto-merge April 25, 2022 10:05
@pdyraga pdyraga merged commit 9176943 into main Apr 25, 2022
@pdyraga pdyraga deleted the fix-keep-registry-resolve branch April 25, 2022 10:08
michalinacienciala added a commit that referenced this pull request Apr 25, 2022
…ve-2

Use deployer as a fallback to call approveOperatorContract

For ropsten we expect that approveOperatorContract will be called by the
account that is defined as keepRegistryKeeper in the hardhat config,
but for hardhat local network and for usage in external project it's
just fine to assume the deployer will be used as a fallback, so the
external project doesn't have to define keepRegistryKeeper.

This is a continuation of #92
@pdyraga pdyraga added this to the v1.2.0 milestone Sep 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants