Skip to content

Commit

Permalink
chore: refactor code
Browse files Browse the repository at this point in the history
  • Loading branch information
tringuyenskymavis committed Aug 27, 2024
1 parent e17b0cd commit dd5c9c2
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions script/libraries/LibInitializeGuard.sol
Original file line number Diff line number Diff line change
Expand Up @@ -327,10 +327,8 @@ library LibInitializeGuard {
function _getContractAbsolutePath(uint256 forkId, address addr) private view returns (string memory contractName) {
TNetwork networkType = vme.getNetworkTypeByForkId(forkId);
TContract contractType = vme.getContractTypeByRawData(networkType, addr);
string memory contractTypeName = vme.getContractName(contractType);
string memory contractNameMap = _getContractNameFromAbsolutePath(vme.getContractAbsolutePath(contractType));
contractName =
(keccak256(bytes(contractNameMap)) == keccak256(bytes(contractTypeName))) ? contractTypeName : contractNameMap;
contractName = contractNameMap;
}

function _getContractNameFromAbsolutePath(string memory path) internal pure returns (string memory contractName) {
Expand Down

0 comments on commit dd5c9c2

Please sign in to comment.