We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a34c9cf commit 6306e75Copy full SHA for 6306e75
packages/cli/src/command-helpers/abi.ts
@@ -153,7 +153,7 @@ export const getContractNameForAddress = async (
153
const contractSourceCode = await fetchSourceCodeFromEtherscan(network, address);
154
let contractName = contractSourceCode.result[0].ContractName;
155
// Some explorers will return the full path of the contract instead of just the name
156
- const regex = /^contracts\/(?<contract>.+)\.sol:\1$/;
+ const regex = /(?<contract>.+)\.sol:\1$/;
157
158
if (regex.test(contractName)) contractName = regex.exec(contractName)?.groups?.contract;
159
0 commit comments