Skip to content

[Improvement] Deploy script deploys a different contract than indicated by constants and comments #47

@dhruvi-16-me

Description

@dhruvi-16-me

Description

The deployment script contains multiple references to different contract names, but only one contract is actually deployed. These references contradict each other and make the script confusing and error-prone for contributors.

Problem

In deploy/deploy.script.ts:

  • CONTRACT_TO_DEPLOY is set to AllPayAuction
  • The file comment suggests changing this value to deploy different auction contracts
  • A separate variable (auctionName) is set to LogarithmicReverseDutchAuction
  • The script actually deploys MockToken
  • The console log prints auctionName, not the deployed contract

As a result, the script does not deploy the contract it claims to deploy, and the output log is misleading.

Expected Behavior

The deployment script should:

  • Deploy the contract specified by a single source of truth
  • Log the name of the contract that is actually deployed
  • Avoid contradictory comments, constants, and variables

Actual Behavior

The script deploys MockToken while constants, comments, and logs reference different auction contracts.

Impact

  • Confusing for new contributors
  • Easy to deploy the wrong contract by mistake
  • Reduces reliability of the deployment workflow

Suggested Fix

Use a single variable (e.g. CONTRACT_TO_DEPLOY) to:

  • Select the contract factory
  • Deploy the contract
  • Print the deployment log

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions