@layerzerolabs/oapp-upgradeable-evm-contracts 1.2.9 → 1.2.10

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.
@@ -64,9 +64,9 @@ contracts/oapp/options-type-3/OAppOptionsType3RBACUpgradeable.sol
64
64
 
65
65
  test/OAppAltUpgradeable.t.sol
66
66
  2:1 warning Found more than One contract per file. 2 contracts found! one-contract-per-file
67
- 13:1 warning Missing @title tag in contract 'OAppAltUpgradeableHarness' use-natspec
68
- 13:1 warning Missing @author tag in contract 'OAppAltUpgradeableHarness' use-natspec
69
- 13:1 warning Missing @notice tag in contract 'OAppAltUpgradeableHarness' use-natspec
67
+ 13:1 warning Missing @title tag in contract 'OAppAltHarness' use-natspec
68
+ 13:1 warning Missing @author tag in contract 'OAppAltHarness' use-natspec
69
+ 13:1 warning Missing @notice tag in contract 'OAppAltHarness' use-natspec
70
70
  14:5 warning Missing @notice tag in function '<anonymous>' use-natspec
71
71
  14:5 warning Missing @param tag in function '<anonymous>' use-natspec
72
72
  14:5 warning Mismatch in @param names for function '<anonymous>'. Expected: [_endpoint], Found: [] use-natspec
@@ -98,20 +98,22 @@ test/OAppAltUpgradeable.t.sol
98
98
  42:5 warning Explicitly mark visibility of state state-visibility
99
99
  43:5 warning Explicitly mark visibility of state state-visibility
100
100
  44:5 warning Explicitly mark visibility of state state-visibility
101
- 45:5 warning Explicitly mark visibility of state state-visibility
101
+ 46:5 warning Explicitly mark visibility of state state-visibility
102
102
  47:5 warning Explicitly mark visibility of state state-visibility
103
103
  48:5 warning Explicitly mark visibility of state state-visibility
104
- 49:5 warning Explicitly mark visibility of state state-visibility
105
- 51:5 warning Missing @notice tag in function 'setUp' use-natspec
106
- 67:5 warning Missing @notice tag in function 'test_constructor' use-natspec
107
- 71:5 warning Missing @notice tag in function 'test_constructor_Revert_InvalidNativeToken' use-natspec
108
- 78:5 warning Missing @notice tag in function 'test_payNative' use-natspec
109
- 88:9 warning GC: String exceeds 32 bytes gas-small-strings
110
- 93:5 warning Missing @notice tag in function 'test_payNative_ZeroFee' use-natspec
111
- 103:5 warning Missing @notice tag in function 'test_payNative_Revert_OnlyAltToken' use-natspec
112
- 116:5 warning Missing @notice tag in function 'test_payNative_Fuzz' use-natspec
113
- 116:5 warning Missing @param tag in function 'test_payNative_Fuzz' use-natspec
114
- 116:5 warning Mismatch in @param names for function 'test_payNative_Fuzz'. Expected: [_fee], Found: [] use-natspec
104
+ 50:5 warning Missing @notice tag in function 'setUp' use-natspec
105
+ 61:5 warning Missing @notice tag in function '_deployOApp' use-natspec
106
+ 61:5 warning Missing @return tag in function '_deployOApp' use-natspec
107
+ 61:5 warning Mismatch in @return count for function '_deployOApp'. Expected: 1, Found: 0 use-natspec
108
+ 68:5 warning Missing @notice tag in function 'test_constructor' use-natspec
109
+ 72:5 warning Missing @notice tag in function 'test_constructor_Revert_InvalidNativeToken' use-natspec
110
+ 79:5 warning Missing @notice tag in function 'test_payNative' use-natspec
111
+ 89:9 warning GC: String exceeds 32 bytes gas-small-strings
112
+ 94:5 warning Missing @notice tag in function 'test_payNative_ZeroFee' use-natspec
113
+ 104:5 warning Missing @notice tag in function 'test_payNative_Revert_OnlyAltToken' use-natspec
114
+ 117:5 warning Missing @notice tag in function 'test_payNative_Fuzz' use-natspec
115
+ 117:5 warning Missing @param tag in function 'test_payNative_Fuzz' use-natspec
116
+ 117:5 warning Mismatch in @param names for function 'test_payNative_Fuzz'. Expected: [_fee], Found: [] use-natspec
115
117
 
116
118
  test/OAppCoreRBACUpgradeable.t.sol
117
119
  2:1 warning Found more than One contract per file. 2 contracts found! one-contract-per-file
@@ -137,14 +139,17 @@ test/OAppCoreRBACUpgradeable.t.sol
137
139
  29:5 warning Explicitly mark visibility of state state-visibility
138
140
  30:5 warning Explicitly mark visibility of state state-visibility
139
141
  32:5 warning Missing @notice tag in function 'setUp' use-natspec
140
- 54:5 warning Missing @notice tag in function 'test_initialize_SetsDelegate' use-natspec
141
- 60:5 warning Missing @notice tag in function 'test_setDelegate_Revert_CannotDirectlySetDelegate_Admin' use-natspec
142
- 65:5 warning Missing @notice tag in function 'test_setDelegate_Revert_CannotDirectlySetDelegate_NonAdmin' use-natspec
143
- 73:5 warning Missing @notice tag in function 'test_acceptDefaultAdminTransfer' use-natspec
144
- 84:5 warning Missing @notice tag in function 'test_acceptDefaultAdminTransfer_ChainedTransfers' use-natspec
145
- 101:5 warning Missing @notice tag in function 'test_acceptDefaultAdminTransfer_Fuzz' use-natspec
146
- 101:5 warning Missing @param tag in function 'test_acceptDefaultAdminTransfer_Fuzz' use-natspec
147
- 101:5 warning Mismatch in @param names for function 'test_acceptDefaultAdminTransfer_Fuzz'. Expected: [_newAdmin], Found: [] use-natspec
142
+ 40:5 warning Missing @notice tag in function '_deployOApp' use-natspec
143
+ 40:5 warning Missing @return tag in function '_deployOApp' use-natspec
144
+ 40:5 warning Mismatch in @return count for function '_deployOApp'. Expected: 1, Found: 0 use-natspec
145
+ 60:5 warning Missing @notice tag in function 'test_initialize_SetsDelegate' use-natspec
146
+ 66:5 warning Missing @notice tag in function 'test_setDelegate_Revert_CannotDirectlySetDelegate_Admin' use-natspec
147
+ 71:5 warning Missing @notice tag in function 'test_setDelegate_Revert_CannotDirectlySetDelegate_NonAdmin' use-natspec
148
+ 79:5 warning Missing @notice tag in function 'test_acceptDefaultAdminTransfer' use-natspec
149
+ 90:5 warning Missing @notice tag in function 'test_acceptDefaultAdminTransfer_ChainedTransfers' use-natspec
150
+ 107:5 warning Missing @notice tag in function 'test_acceptDefaultAdminTransfer_Fuzz' use-natspec
151
+ 107:5 warning Missing @param tag in function 'test_acceptDefaultAdminTransfer_Fuzz' use-natspec
152
+ 107:5 warning Mismatch in @param names for function 'test_acceptDefaultAdminTransfer_Fuzz'. Expected: [_newAdmin], Found: [] use-natspec
148
153
 
149
154
  test/OAppOptionsType3BaseUpgradeable.t.sol
150
155
  2:1 warning Found more than One contract per file. 2 contracts found! one-contract-per-file
@@ -161,9 +166,9 @@ test/OAppOptionsType3BaseUpgradeable.t.sol
161
166
  25:1 warning Missing @author tag in contract 'OAppOptionsType3BaseUpgradeableTest' use-natspec
162
167
  25:1 warning Missing @notice tag in contract 'OAppOptionsType3BaseUpgradeableTest' use-natspec
163
168
  28:5 warning Explicitly mark visibility of state state-visibility
164
- 33:5 warning Missing @notice tag in function '_createOApp' use-natspec
165
- 33:5 warning Missing @return tag in function '_createOApp' use-natspec
166
- 33:5 warning Mismatch in @return count for function '_createOApp'. Expected: 1, Found: 0 use-natspec
169
+ 33:5 warning Missing @notice tag in function '_deployOApp' use-natspec
170
+ 33:5 warning Missing @return tag in function '_deployOApp' use-natspec
171
+ 33:5 warning Mismatch in @return count for function '_deployOApp'. Expected: 1, Found: 0 use-natspec
167
172
  43:5 warning Missing @notice tag in function 'setUp' use-natspec
168
173
  49:5 warning Missing @notice tag in function 'test_initialize_Revert_AlreadyInitialized' use-natspec
169
174
  56:5 warning Missing @notice tag in function 'test_enforcedOptions' use-natspec
@@ -190,25 +195,25 @@ test/OAppOptionsType3BaseUpgradeable.t.sol
190
195
 
191
196
  test/OAppOptionsType3RBACUpgradeable.t.sol
192
197
  2:1 warning Found more than One contract per file. 2 contracts found! one-contract-per-file
193
- 12:1 warning Missing @title tag in contract 'OAppOptionsType3RBACHarness' use-natspec
194
- 12:1 warning Missing @author tag in contract 'OAppOptionsType3RBACHarness' use-natspec
195
- 12:1 warning Missing @notice tag in contract 'OAppOptionsType3RBACHarness' use-natspec
196
- 13:5 warning Missing @notice tag in function '<anonymous>' use-natspec
197
- 17:5 warning Missing @notice tag in function 'initialize' use-natspec
198
- 17:5 warning Missing @param tag in function 'initialize' use-natspec
199
- 17:5 warning Mismatch in @param names for function 'initialize'. Expected: [_initialAdmin], Found: [] use-natspec
200
- 22:1 warning Missing @title tag in contract 'OAppOptionsType3RBACUpgradeableTest' use-natspec
201
- 22:1 warning Missing @author tag in contract 'OAppOptionsType3RBACUpgradeableTest' use-natspec
202
- 22:1 warning Missing @notice tag in contract 'OAppOptionsType3RBACUpgradeableTest' use-natspec
203
- 25:5 warning Explicitly mark visibility of state state-visibility
204
- 27:5 warning Missing @notice tag in function '_createOApp' use-natspec
205
- 27:5 warning Missing @return tag in function '_createOApp' use-natspec
206
- 27:5 warning Mismatch in @return count for function '_createOApp'. Expected: 1, Found: 0 use-natspec
207
- 37:5 warning Missing @notice tag in function 'setUp' use-natspec
208
- 44:5 warning Missing @notice tag in function 'test_initialize_Revert_AlreadyInitialized' use-natspec
209
- 51:5 warning Missing @notice tag in function 'test_setEnforcedOptions_Revert_Unauthorized' use-natspec
210
-
211
- 175 problems (0 errors, 175 warnings)
198
+ 15:1 warning Missing @title tag in contract 'OAppOptionsType3RBACHarness' use-natspec
199
+ 15:1 warning Missing @author tag in contract 'OAppOptionsType3RBACHarness' use-natspec
200
+ 15:1 warning Missing @notice tag in contract 'OAppOptionsType3RBACHarness' use-natspec
201
+ 16:5 warning Missing @notice tag in function '<anonymous>' use-natspec
202
+ 20:5 warning Missing @notice tag in function 'initialize' use-natspec
203
+ 20:5 warning Missing @param tag in function 'initialize' use-natspec
204
+ 20:5 warning Mismatch in @param names for function 'initialize'. Expected: [_initialAdmin], Found: [] use-natspec
205
+ 25:1 warning Missing @title tag in contract 'OAppOptionsType3RBACUpgradeableTest' use-natspec
206
+ 25:1 warning Missing @author tag in contract 'OAppOptionsType3RBACUpgradeableTest' use-natspec
207
+ 25:1 warning Missing @notice tag in contract 'OAppOptionsType3RBACUpgradeableTest' use-natspec
208
+ 28:5 warning Explicitly mark visibility of state state-visibility
209
+ 29:5 warning Explicitly mark visibility of state state-visibility
210
+ 31:5 warning Missing @notice tag in function '_deployOApp' use-natspec
211
+ 31:5 warning Missing @return tag in function '_deployOApp' use-natspec
212
+ 31:5 warning Mismatch in @return count for function '_deployOApp'. Expected: 1, Found: 0 use-natspec
213
+ 45:5 warning Missing @notice tag in function 'test_initialize_Revert_AlreadyInitialized' use-natspec
214
+ 52:5 warning Missing @notice tag in function 'test_setEnforcedOptions_Revert_Unauthorized' use-natspec
215
+
216
+ 180 problems (0 errors, 180 warnings)
212
217
 
213
218
  --------------------------------------------------------------------------
214
219
  ===> Join SOLHINT Community at: https://discord.com/invite/4TYGq3zpjs <===
@@ -4,46 +4,116 @@
4
4
 
5
5
  ✅ forge-1.3.6-hardhat-2.26.3
6
6
  🔧 forge version: 1.3.6
7
- 📦 Using scoped workspace: /tmp/lz-scoped-workspace-URR7lS
7
+ 📦 Using scoped workspace: /tmp/lz-scoped-workspace-RCgj79
8
8
  📦 Copied 11 workspace package source(s)
9
9
  📦 No scoped-workspace pruner configured; using unpruned package-level source copy fallback.
10
- (node:282294) [MODULE_TYPELESS_PACKAGE_JSON] Warning: Module type of file:///home/runner/work/monorepo-internal/monorepo-internal/configs/vm-tooling/values/docker-image-repo.ts is not specified and it doesn't parse as CommonJS.
10
+ (node:94994) [MODULE_TYPELESS_PACKAGE_JSON] Warning: Module type of file:///home/runner/work/monorepo-internal/monorepo-internal/configs/vm-tooling/values/docker-image-repo.ts is not specified and it doesn't parse as CommonJS.
11
11
  Reparsing as ES module because module syntax was detected. This incurs a performance overhead.
12
12
  To eliminate this warning, add "type": "module" to /home/runner/work/monorepo-internal/monorepo-internal/package.json.
13
13
  (Use `node --trace-warnings ...` to show where the warning was created)
14
14
  📦 Docker volumes:
15
- -v /tmp/lz-scoped-workspace-URR7lS:/workspace
15
+ -v /tmp/lz-scoped-workspace-RCgj79:/workspace
16
16
  -v /home/runner/work/monorepo-internal/monorepo-internal/apps/oapp-app/contracts/evm/upgradeable:/workspace/apps/oapp-app/contracts/evm/upgradeable
17
17
  -v /home/runner/work/monorepo-internal/monorepo-internal/node_modules/.pnpm:/workspace/node_modules/.pnpm:ro
18
18
  $ docker image inspect --format {{.Architecture}} 438003944538.dkr.ecr.us-east-1.amazonaws.com/layerzerolabs/evm-tooling:forge-1.3.6-hardhat-2.26.3-patch-3
19
- Using cached Docker image: 438003944538.dkr.ecr.us-east-1.amazonaws.com/layerzerolabs/evm-tooling:forge-1.3.6-hardhat-2.26.3-patch-3 (amd64)
19
+ Error response from daemon: No such image: 438003944538.dkr.ecr.us-east-1.amazonaws.com/layerzerolabs/evm-tooling:forge-1.3.6-hardhat-2.26.3-patch-3
20
+ 📥 Pulling Docker image from: 438003944538.dkr.ecr.us-east-1.amazonaws.com/layerzerolabs/evm-tooling:forge-1.3.6-hardhat-2.26.3-patch-3
21
+ $ docker pull 438003944538.dkr.ecr.us-east-1.amazonaws.com/layerzerolabs/evm-tooling:forge-1.3.6-hardhat-2.26.3-patch-3
22
+ forge-1.3.6-hardhat-2.26.3-patch-3: Pulling from layerzerolabs/evm-tooling
23
+ 86ec798129ac: Pulling fs layer
24
+ eef7c391911c: Pulling fs layer
25
+ cc2ecf4065b7: Pulling fs layer
26
+ 5760fdd70374: Pulling fs layer
27
+ c70db14240a1: Pulling fs layer
28
+ 0cb2c6965bde: Pulling fs layer
29
+ 885bca26f927: Pulling fs layer
30
+ 8e167e77288f: Pulling fs layer
31
+ 45d43cc973ba: Pulling fs layer
32
+ 44c09156221f: Pulling fs layer
33
+ f2fb700979ad: Pulling fs layer
34
+ 2a1ced882ba9: Pulling fs layer
35
+ 597168d5c38e: Pulling fs layer
36
+ e431adaf232f: Pulling fs layer
37
+ 36e15e3f2788: Pulling fs layer
38
+ cc2ecf4065b7: Waiting
39
+ 5760fdd70374: Waiting
40
+ c70db14240a1: Waiting
41
+ 0cb2c6965bde: Waiting
42
+ 885bca26f927: Waiting
43
+ 597168d5c38e: Waiting
44
+ 2a1ced882ba9: Waiting
45
+ e431adaf232f: Waiting
46
+ 8e167e77288f: Waiting
47
+ 45d43cc973ba: Waiting
48
+ 44c09156221f: Waiting
49
+ 36e15e3f2788: Waiting
50
+ f2fb700979ad: Waiting
51
+ eef7c391911c: Verifying Checksum
52
+ eef7c391911c: Download complete
53
+ 86ec798129ac: Verifying Checksum
54
+ 86ec798129ac: Download complete
55
+ 5760fdd70374: Verifying Checksum
56
+ 5760fdd70374: Download complete
57
+ cc2ecf4065b7: Verifying Checksum
58
+ cc2ecf4065b7: Download complete
59
+ c70db14240a1: Verifying Checksum
60
+ c70db14240a1: Download complete
61
+ 86ec798129ac: Pull complete
62
+ 0cb2c6965bde: Verifying Checksum
63
+ 0cb2c6965bde: Download complete
64
+ eef7c391911c: Pull complete
65
+ 8e167e77288f: Download complete
66
+ 45d43cc973ba: Verifying Checksum
67
+ 45d43cc973ba: Download complete
68
+ 44c09156221f: Verifying Checksum
69
+ 44c09156221f: Download complete
70
+ f2fb700979ad: Verifying Checksum
71
+ f2fb700979ad: Download complete
72
+ cc2ecf4065b7: Pull complete
73
+ 5760fdd70374: Pull complete
74
+ c70db14240a1: Pull complete
75
+ 2a1ced882ba9: Verifying Checksum
76
+ 2a1ced882ba9: Download complete
77
+ 0cb2c6965bde: Pull complete
78
+ 597168d5c38e: Verifying Checksum
79
+ 597168d5c38e: Download complete
80
+ 885bca26f927: Verifying Checksum
81
+ 885bca26f927: Download complete
82
+ 36e15e3f2788: Verifying Checksum
83
+ 36e15e3f2788: Download complete
84
+ e431adaf232f: Verifying Checksum
85
+ e431adaf232f: Download complete
86
+ 885bca26f927: Pull complete
87
+ 8e167e77288f: Pull complete
88
+ 45d43cc973ba: Pull complete
89
+ 44c09156221f: Pull complete
90
+ f2fb700979ad: Pull complete
91
+ 2a1ced882ba9: Pull complete
92
+ 597168d5c38e: Pull complete
93
+ e431adaf232f: Pull complete
94
+ 36e15e3f2788: Pull complete
95
+ Digest: sha256:08b858b586759ec59f4df44c0bc5eac9f856a1eb32b6ce37f79f31a20a89ed52
96
+ Status: Downloaded newer image for 438003944538.dkr.ecr.us-east-1.amazonaws.com/layerzerolabs/evm-tooling:forge-1.3.6-hardhat-2.26.3-patch-3
97
+ 438003944538.dkr.ecr.us-east-1.amazonaws.com/layerzerolabs/evm-tooling:forge-1.3.6-hardhat-2.26.3-patch-3
98
+ ✅ Successfully pulled: 438003944538.dkr.ecr.us-east-1.amazonaws.com/layerzerolabs/evm-tooling:forge-1.3.6-hardhat-2.26.3-patch-3
20
99
  👤 Running container as UID:GID 1001:1001
21
- $ docker run --rm --add-host=host.docker.internal:host-gateway -e LOCAL_UID=1001 -e LOCAL_GID=1001 -v /tmp/lz-scoped-workspace-URR7lS:/workspace -v /home/runner/work/monorepo-internal/monorepo-internal/apps/oapp-app/contracts/evm/upgradeable:/workspace/apps/oapp-app/contracts/evm/upgradeable -v /home/runner/work/monorepo-internal/monorepo-internal/node_modules/.pnpm:/workspace/node_modules/.pnpm:ro -w /workspace/apps/oapp-app/contracts/evm/upgradeable 438003944538.dkr.ecr.us-east-1.amazonaws.com/layerzerolabs/evm-tooling:forge-1.3.6-hardhat-2.26.3-patch-3 forge test
100
+ $ docker run --rm --add-host=host.docker.internal:host-gateway -e LOCAL_UID=1001 -e LOCAL_GID=1001 -v /tmp/lz-scoped-workspace-RCgj79:/workspace -v /home/runner/work/monorepo-internal/monorepo-internal/apps/oapp-app/contracts/evm/upgradeable:/workspace/apps/oapp-app/contracts/evm/upgradeable -v /home/runner/work/monorepo-internal/monorepo-internal/node_modules/.pnpm:/workspace/node_modules/.pnpm:ro -w /workspace/apps/oapp-app/contracts/evm/upgradeable 438003944538.dkr.ecr.us-east-1.amazonaws.com/layerzerolabs/evm-tooling:forge-1.3.6-hardhat-2.26.3-patch-3 forge test
22
101
  Compiling 150 files with Solc 0.8.22
23
- Solc 0.8.22 finished in 11.42s
102
+ Solc 0.8.22 finished in 15.32s
24
103
  Compiler run successful!
25
104
 
26
- Ran 6 tests for test/OAppCoreRBACUpgradeable.t.sol:OAppCoreRBACUpgradeableTest
27
- [PASS] test_acceptDefaultAdminTransfer() (gas: 107512)
28
- [PASS] test_acceptDefaultAdminTransfer_ChainedTransfers() (gas: 175705)
29
- [PASS] test_acceptDefaultAdminTransfer_Fuzz(address) (runs: 1000, μ: 108498, ~: 108498)
30
- [PASS] test_initialize_SetsDelegate() (gas: 15127)
31
- [PASS] test_setDelegate_Revert_CannotDirectlySetDelegate_Admin() (gas: 15597)
32
- [PASS] test_setDelegate_Revert_CannotDirectlySetDelegate_NonAdmin() (gas: 16016)
33
- Suite result: ok. 6 passed; 0 failed; 0 skipped; finished in 68.43ms (66.84ms CPU time)
34
-
35
105
  Ran 6 tests for test/OAppAltUpgradeable.t.sol:OAppAltUpgradeableTest
36
106
  [PASS] test_constructor() (gas: 15583)
37
107
  [PASS] test_constructor_Revert_InvalidNativeToken() (gas: 4353096)
38
108
  [PASS] test_payNative() (gas: 97285)
39
- [PASS] test_payNative_Fuzz(uint96) (runs: 1000, μ: 99264, ~: 99198)
109
+ [PASS] test_payNative_Fuzz(uint96) (runs: 1000, μ: 99262, ~: 99198)
40
110
  [PASS] test_payNative_Revert_OnlyAltToken() (gas: 101951)
41
111
  [PASS] test_payNative_ZeroFee() (gas: 18992)
42
- Suite result: ok. 6 passed; 0 failed; 0 skipped; finished in 68.86ms (67.35ms CPU time)
112
+ Suite result: ok. 6 passed; 0 failed; 0 skipped; finished in 123.85ms (120.60ms CPU time)
43
113
 
44
114
  Ran 14 tests for test/OAppOptionsType3BaseUpgradeable.t.sol:OAppOptionsType3BaseUpgradeableTest
45
115
  [PASS] test_combineOptions_CombinesType3Options() (gas: 55506)
46
- [PASS] test_combineOptions_Fuzz(uint32,uint16,uint128,uint128) (runs: 1000, μ: 58347, ~: 58337)
116
+ [PASS] test_combineOptions_Fuzz(uint32,uint16,uint128,uint128) (runs: 1000, μ: 58346, ~: 58337)
47
117
  [PASS] test_combineOptions_Fuzz_Revert_InvalidExtraOptionsType(uint16) (runs: 1000, μ: 50697, ~: 50697)
48
118
  [PASS] test_combineOptions_NoEnforcedOptions() (gas: 19825)
49
119
  [PASS] test_combineOptions_NoExtraOptions() (gas: 94671)
@@ -54,27 +124,36 @@ Ran 14 tests for test/OAppOptionsType3BaseUpgradeable.t.sol:OAppOptionsType3Base
54
124
  [PASS] test_initialize_Revert_AlreadyInitialized() (gas: 15583)
55
125
  [PASS] test_setEnforcedOptions() (gas: 132440)
56
126
  [PASS] test_setEnforcedOptions_EmptyOptionsResetsEnforced() (gas: 42400)
57
- [PASS] test_setEnforcedOptions_Fuzz(uint32,uint16,uint128) (runs: 1000, μ: 51098, ~: 51093)
127
+ [PASS] test_setEnforcedOptions_Fuzz(uint32,uint16,uint128) (runs: 1000, μ: 51099, ~: 51093)
58
128
  [PASS] test_setEnforcedOptions_Fuzz_Revert_InvalidOptionsType(uint16) (runs: 1000, μ: 17649, ~: 17649)
59
- Suite result: ok. 14 passed; 0 failed; 0 skipped; finished in 133.32ms (286.49ms CPU time)
129
+ Suite result: ok. 14 passed; 0 failed; 0 skipped; finished in 149.70ms (402.05ms CPU time)
130
+
131
+ Ran 6 tests for test/OAppCoreRBACUpgradeable.t.sol:OAppCoreRBACUpgradeableTest
132
+ [PASS] test_acceptDefaultAdminTransfer() (gas: 107512)
133
+ [PASS] test_acceptDefaultAdminTransfer_ChainedTransfers() (gas: 175705)
134
+ [PASS] test_acceptDefaultAdminTransfer_Fuzz(address) (runs: 1000, μ: 108498, ~: 108498)
135
+ [PASS] test_initialize_SetsDelegate() (gas: 15127)
136
+ [PASS] test_setDelegate_Revert_CannotDirectlySetDelegate_Admin() (gas: 15597)
137
+ [PASS] test_setDelegate_Revert_CannotDirectlySetDelegate_NonAdmin() (gas: 16016)
138
+ Suite result: ok. 6 passed; 0 failed; 0 skipped; finished in 167.80ms (164.93ms CPU time)
60
139
 
61
140
  Ran 15 tests for test/OAppOptionsType3RBACUpgradeable.t.sol:OAppOptionsType3RBACUpgradeableTest
62
- [PASS] test_combineOptions_CombinesType3Options() (gas: 58107)
63
- [PASS] test_combineOptions_Fuzz(uint32,uint16,uint128,uint128) (runs: 1000, μ: 60837, ~: 60830)
64
- [PASS] test_combineOptions_Fuzz_Revert_InvalidExtraOptionsType(uint16) (runs: 1000, μ: 53266, ~: 53266)
65
- [PASS] test_combineOptions_NoEnforcedOptions() (gas: 19925)
66
- [PASS] test_combineOptions_NoExtraOptions() (gas: 97203)
67
- [PASS] test_combineOptions_PassthroughAfterReset() (gas: 82500)
68
- [PASS] test_combineOptions_Revert_SingleByteExtraOptions() (gas: 51905)
69
- [PASS] test_enforcedOptions() (gas: 49826)
141
+ [PASS] test_combineOptions_CombinesType3Options() (gas: 58123)
142
+ [PASS] test_combineOptions_Fuzz(uint32,uint16,uint128,uint128) (runs: 1000, μ: 60855, ~: 60846)
143
+ [PASS] test_combineOptions_Fuzz_Revert_InvalidExtraOptionsType(uint16) (runs: 1000, μ: 53270, ~: 53270)
144
+ [PASS] test_combineOptions_NoEnforcedOptions() (gas: 19929)
145
+ [PASS] test_combineOptions_NoExtraOptions() (gas: 97207)
146
+ [PASS] test_combineOptions_PassthroughAfterReset() (gas: 82507)
147
+ [PASS] test_combineOptions_Revert_SingleByteExtraOptions() (gas: 51909)
148
+ [PASS] test_enforcedOptions() (gas: 49830)
70
149
  [PASS] test_enforcedOptions_Empty() (gas: 17366)
71
- [PASS] test_initialize_Revert_AlreadyInitialized() (gas: 17898)
72
- [PASS] test_setEnforcedOptions() (gas: 135081)
73
- [PASS] test_setEnforcedOptions_EmptyOptionsResetsEnforced() (gas: 44859)
74
- [PASS] test_setEnforcedOptions_Fuzz(uint32,uint16,uint128) (runs: 1000, μ: 53634, ~: 53630)
150
+ [PASS] test_initialize_Revert_AlreadyInitialized() (gas: 17887)
151
+ [PASS] test_setEnforcedOptions() (gas: 135089)
152
+ [PASS] test_setEnforcedOptions_EmptyOptionsResetsEnforced() (gas: 44862)
153
+ [PASS] test_setEnforcedOptions_Fuzz(uint32,uint16,uint128) (runs: 1000, μ: 53639, ~: 53634)
75
154
  [PASS] test_setEnforcedOptions_Fuzz_Revert_InvalidOptionsType(uint16) (runs: 1000, μ: 20171, ~: 20171)
76
- [PASS] test_setEnforcedOptions_Revert_Unauthorized() (gas: 23046)
77
- Suite result: ok. 15 passed; 0 failed; 0 skipped; finished in 135.15ms (314.31ms CPU time)
155
+ [PASS] test_setEnforcedOptions_Revert_Unauthorized() (gas: 24948)
156
+ Suite result: ok. 15 passed; 0 failed; 0 skipped; finished in 177.23ms (484.20ms CPU time)
78
157
 
79
- Ran 4 test suites in 137.83ms (405.75ms CPU time): 41 tests passed, 0 failed, 0 skipped (41 total tests)
80
- ⏳ forge test: 14.331s
158
+ Ran 4 test suites in 180.61ms (618.58ms CPU time): 41 tests passed, 0 failed, 0 skipped (41 total tests)
159
+ ⏳ forge test: 17.500s
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@layerzerolabs/oapp-upgradeable-evm-contracts",
3
- "version": "1.2.9",
3
+ "version": "1.2.10",
4
4
  "private": false,
5
5
  "description": "LayerZero Labs reference EVM upgradeable OApp implementation",
6
6
  "license": "MIT",
@@ -15,12 +15,12 @@
15
15
  "ethers": "^5.8.0",
16
16
  "solhint": "^6.0.1",
17
17
  "solidity-bytes-utils": "^0.8.4",
18
- "@layerzerolabs/solhint-configuration": "1.2.9",
19
- "@layerzerolabs/oapp-evm-contracts": "1.2.9",
20
- "@layerzerolabs/test-utils-evm-contracts": "1.2.9",
21
- "@layerzerolabs/utils-evm-contracts": "1.2.9",
22
- "@layerzerolabs/utils-upgradeable-evm-contracts": "1.2.9",
23
- "@layerzerolabs/vm-tooling-evm": "1.2.9"
18
+ "@layerzerolabs/oapp-evm-contracts": "1.2.10",
19
+ "@layerzerolabs/test-utils-evm-contracts": "1.2.10",
20
+ "@layerzerolabs/utils-evm-contracts": "1.2.10",
21
+ "@layerzerolabs/utils-upgradeable-evm-contracts": "1.2.10",
22
+ "@layerzerolabs/solhint-configuration": "1.2.10",
23
+ "@layerzerolabs/vm-tooling-evm": "1.2.10"
24
24
  },
25
25
  "publishConfig": {
26
26
  "access": "public",
@@ -10,7 +10,7 @@ import { IERC20 } from "@openzeppelin/contracts/token/ERC20/IERC20.sol";
10
10
  import { OAppAltUpgradeable } from "./../contracts/oapp/alt/OAppAltUpgradeable.sol";
11
11
  import { OAppCoreBaseUpgradeable } from "./../contracts/oapp/OAppCoreBaseUpgradeable.sol";
12
12
 
13
- contract OAppAltUpgradeableHarness is OAppCoreBaseUpgradeable, OAppAltUpgradeable {
13
+ contract OAppAltHarness is OAppCoreBaseUpgradeable, OAppAltUpgradeable {
14
14
  constructor(address _endpoint) OAppCoreBaseUpgradeable(_endpoint) {}
15
15
 
16
16
  function initialize(address _delegate) public initializer {
@@ -39,8 +39,7 @@ contract OAppAltUpgradeableHarness is OAppCoreBaseUpgradeable, OAppAltUpgradeabl
39
39
  }
40
40
 
41
41
  contract OAppAltUpgradeableTest is TestHelperOz5 {
42
- OAppAltUpgradeableHarness impl;
43
- OAppAltUpgradeableHarness oapp;
42
+ OAppAltHarness oapp;
44
43
  MockERC20 nativeToken;
45
44
  address endpoint;
46
45
 
@@ -56,12 +55,14 @@ contract OAppAltUpgradeableTest is TestHelperOz5 {
56
55
  createEndpoints(2, LibraryType.SimpleMessageLib, nativeTokenAddrs);
57
56
  endpoint = address(endpointSetup.endpointList[0]);
58
57
 
59
- impl = new OAppAltUpgradeableHarness(endpoint);
58
+ oapp = _deployOApp();
59
+ }
60
60
 
61
- bytes memory initData = abi.encodeWithSelector(OAppAltUpgradeableHarness.initialize.selector, delegate);
61
+ function _deployOApp() internal returns (OAppAltHarness) {
62
+ OAppAltHarness impl = new OAppAltHarness(endpoint);
63
+ bytes memory initData = abi.encodeWithSelector(OAppAltHarness.initialize.selector, delegate);
62
64
  TransparentUpgradeableProxy proxy = new TransparentUpgradeableProxy(address(impl), delegate, initData);
63
-
64
- oapp = OAppAltUpgradeableHarness(address(proxy));
65
+ return OAppAltHarness(address(proxy));
65
66
  }
66
67
 
67
68
  function test_constructor() public view {
@@ -72,7 +73,7 @@ contract OAppAltUpgradeableTest is TestHelperOz5 {
72
73
  EndpointV2AltMock endpointZeroNative = new EndpointV2AltMock(1, address(this), address(0));
73
74
 
74
75
  vm.expectRevert(IOAppAlt.InvalidNativeToken.selector);
75
- new OAppAltUpgradeableHarness(address(endpointZeroNative));
76
+ new OAppAltHarness(address(endpointZeroNative));
76
77
  }
77
78
 
78
79
  function test_payNative() public {
@@ -33,20 +33,26 @@ contract OAppCoreRBACUpgradeableTest is TestHelperOz5 {
33
33
  owner = address(this);
34
34
  setUpEndpoints(2, LibraryType.SimpleMessageLib);
35
35
  endpoint = endpointSetup.endpointList[0];
36
+
37
+ oapp = _deployOApp();
38
+ }
39
+
40
+ function _deployOApp() internal returns (OAppCoreRBACHarness) {
36
41
  OAppCoreRBACHarness impl = new OAppCoreRBACHarness(address(endpoint));
37
42
 
38
43
  uint256 currentNonce = vm.getNonce(address(this));
39
44
  proxyAdmin = vm.computeCreateAddress(vm.computeCreateAddress(address(this), currentNonce), 1);
40
45
 
41
- oapp = OAppCoreRBACHarness(
42
- address(
43
- new TransparentUpgradeableProxy(
44
- address(impl),
45
- address(this),
46
- abi.encodeWithSelector(OAppCoreRBACHarness.initialize.selector, owner)
46
+ return
47
+ OAppCoreRBACHarness(
48
+ address(
49
+ new TransparentUpgradeableProxy(
50
+ address(impl),
51
+ address(this),
52
+ abi.encodeWithSelector(OAppCoreRBACHarness.initialize.selector, owner)
53
+ )
47
54
  )
48
- )
49
- );
55
+ );
50
56
  }
51
57
 
52
58
  // ============ initialize ============
@@ -25,30 +25,30 @@ contract OAppOptionsType3BaseHarness is OAppOptionsType3BaseUpgradeable {
25
25
  contract OAppOptionsType3BaseUpgradeableTest is Test {
26
26
  using OptionsBuilder for bytes;
27
27
 
28
- IOAppOptionsType3 oapp;
28
+ OAppOptionsType3BaseHarness oapp;
29
29
 
30
30
  uint16 internal constant SEND = 1;
31
31
  uint16 internal constant SEND_AND_CALL = 2;
32
32
 
33
- function _createOApp() internal virtual returns (IOAppOptionsType3) {
33
+ function _deployOApp() internal virtual returns (OAppOptionsType3BaseHarness) {
34
34
  OAppOptionsType3BaseHarness impl = new OAppOptionsType3BaseHarness();
35
35
  TransparentUpgradeableProxy proxy = new TransparentUpgradeableProxy(
36
36
  address(impl),
37
37
  address(this),
38
38
  abi.encodeWithSelector(OAppOptionsType3BaseHarness.initialize.selector)
39
39
  );
40
- return IOAppOptionsType3(address(proxy));
40
+ return OAppOptionsType3BaseHarness(address(proxy));
41
41
  }
42
42
 
43
43
  function setUp() public virtual {
44
- oapp = _createOApp();
44
+ oapp = _deployOApp();
45
45
  }
46
46
 
47
47
  // ============ initialize ============
48
48
 
49
49
  function test_initialize_Revert_AlreadyInitialized() public virtual {
50
50
  vm.expectRevert(Initializable.InvalidInitialization.selector);
51
- OAppOptionsType3BaseHarness(address(oapp)).initialize();
51
+ oapp.initialize();
52
52
  }
53
53
 
54
54
  // ============ enforcedOptions ============
@@ -7,7 +7,10 @@ import { Initializable } from "@openzeppelin/contracts-upgradeable/proxy/utils/I
7
7
  import { IAccessControl } from "@openzeppelin/contracts/access/IAccessControl.sol";
8
8
  import { TransparentUpgradeableProxy } from "@openzeppelin/contracts/proxy/transparent/TransparentUpgradeableProxy.sol";
9
9
  import { OAppOptionsType3RBACUpgradeable } from "./../contracts/oapp/options-type-3/OAppOptionsType3RBACUpgradeable.sol";
10
- import { OAppOptionsType3BaseUpgradeableTest } from "./OAppOptionsType3BaseUpgradeable.t.sol";
10
+ import {
11
+ OAppOptionsType3BaseUpgradeableTest,
12
+ OAppOptionsType3BaseHarness
13
+ } from "./OAppOptionsType3BaseUpgradeable.t.sol";
11
14
 
12
15
  contract OAppOptionsType3RBACHarness is OAppOptionsType3RBACUpgradeable {
13
16
  constructor() {
@@ -23,19 +26,17 @@ contract OAppOptionsType3RBACUpgradeableTest is OAppOptionsType3BaseUpgradeableT
23
26
  using OptionsBuilder for bytes;
24
27
 
25
28
  address alice = makeAddr("alice");
29
+ OAppOptionsType3RBACHarness oappRbac;
26
30
 
27
- function _createOApp() internal virtual override returns (IOAppOptionsType3) {
31
+ function _deployOApp() internal virtual override returns (OAppOptionsType3BaseHarness) {
28
32
  OAppOptionsType3RBACHarness impl = new OAppOptionsType3RBACHarness();
29
33
  TransparentUpgradeableProxy proxy = new TransparentUpgradeableProxy(
30
34
  address(impl),
31
35
  address(this),
32
36
  abi.encodeWithSelector(OAppOptionsType3RBACHarness.initialize.selector, address(this))
33
37
  );
34
- return IOAppOptionsType3(address(proxy));
35
- }
36
-
37
- function setUp() public override {
38
- oapp = _createOApp();
38
+ oappRbac = OAppOptionsType3RBACHarness(address(proxy));
39
+ return OAppOptionsType3BaseHarness(address(proxy));
39
40
  }
40
41
 
41
42
  // ============ initialize ============
@@ -43,7 +44,7 @@ contract OAppOptionsType3RBACUpgradeableTest is OAppOptionsType3BaseUpgradeableT
43
44
  /// @dev Override since `OAppOptionsType3RBACHarness.initialize(address)` has a different signature.
44
45
  function test_initialize_Revert_AlreadyInitialized() public override {
45
46
  vm.expectRevert(Initializable.InvalidInitialization.selector);
46
- OAppOptionsType3RBACHarness(address(oapp)).initialize(alice);
47
+ oappRbac.initialize(alice);
47
48
  }
48
49
 
49
50
  // ============ setEnforcedOptions ============
@@ -58,7 +59,7 @@ contract OAppOptionsType3RBACUpgradeableTest is OAppOptionsType3BaseUpgradeableT
58
59
  abi.encodeWithSelector(
59
60
  IAccessControl.AccessControlUnauthorizedAccount.selector,
60
61
  alice,
61
- OAppOptionsType3RBACHarness(address(oapp)).DEFAULT_ADMIN_ROLE()
62
+ oappRbac.DEFAULT_ADMIN_ROLE()
62
63
  )
63
64
  );
64
65
  vm.prank(alice);