@layerzerolabs/lz-evm-oapp-v2 2.1.27 → 2.2.1

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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,28 @@
1
1
  # @layerzerolabs/lz-evm-oapp-v2
2
2
 
3
+ ## 2.2.1
4
+
5
+ ### Patch Changes
6
+
7
+ - fb15753: new endpoints. 4 testnets xlayer, form, ll1, mantasep, 2 mainnet Merlin, Degen
8
+ - Updated dependencies [fb15753]
9
+ - @layerzerolabs/lz-evm-v1-0.7@2.2.1
10
+ - @layerzerolabs/lz-evm-messagelib-v2@2.2.1
11
+ - @layerzerolabs/lz-evm-protocol-v2@2.2.1
12
+
13
+ ## 2.2.0
14
+
15
+ ### Minor Changes
16
+
17
+ - aa51c78: updated sandbox chain keys for frontend
18
+
19
+ ### Patch Changes
20
+
21
+ - Updated dependencies [aa51c78]
22
+ - @layerzerolabs/lz-evm-v1-0.7@2.2.0
23
+ - @layerzerolabs/lz-evm-messagelib-v2@2.2.0
24
+ - @layerzerolabs/lz-evm-protocol-v2@2.2.0
25
+
3
26
  ## 2.1.27
4
27
 
5
28
  ### Patch Changes
@@ -1398,7 +1398,7 @@
1398
1398
  "type": "uint8"
1399
1399
  }
1400
1400
  ],
1401
- "stateMutability": "pure",
1401
+ "stateMutability": "view",
1402
1402
  "type": "function"
1403
1403
  },
1404
1404
  {
@@ -1207,7 +1207,7 @@
1207
1207
  "type": "uint8"
1208
1208
  }
1209
1209
  ],
1210
- "stateMutability": "pure",
1210
+ "stateMutability": "view",
1211
1211
  "type": "function"
1212
1212
  },
1213
1213
  {
@@ -1207,7 +1207,7 @@
1207
1207
  "type": "uint8"
1208
1208
  }
1209
1209
  ],
1210
- "stateMutability": "pure",
1210
+ "stateMutability": "view",
1211
1211
  "type": "function"
1212
1212
  },
1213
1213
  {
@@ -38,7 +38,7 @@ abstract contract OAppOptionsType3 is IOAppOptionsType3, Ownable {
38
38
  * eg. Amount of lzReceive() gas necessary to deliver a lzCompose() message adds overhead you dont want to pay
39
39
  * if you are only making a standard LayerZero message ie. lzReceive() WITHOUT sendCompose().
40
40
  */
41
- function _setEnforcedOptions(EnforcedOptionParam[] calldata _enforcedOptions) internal virtual {
41
+ function _setEnforcedOptions(EnforcedOptionParam[] memory _enforcedOptions) internal virtual {
42
42
  for (uint256 i = 0; i < _enforcedOptions.length; i++) {
43
43
  // @dev Enforced options are only available for optionType 3, as type 1 and 2 dont support combining.
44
44
  _assertOptionsType3(_enforcedOptions[i].options);
@@ -88,8 +88,11 @@ abstract contract OAppOptionsType3 is IOAppOptionsType3, Ownable {
88
88
  * @dev Internal function to assert that options are of type 3.
89
89
  * @param _options The options to be checked.
90
90
  */
91
- function _assertOptionsType3(bytes calldata _options) internal pure virtual {
92
- uint16 optionsType = uint16(bytes2(_options[0:2]));
91
+ function _assertOptionsType3(bytes memory _options) internal pure virtual {
92
+ uint16 optionsType;
93
+ assembly {
94
+ optionsType := mload(add(_options, 2))
95
+ }
93
96
  if (optionsType != OPTION_TYPE_3) revert InvalidOptions(_options);
94
97
  }
95
98
  }
@@ -80,7 +80,7 @@ abstract contract OFTCore is IOFT, OApp, OAppPreCrimeSimulator, OAppOptionsType3
80
80
  * For tokens exceeding this totalSupply(), they will need to override the sharedDecimals function with something smaller.
81
81
  * ie. 4 sharedDecimals would be 1,844,674,407,370,955.1615
82
82
  */
83
- function sharedDecimals() public pure virtual returns (uint8) {
83
+ function sharedDecimals() public view virtual returns (uint8) {
84
84
  return 6;
85
85
  }
86
86
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@layerzerolabs/lz-evm-oapp-v2",
3
- "version": "2.1.27",
3
+ "version": "2.2.1",
4
4
  "license": "MIT",
5
5
  "files": [
6
6
  "artifacts/contracts/**/!(*.dbg).json",
@@ -11,9 +11,9 @@
11
11
  },
12
12
  "dependencies": {},
13
13
  "devDependencies": {
14
- "@layerzerolabs/lz-evm-messagelib-v2": "^2.1.27",
15
- "@layerzerolabs/lz-evm-protocol-v2": "^2.1.27",
16
- "@layerzerolabs/lz-evm-v1-0.7": "^2.1.27",
14
+ "@layerzerolabs/lz-evm-messagelib-v2": "^2.2.1",
15
+ "@layerzerolabs/lz-evm-protocol-v2": "^2.2.1",
16
+ "@layerzerolabs/lz-evm-v1-0.7": "^2.2.1",
17
17
  "@openzeppelin/contracts": "^4.8.1",
18
18
  "@openzeppelin/contracts-upgradeable": "^4.8.1",
19
19
  "hardhat-deploy": "^0.11.44",
@@ -21,9 +21,9 @@
21
21
  "solidity-bytes-utils": "^0.8.0"
22
22
  },
23
23
  "peerDependencies": {
24
- "@layerzerolabs/lz-evm-messagelib-v2": "^2.1.27",
25
- "@layerzerolabs/lz-evm-protocol-v2": "^2.1.27",
26
- "@layerzerolabs/lz-evm-v1-0.7": "^2.1.27",
24
+ "@layerzerolabs/lz-evm-messagelib-v2": "^2.2.1",
25
+ "@layerzerolabs/lz-evm-protocol-v2": "^2.2.1",
26
+ "@layerzerolabs/lz-evm-v1-0.7": "^2.2.1",
27
27
  "@openzeppelin/contracts": "^4.8.1 || ^5.0.0",
28
28
  "@openzeppelin/contracts-upgradeable": "^4.8.1 || ^5.0.0",
29
29
  "hardhat-deploy": "^0.11.44",