@1inch/solidity-utils 2.2.14 → 2.2.15

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -6,8 +6,10 @@ pragma abicoder v1;
6
6
  type Address is uint256;
7
7
 
8
8
  library AddressLib {
9
+ uint256 private constant _LOW_160_BIT_MASK = (1 << 160) - 1;
10
+
9
11
  function get(Address a) internal pure returns (address) {
10
- return address(uint160(Address.unwrap(a)));
12
+ return address(uint160(Address.unwrap(a) & _LOW_160_BIT_MASK));
11
13
  }
12
14
 
13
15
  function getFlag(Address a, uint256 flag) internal pure returns (bool) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@1inch/solidity-utils",
3
- "version": "2.2.14",
3
+ "version": "2.2.15",
4
4
  "main": "dist/src/index.js",
5
5
  "types": "dist/src/index.d.ts",
6
6
  "repository": {