Skip to content

Commit

Permalink
Remove deprecated Truffle code (OpenZeppelin#4868)
Browse files Browse the repository at this point in the history
  • Loading branch information
Amxx authored Feb 1, 2024
1 parent 7eba10d commit cc431f5
Showing 1 changed file with 0 additions and 17 deletions.
17 changes: 0 additions & 17 deletions hardhat/env-artifacts.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,23 +10,6 @@ function isExpectedError(e, suffix) {
extendEnvironment(hre => {
const suffixes = ['UpgradeableWithInit', 'Upgradeable', ''];

// Truffe (deprecated)
const originalRequire = hre.artifacts.require;
hre.artifacts.require = function (name) {
for (const suffix of suffixes) {
try {
return originalRequire.call(this, name + suffix);
} catch (e) {
if (isExpectedError(e, suffix)) {
continue;
} else {
throw e;
}
}
}
throw new Error('Unreachable');
};

// Ethers
const originalReadArtifact = hre.artifacts.readArtifact;
hre.artifacts.readArtifact = async function (name) {
Expand Down

0 comments on commit cc431f5

Please sign in to comment.