Migrate script/ JS files to TS - #184
Merged
Merged
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## develop #184 +/- ##
========================================
Coverage 84.50% 84.50%
========================================
Files 35 35
Lines 1084 1084
Branches 221 221
========================================
Hits 916 916
Misses 168 168 ☔ View full report in Codecov by Sentry. |
Le-Caignec
reviewed
Feb 11, 2025
| /** | ||
| * Deploy TimelockController contract | ||
| */ | ||
| module.exports = async function () { |
Contributor
There was a problem hiding this comment.
Suggested change
| module.exports = async function () { | |
| export async function () { |
why not use just export ?
Contributor
There was a problem hiding this comment.
it's a commonJS syntaxe 🤔
| }; | ||
|
|
||
| // Add deployment tags | ||
| module.exports.tags = ['TimelockController']; |
zguesmi
reviewed
Feb 11, 2025
| return !hasIncompatibleLayouts; | ||
| } | ||
|
|
||
| // Run the check if this file is being run directly |
Contributor
There was a problem hiding this comment.
I was looking for that thanks
james-toussaint
approved these changes
Feb 11, 2025
james-toussaint
left a comment
Contributor
There was a problem hiding this comment.
Good job thanks 👍
Le-Caignec
approved these changes
Feb 11, 2025
zguesmi
reviewed
Feb 11, 2025
| const constructorArgs = [ONE_WEEK_IN_SECONDS, ADMINISTRATORS, PROPOSERS, EXECUTORS]; | ||
| const timelockFactory = new TimelockController__factory(owner); | ||
|
|
||
| await factoryDeployer.deployWithFactory(timelockFactory, constructorArgs); |
Member
There was a problem hiding this comment.
Suggested change
| await factoryDeployer.deployWithFactory(timelockFactory, constructorArgs); | |
| const timelockAddress = await factoryDeployer.deployWithFactory(timelockFactory, constructorArgs); | |
| await deployments.save('TimelockController', { | |
| abi: TimelockController__factory.abi as unknown as ABI, | |
| address: timelockAddress, | |
| bytecode: TimelockController__factory.bytecode, | |
| args: constructorArgs, | |
| }); | |
| console.log('Timelock:', timelockAddress); |
zguesmi
approved these changes
Feb 11, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Files Migrated
getFunctionSignatures.js→getFunctionSignatures.tscommon-test-snapshot.js→common-test-snapshot.tstest-storage.js→test-storage.tstimelock.js→timelock.ts