Skip to content
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

Merged
merged 18 commits into from
Feb 11, 2025
Merged

Conversation

gfournieriExec
Copy link
Contributor

Files Migrated

  • getFunctionSignatures.jsgetFunctionSignatures.ts
  • common-test-snapshot.jscommon-test-snapshot.ts
  • test-storage.jstest-storage.ts
  • timelock.jstimelock.ts

Copy link

codecov bot commented Feb 11, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 84.50%. Comparing base (0b0ac0a) to head (f1ee3ea).
Report is 19 commits behind head on develop.

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.
📢 Have feedback on the report? Share it here.

/**
* Deploy TimelockController contract
*/
module.exports = async function () {

Choose a reason for hiding this comment

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

Suggested change
module.exports = async function () {
export async function () {

why not use just export ?

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 🤔

Copy link
Contributor Author

Choose a reason for hiding this comment

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

updated

};

// Add deployment tags
module.exports.tags = ['TimelockController'];

Choose a reason for hiding this comment

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

idem

Copy link
Contributor Author

Choose a reason for hiding this comment

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

removed

migrations/utils/getFunctionSignatures.ts Outdated Show resolved Hide resolved
scripts/test-storage.ts Outdated Show resolved Hide resolved
scripts/test-storage.ts Show resolved Hide resolved
scripts/test-storage.ts Show resolved Hide resolved
scripts/test-storage.ts Show resolved Hide resolved
scripts/timelock.ts Outdated Show resolved Hide resolved
scripts/timelock.ts Outdated Show resolved Hide resolved
scripts/timelock.ts Outdated Show resolved Hide resolved
scripts/timelock.ts Outdated Show resolved Hide resolved
scripts/timelock.ts Outdated Show resolved Hide resolved
return !hasIncompatibleLayouts;
}

// Run the check if this file is being run directly
Copy link
Member

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

Copy link
Member

@jeremyjams jeremyjams left a 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);
Copy link
Member

Choose a reason for hiding this comment

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

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);

@gfournieriExec gfournieriExec merged commit b22de91 into develop Feb 11, 2025
4 checks passed
@gfournieriExec gfournieriExec deleted the feature/update-script-js-files branch February 12, 2025 09:03
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.

4 participants