From cc431f53e03cffb71a0d08c91f934e3251807eb6 Mon Sep 17 00:00:00 2001 From: Hadrien Croubois Date: Thu, 1 Feb 2024 22:36:31 +0100 Subject: [PATCH] Remove deprecated Truffle code (#4868) --- hardhat/env-artifacts.js | 17 ----------------- 1 file changed, 17 deletions(-) diff --git a/hardhat/env-artifacts.js b/hardhat/env-artifacts.js index 4cda9387cc3..e97ae6468e3 100644 --- a/hardhat/env-artifacts.js +++ b/hardhat/env-artifacts.js @@ -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) {