Skip to content

Commit 8f9e942

Browse files
committed
script: use absolute path instead of contract name
1 parent a2e04cc commit 8f9e942

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

script/libraries/LibInitializeGuard.sol

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -277,7 +277,7 @@ library LibInitializeGuard {
277277
string[] memory inputs = new string[](4);
278278
inputs[0] = "forge";
279279
inputs[1] = "inspect";
280-
inputs[2] = _getContractName($cache._chainInfo[proxy].forkId, proxy);
280+
inputs[2] = _getContractAbsolutePath($cache._chainInfo[proxy].forkId, proxy);
281281
inputs[3] = "methodIdentifiers";
282282

283283
string memory ret = vm.toLowercase(string(vm.ffi(inputs)));
@@ -301,7 +301,7 @@ library LibInitializeGuard {
301301
string[] memory inputs = new string[](4);
302302
inputs[0] = "forge";
303303
inputs[1] = "inspect";
304-
inputs[2] = _getContractName($cache._chainInfo[proxy].forkId, proxy);
304+
inputs[2] = _getContractAbsolutePath($cache._chainInfo[proxy].forkId, proxy);
305305
inputs[3] = "storage";
306306

307307
string memory ret = string(vm.ffi(inputs));
@@ -322,12 +322,12 @@ library LibInitializeGuard {
322322
}
323323

324324
/**
325-
* @dev Get the contract name by the given `addr` and `forkId`.
325+
* @dev Get the contract absolute path by the given `addr` and `forkId`.
326326
*/
327-
function _getContractName(uint256 forkId, address addr) private view returns (string memory contractName) {
327+
function _getContractAbsolutePath(uint256 forkId, address addr) private view returns (string memory contractName) {
328328
TNetwork networkType = vme.getNetworkTypeByForkId(forkId);
329329
TContract contractType = vme.getContractTypeByRawData(networkType, addr);
330-
contractName = vme.getContractName(contractType);
330+
contractName = vme.getContractAbsolutePath(contractType);
331331
}
332332

333333
/**

0 commit comments

Comments
 (0)