@layerzerolabs/lz-evm-oapp-v2 2.1.27 → 2.2.0
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 +13 -0
- package/artifacts/contracts/oft/OFT.sol/OFT.json +1 -1
- package/artifacts/contracts/oft/OFTAdapter.sol/OFTAdapter.json +1 -1
- package/artifacts/contracts/oft/OFTCore.sol/OFTCore.json +1 -1
- package/contracts/oapp/libs/OAppOptionsType3.sol +6 -3
- package/contracts/oft/OFTCore.sol +1 -1
- package/package.json +7 -7
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,18 @@
|
|
|
1
1
|
# @layerzerolabs/lz-evm-oapp-v2
|
|
2
2
|
|
|
3
|
+
## 2.2.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- aa51c78: updated sandbox chain keys for frontend
|
|
8
|
+
|
|
9
|
+
### Patch Changes
|
|
10
|
+
|
|
11
|
+
- Updated dependencies [aa51c78]
|
|
12
|
+
- @layerzerolabs/lz-evm-v1-0.7@2.2.0
|
|
13
|
+
- @layerzerolabs/lz-evm-messagelib-v2@2.2.0
|
|
14
|
+
- @layerzerolabs/lz-evm-protocol-v2@2.2.0
|
|
15
|
+
|
|
3
16
|
## 2.1.27
|
|
4
17
|
|
|
5
18
|
### Patch Changes
|
|
@@ -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[]
|
|
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
|
|
92
|
-
uint16 optionsType
|
|
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
|
|
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.
|
|
3
|
+
"version": "2.2.0",
|
|
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.
|
|
15
|
-
"@layerzerolabs/lz-evm-protocol-v2": "^2.
|
|
16
|
-
"@layerzerolabs/lz-evm-v1-0.7": "^2.
|
|
14
|
+
"@layerzerolabs/lz-evm-messagelib-v2": "^2.2.0",
|
|
15
|
+
"@layerzerolabs/lz-evm-protocol-v2": "^2.2.0",
|
|
16
|
+
"@layerzerolabs/lz-evm-v1-0.7": "^2.2.0",
|
|
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.
|
|
25
|
-
"@layerzerolabs/lz-evm-protocol-v2": "^2.
|
|
26
|
-
"@layerzerolabs/lz-evm-v1-0.7": "^2.
|
|
24
|
+
"@layerzerolabs/lz-evm-messagelib-v2": "^2.2.0",
|
|
25
|
+
"@layerzerolabs/lz-evm-protocol-v2": "^2.2.0",
|
|
26
|
+
"@layerzerolabs/lz-evm-v1-0.7": "^2.2.0",
|
|
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",
|