Skip to content

Conversation

@ericglau
Copy link
Member

Fixes #1026

Defender deployments are run using the internal defenderDeploy function, which takes constructor arguments directly using the ...args argument. This function can deploy proxies or implementations.

However, users may provide constructorArgs to specify constructor args for the implementation contract. These should not apply to the proxy deployment itself.

Therefore, the internal defenderDeploy function should use its args to override the ones in opts.constructorArgs, so that the correct arguments are used for each specific deployment.

@ericglau ericglau requested a review from a team May 29, 2024 15:04
@ericglau ericglau enabled auto-merge (squash) May 30, 2024 20:44
@ericglau ericglau disabled auto-merge May 30, 2024 20:47
@ericglau ericglau requested a review from Amxx May 30, 2024 20:47
@ericglau ericglau marked this pull request as draft May 31, 2024 13:59
@ericglau ericglau marked this pull request as ready for review May 31, 2024 14:51
@ericglau ericglau requested a review from Amxx May 31, 2024 15:04
@ericglau
Copy link
Member Author

ericglau commented May 31, 2024

Updated to encode constructor data and use constructorBytecode according to comments above.

@ericglau ericglau requested a review from MCarlomagno May 31, 2024 15:08
Copy link
Member

@MCarlomagno MCarlomagno left a comment

Choose a reason for hiding this comment

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

LGTM

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.

Defender DeployProxy not working when using constructorArgs

3 participants