-
Notifications
You must be signed in to change notification settings - Fork 14
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
Migrate script/
JS files to TS
#184
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. |
scripts/timelock.ts
Outdated
/** | ||
* Deploy TimelockController contract | ||
*/ | ||
module.exports = async 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.
module.exports = async function () { | |
export async function () { |
why not use just export ?
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.
it's a commonJS syntaxe 🤔
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.
updated
scripts/timelock.ts
Outdated
}; | ||
|
||
// Add deployment tags | ||
module.exports.tags = ['TimelockController']; |
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.
idem
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.
removed
return !hasIncompatibleLayouts; | ||
} | ||
|
||
// Run the check if this file is being run directly |
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.
I was looking for that thanks
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.
Good job thanks 👍
const timelockFactory = new TimelockController__factory(owner); | ||
|
||
await factoryDeployer.deployWithFactory(timelockFactory, constructorArgs); |
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 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); |
Files Migrated
getFunctionSignatures.js
→getFunctionSignatures.ts
common-test-snapshot.js
→common-test-snapshot.ts
test-storage.js
→test-storage.ts
timelock.js
→timelock.ts