Analyse the code for dependencies of both files
Create a single library contract ProofLib.sol and include code from both files. Library contract name: ProofLib.sol because all 3 methods are proof related.
bytes32ToBytes method is common among them. util.sol has more methods but it's not used anywhere.
Preserve / mention the credit of original repo in the header.
Update the test cases.
Github Code
Problem
Currently there are 2 utility files OpenSTHelper.sol and util.sol There is a code repetition for one function bytes32tobytes. util.sol
method: bytes32ToBytes Consumed By: Core.sol Type: Contract
OpenSTHelper.sol
methods: bytes32ToBytes, storageVariablePath, verifyIntentStorage Consumed By: OpenSTUtility.sol, OpenSTValue.sol, OpenSTHelperTest.sol Type: Library
Solution
Analyse the code for dependencies of both files Create a single library contract ProofLib.sol and include code from both files. Library contract name: ProofLib.sol because all 3 methods are proof related. bytes32ToBytes method is common among them. util.sol has more methods but it's not used anywhere. Preserve / mention the credit of original repo in the header. Update the test cases. Github Code
util.sol => https://github.com/OpenSTFoundation/openst-protocol/blob/f2f3b7c0fc3e440225b339733b4bac85282d3d36/contracts/util.sol#L15 Core.sol => https://github.com/OpenSTFoundation/openst-protocol/blob/f2f3b7c0fc3e440225b339733b4bac85282d3d36/contracts/Core.sol#L133
OpenSTHelper.sol => https://github.com/OpenSTFoundation/openst-protocol/blob/develop/contracts/OpenSTHelper.sol OpenSTUtility.sol => https://github.com/OpenSTFoundation/openst-protocol/blob/f2f3b7c0fc3e440225b339733b4bac85282d3d36/contracts/OpenSTUtility.sol#L311 OpenSTValue.sol => https://github.com/OpenSTFoundation/openst-protocol/blob/f2f3b7c0fc3e440225b339733b4bac85282d3d36/contracts/OpenSTValue.sol#L452 OpenSTHelperTest.sol => https://github.com/OpenSTFoundation/openst-protocol/blob/develop/contracts/OpenSTHelperTest.sol