Skip to content

Conversation

zguesmi
Copy link
Member

@zguesmi zguesmi commented Jul 28, 2025

No description provided.

`Ownership of contract ${contractAddress} transferred from ${currentOwner} to ${ownerAddress}`,
);
}
}
Copy link
Contributor

Choose a reason for hiding this comment

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

EOF

/**
* Deploy proxy and facets.
*/
// TODO put inside init() function.
Copy link
Contributor

Choose a reason for hiding this comment

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

change the TODO ?

@zguesmi zguesmi marked this pull request as ready for review July 28, 2025 17:33
@zguesmi zguesmi self-assigned this Jul 28, 2025
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR adds the ability to set a custom owner address during contract deployment by introducing an optional owner field in the chain configuration and updating the deployment script to use this configured owner instead of defaulting to the deployer address.

  • Adds an optional owner field to the ChainConfig type
  • Updates deployment script to distinguish between deployer and final owner addresses
  • Implements ownership transfer functionality for all deployed contracts

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
utils/config.ts Adds optional owner field to ChainConfig type
deploy/0_deploy.ts Refactors deployment to use configured owner and implements ownership transfer
config/config.json Sets owner address for a specific chain configuration

Copy link

codecov bot commented Jul 28, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 83.66%. Comparing base (248e9ad) to head (d2be60a).
⚠️ Report is 6 commits behind head on develop.

Additional details and impacted files
@@           Coverage Diff            @@
##           develop     #245   +/-   ##
========================================
  Coverage    83.66%   83.66%           
========================================
  Files           38       38           
  Lines         1218     1218           
  Branches       227      227           
========================================
  Hits          1019     1019           
  Misses         199      199           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

.then((contract) => contract.waitForDeployment())
.then((contract) => contract.getAddress());
console.log(`New RLC token deployed at: ${rlcAddress}`);
await Ownable__factory.connect(rlcAddress, deployer)
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
await Ownable__factory.connect(rlcAddress, deployer)
await RLC__factory.connect(rlcAddress, deployer)

more readable

@zguesmi zguesmi merged commit 619b0b8 into develop Jul 28, 2025
4 checks passed
@zguesmi zguesmi deleted the feature/owner-setup branch July 28, 2025 17:44
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