-
Notifications
You must be signed in to change notification settings - Fork 14
feat: Set owner at deployment #245
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
deploy/0_deploy.ts
Outdated
`Ownership of contract ${contractAddress} transferred from ${currentOwner} to ${ownerAddress}`, | ||
); | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
EOF
deploy/0_deploy.ts
Outdated
/** | ||
* Deploy proxy and facets. | ||
*/ | ||
// TODO put inside init() function. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
change the TODO ?
There was a problem hiding this 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 theChainConfig
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 |
Codecov Report✅ All modified and coverable lines are covered by tests. 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. 🚀 New features to boost your workflow:
|
.then((contract) => contract.waitForDeployment()) | ||
.then((contract) => contract.getAddress()); | ||
console.log(`New RLC token deployed at: ${rlcAddress}`); | ||
await Ownable__factory.connect(rlcAddress, deployer) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
await Ownable__factory.connect(rlcAddress, deployer) | |
await RLC__factory.connect(rlcAddress, deployer) |
more readable
No description provided.