Skip to content

Commit

Permalink
removed leftovers from package migration
Browse files Browse the repository at this point in the history
  • Loading branch information
abarbatei committed Oct 6, 2023
1 parent abb2f97 commit dd0356c
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 30 deletions.
29 changes: 0 additions & 29 deletions packages/core/hardhat.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -433,33 +433,4 @@ const config: HardhatUserConfig = {
},
};

task(
'flat',
'Flattens and prints contracts and their dependencies (Resolves licenses)'
)
.addOptionalVariadicPositionalParam(
'files',
'The files to flatten',
undefined,
types.inputFile
)
.setAction(async ({files}, hre) => {
let flattened = await hre.run('flatten:get-flattened-sources', {files});

// Remove every line started with "// SPDX-License-Identifier:"
flattened = flattened.replace(
/SPDX-License-Identifier:/gm,
'License-Identifier:'
);
flattened = `// SPDX-License-Identifier: MIXED\n\n${flattened}`;

// Remove every line started with "pragma experimental ABIEncoderV2;" except the first one
flattened = flattened.replace(
/pragma experimental ABIEncoderV2;\n/gm,
((i) => (m: string) => (!i++ ? m : ''))(0)
);
console.log(flattened);
// more on this here https://github.com/NomicFoundation/hardhat/issues/1499
});

export default config;
1 change: 0 additions & 1 deletion packages/core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@
"@openzeppelin/contracts-0.6": "npm:@openzeppelin/[email protected]",
"@openzeppelin/contracts-0.8": "npm:@openzeppelin/[email protected]",
"@openzeppelin/contracts-0.8.13": "npm:@openzeppelin/[email protected]",
"@openzeppelin/contracts-0.8.15": "npm:@openzeppelin/[email protected]",
"@openzeppelin/contracts-upgradeable": "4.4.2",
"@openzeppelin/contracts-upgradeable-0.8.13": "npm:@openzeppelin/[email protected]",
"@types/chai": "^4.2.11",
Expand Down

0 comments on commit dd0356c

Please sign in to comment.