We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
BaseLib
1 parent 712ce78 commit e66ff12Copy full SHA for e66ff12
contracts/libraries/BaseLib.sol
@@ -15,11 +15,14 @@ library BaseLib {
15
returns (BaseParams memory baseParams)
16
{
17
baseParams.addr = addr;
18
+
19
+ try IVersion(addr).version() returns (uint256 version) {
20
+ baseParams.version = version;
21
+ } catch {}
22
23
try IVersion(addr).contractType() returns (bytes32 contractType) {
- baseParams.version = IVersion(addr).version();
24
baseParams.contractType = contractType;
25
} catch {
- baseParams.version = 3_00;
26
baseParams.contractType = defaultContractType;
27
}
28
0 commit comments