@layerzerolabs/lz-evm-sdk-v2 2.0.21 → 2.0.22

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.
Files changed (28) hide show
  1. package/deployments/joc-testnet/DVN.json +1929 -0
  2. package/deployments/joc-testnet/DVNFeeLib.json +398 -0
  3. package/deployments/joc-testnet/DefaultProxyAdmin.json +258 -0
  4. package/deployments/joc-testnet/EndpointV2.json +3000 -0
  5. package/deployments/joc-testnet/EndpointV2View.json +435 -0
  6. package/deployments/joc-testnet/EndpointV2View_Implementation.json +313 -0
  7. package/deployments/joc-testnet/EndpointV2View_Proxy.json +230 -0
  8. package/deployments/joc-testnet/Executor.json +1532 -0
  9. package/deployments/joc-testnet/ExecutorFeeLib.json +423 -0
  10. package/deployments/joc-testnet/ExecutorProxyAdmin.json +283 -0
  11. package/deployments/joc-testnet/Executor_Implementation.json +1591 -0
  12. package/deployments/joc-testnet/Executor_Proxy.json +365 -0
  13. package/deployments/joc-testnet/LzExecutor.json +757 -0
  14. package/deployments/joc-testnet/LzExecutor_Implementation.json +703 -0
  15. package/deployments/joc-testnet/LzExecutor_Proxy.json +244 -0
  16. package/deployments/joc-testnet/ReceiveUln301.json +1292 -0
  17. package/deployments/joc-testnet/ReceiveUln301View.json +354 -0
  18. package/deployments/joc-testnet/ReceiveUln301View_Implementation.json +231 -0
  19. package/deployments/joc-testnet/ReceiveUln301View_Proxy.json +230 -0
  20. package/deployments/joc-testnet/ReceiveUln302.json +1006 -0
  21. package/deployments/joc-testnet/ReceiveUln302View.json +478 -0
  22. package/deployments/joc-testnet/ReceiveUln302View_Implementation.json +384 -0
  23. package/deployments/joc-testnet/ReceiveUln302View_Proxy.json +230 -0
  24. package/deployments/joc-testnet/SendUln301.json +1569 -0
  25. package/deployments/joc-testnet/SendUln302.json +1527 -0
  26. package/deployments/joc-testnet/Treasury.json +412 -0
  27. package/deployments/joc-testnet/TreasuryFeeHandler.json +125 -0
  28. package/package.json +8 -8
@@ -0,0 +1,412 @@
1
+ {
2
+ "address": "0x53fd4C4fBBd53F6bC58CaE6704b92dB1f360A648",
3
+ "abi": [
4
+ {
5
+ "inputs": [],
6
+ "name": "LZ_Treasury_LzTokenNotEnabled",
7
+ "type": "error"
8
+ },
9
+ {
10
+ "inputs": [
11
+ {
12
+ "internalType": "address",
13
+ "name": "_to",
14
+ "type": "address"
15
+ },
16
+ {
17
+ "internalType": "uint256",
18
+ "name": "_value",
19
+ "type": "uint256"
20
+ }
21
+ ],
22
+ "name": "Transfer_NativeFailed",
23
+ "type": "error"
24
+ },
25
+ {
26
+ "inputs": [],
27
+ "name": "Transfer_ToAddressIsZero",
28
+ "type": "error"
29
+ },
30
+ {
31
+ "anonymous": false,
32
+ "inputs": [
33
+ {
34
+ "indexed": true,
35
+ "internalType": "address",
36
+ "name": "previousOwner",
37
+ "type": "address"
38
+ },
39
+ {
40
+ "indexed": true,
41
+ "internalType": "address",
42
+ "name": "newOwner",
43
+ "type": "address"
44
+ }
45
+ ],
46
+ "name": "OwnershipTransferred",
47
+ "type": "event"
48
+ },
49
+ {
50
+ "inputs": [
51
+ {
52
+ "internalType": "address",
53
+ "name": "",
54
+ "type": "address"
55
+ },
56
+ {
57
+ "internalType": "uint32",
58
+ "name": "",
59
+ "type": "uint32"
60
+ },
61
+ {
62
+ "internalType": "uint256",
63
+ "name": "_totalFee",
64
+ "type": "uint256"
65
+ },
66
+ {
67
+ "internalType": "bool",
68
+ "name": "_payInLzToken",
69
+ "type": "bool"
70
+ }
71
+ ],
72
+ "name": "getFee",
73
+ "outputs": [
74
+ {
75
+ "internalType": "uint256",
76
+ "name": "",
77
+ "type": "uint256"
78
+ }
79
+ ],
80
+ "stateMutability": "view",
81
+ "type": "function"
82
+ },
83
+ {
84
+ "inputs": [],
85
+ "name": "lzTokenEnabled",
86
+ "outputs": [
87
+ {
88
+ "internalType": "bool",
89
+ "name": "",
90
+ "type": "bool"
91
+ }
92
+ ],
93
+ "stateMutability": "view",
94
+ "type": "function"
95
+ },
96
+ {
97
+ "inputs": [],
98
+ "name": "lzTokenFee",
99
+ "outputs": [
100
+ {
101
+ "internalType": "uint256",
102
+ "name": "",
103
+ "type": "uint256"
104
+ }
105
+ ],
106
+ "stateMutability": "view",
107
+ "type": "function"
108
+ },
109
+ {
110
+ "inputs": [],
111
+ "name": "nativeBP",
112
+ "outputs": [
113
+ {
114
+ "internalType": "uint256",
115
+ "name": "",
116
+ "type": "uint256"
117
+ }
118
+ ],
119
+ "stateMutability": "view",
120
+ "type": "function"
121
+ },
122
+ {
123
+ "inputs": [],
124
+ "name": "owner",
125
+ "outputs": [
126
+ {
127
+ "internalType": "address",
128
+ "name": "",
129
+ "type": "address"
130
+ }
131
+ ],
132
+ "stateMutability": "view",
133
+ "type": "function"
134
+ },
135
+ {
136
+ "inputs": [
137
+ {
138
+ "internalType": "address",
139
+ "name": "",
140
+ "type": "address"
141
+ },
142
+ {
143
+ "internalType": "uint32",
144
+ "name": "",
145
+ "type": "uint32"
146
+ },
147
+ {
148
+ "internalType": "uint256",
149
+ "name": "_totalFee",
150
+ "type": "uint256"
151
+ },
152
+ {
153
+ "internalType": "bool",
154
+ "name": "_payInLzToken",
155
+ "type": "bool"
156
+ }
157
+ ],
158
+ "name": "payFee",
159
+ "outputs": [
160
+ {
161
+ "internalType": "uint256",
162
+ "name": "",
163
+ "type": "uint256"
164
+ }
165
+ ],
166
+ "stateMutability": "payable",
167
+ "type": "function"
168
+ },
169
+ {
170
+ "inputs": [],
171
+ "name": "renounceOwnership",
172
+ "outputs": [],
173
+ "stateMutability": "nonpayable",
174
+ "type": "function"
175
+ },
176
+ {
177
+ "inputs": [
178
+ {
179
+ "internalType": "bool",
180
+ "name": "_lzTokenEnabled",
181
+ "type": "bool"
182
+ }
183
+ ],
184
+ "name": "setLzTokenEnabled",
185
+ "outputs": [],
186
+ "stateMutability": "nonpayable",
187
+ "type": "function"
188
+ },
189
+ {
190
+ "inputs": [
191
+ {
192
+ "internalType": "uint256",
193
+ "name": "_lzTokenFee",
194
+ "type": "uint256"
195
+ }
196
+ ],
197
+ "name": "setLzTokenFee",
198
+ "outputs": [],
199
+ "stateMutability": "nonpayable",
200
+ "type": "function"
201
+ },
202
+ {
203
+ "inputs": [
204
+ {
205
+ "internalType": "uint256",
206
+ "name": "_nativeBP",
207
+ "type": "uint256"
208
+ }
209
+ ],
210
+ "name": "setNativeFeeBP",
211
+ "outputs": [],
212
+ "stateMutability": "nonpayable",
213
+ "type": "function"
214
+ },
215
+ {
216
+ "inputs": [
217
+ {
218
+ "internalType": "address",
219
+ "name": "newOwner",
220
+ "type": "address"
221
+ }
222
+ ],
223
+ "name": "transferOwnership",
224
+ "outputs": [],
225
+ "stateMutability": "nonpayable",
226
+ "type": "function"
227
+ },
228
+ {
229
+ "inputs": [
230
+ {
231
+ "internalType": "address",
232
+ "name": "_messageLib",
233
+ "type": "address"
234
+ },
235
+ {
236
+ "internalType": "address",
237
+ "name": "_lzToken",
238
+ "type": "address"
239
+ },
240
+ {
241
+ "internalType": "address",
242
+ "name": "_to",
243
+ "type": "address"
244
+ },
245
+ {
246
+ "internalType": "uint256",
247
+ "name": "_amount",
248
+ "type": "uint256"
249
+ }
250
+ ],
251
+ "name": "withdrawLzToken",
252
+ "outputs": [],
253
+ "stateMutability": "nonpayable",
254
+ "type": "function"
255
+ },
256
+ {
257
+ "inputs": [
258
+ {
259
+ "internalType": "address",
260
+ "name": "_messageLib",
261
+ "type": "address"
262
+ },
263
+ {
264
+ "internalType": "address payable",
265
+ "name": "_to",
266
+ "type": "address"
267
+ },
268
+ {
269
+ "internalType": "uint256",
270
+ "name": "_amount",
271
+ "type": "uint256"
272
+ }
273
+ ],
274
+ "name": "withdrawNativeFee",
275
+ "outputs": [],
276
+ "stateMutability": "nonpayable",
277
+ "type": "function"
278
+ },
279
+ {
280
+ "inputs": [
281
+ {
282
+ "internalType": "address",
283
+ "name": "_token",
284
+ "type": "address"
285
+ },
286
+ {
287
+ "internalType": "address",
288
+ "name": "_to",
289
+ "type": "address"
290
+ },
291
+ {
292
+ "internalType": "uint256",
293
+ "name": "_amount",
294
+ "type": "uint256"
295
+ }
296
+ ],
297
+ "name": "withdrawToken",
298
+ "outputs": [],
299
+ "stateMutability": "nonpayable",
300
+ "type": "function"
301
+ }
302
+ ],
303
+ "transactionHash": "0x3b66ee321e88961b7abc4476db6ec692bde3f36b91556f75bcc97536a0522b27",
304
+ "receipt": {
305
+ "to": null,
306
+ "from": "0xc13b65f7c53Cd6db2EA205a4b574b4a0858720A6",
307
+ "contractAddress": "0x53fd4C4fBBd53F6bC58CaE6704b92dB1f360A648",
308
+ "transactionIndex": 1,
309
+ "gasUsed": "838954",
310
+ "logsBloom": "0x00000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000000000020000000000000400000000000000000000000000000001000000000000080000000000000000000000030000000000000000000800000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000020000000000000000000000000000000000000000000000000000000000000008000",
311
+ "blockHash": "0xe83dc89057d8e76a8384cdc8c12e3bd162647d8b00dbca9ac124bf7733d20045",
312
+ "transactionHash": "0x3b66ee321e88961b7abc4476db6ec692bde3f36b91556f75bcc97536a0522b27",
313
+ "logs": [
314
+ {
315
+ "transactionIndex": 1,
316
+ "blockNumber": 2936520,
317
+ "transactionHash": "0x3b66ee321e88961b7abc4476db6ec692bde3f36b91556f75bcc97536a0522b27",
318
+ "address": "0x53fd4C4fBBd53F6bC58CaE6704b92dB1f360A648",
319
+ "topics": [
320
+ "0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0",
321
+ "0x0000000000000000000000000000000000000000000000000000000000000000",
322
+ "0x000000000000000000000000c13b65f7c53cd6db2ea205a4b574b4a0858720a6"
323
+ ],
324
+ "data": "0x",
325
+ "logIndex": 0,
326
+ "blockHash": "0xe83dc89057d8e76a8384cdc8c12e3bd162647d8b00dbca9ac124bf7733d20045"
327
+ }
328
+ ],
329
+ "blockNumber": 2936520,
330
+ "cumulativeGasUsed": "859954",
331
+ "status": 1,
332
+ "byzantium": true
333
+ },
334
+ "args": [],
335
+ "numDeployments": 1,
336
+ "solcInputHash": "c1348614bdca535ead27abf9de3062c9",
337
+ "bytecode": "0x608060405234801561001057600080fd5b5061001a3361001f565b61006f565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b610ddb8061007e6000396000f3fe6080604052600436106100dd5760003560e01c80638ee643a61161007f578063bf6e753611610059578063bf6e753614610237578063d424422114610257578063d51c548614610277578063f2fde38b1461028557600080fd5b80638ee643a6146101dd57806390953238146101fd57806396a141a01461022157600080fd5b80633972d46c116100bb5780633972d46c14610153578063715018a6146101735780637e8a0699146101885780638da5cb5b146101a857600080fd5b806301d9c2cb146100e257806301e336671461011157806301f1f6e814610133575b600080fd5b3480156100ee57600080fd5b506003546100fc9060ff1681565b60405190151581526020015b60405180910390f35b34801561011d57600080fd5b5061013161012c366004610b28565b6102a5565b005b34801561013f57600080fd5b5061013161014e366004610b77565b6102bd565b34801561015f57600080fd5b5061013161016e366004610b9b565b6102f6565b34801561017f57600080fd5b50610131610303565b34801561019457600080fd5b506101316101a3366004610bb4565b610317565b3480156101b457600080fd5b5060005460405173ffffffffffffffffffffffffffffffffffffffff9091168152602001610108565b3480156101e957600080fd5b506101316101f8366004610b9b565b6103b5565b34801561020957600080fd5b5061021360025481565b604051908152602001610108565b34801561022d57600080fd5b5061021360015481565b34801561024357600080fd5b50610131610252366004610b28565b6103c2565b34801561026357600080fd5b50610213610272366004610c05565b610457565b610213610272366004610c05565b34801561029157600080fd5b506101316102a0366004610c61565b61046e565b6102ad61052a565b6102b88383836105ab565b505050565b6102c561052a565b600380547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016911515919091179055565b6102fe61052a565b600155565b61030b61052a565b61031560006105db565b565b61031f61052a565b6040517f200175f700000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff848116600483015283811660248301526044820183905285169063200175f790606401600060405180830381600087803b15801561039757600080fd5b505af11580156103ab573d6000803e3d6000fd5b5050505050505050565b6103bd61052a565b600255565b6103ca61052a565b6040517ffd9be52200000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff83811660048301526024820183905284169063fd9be52290604401600060405180830381600087803b15801561043a57600080fd5b505af115801561044e573d6000803e3d6000fd5b50505050505050565b60006104638383610650565b90505b949350505050565b61047661052a565b73ffffffffffffffffffffffffffffffffffffffff811661051e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f646472657373000000000000000000000000000000000000000000000000000060648201526084015b60405180910390fd5b610527816105db565b50565b60005473ffffffffffffffffffffffffffffffffffffffff163314610315576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610515565b73ffffffffffffffffffffffffffffffffffffffff83166105d0576102b882826106c1565b6102b88383836107c7565b6000805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6000811561069d5760035460ff16610694576040517f1cf849b700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b506002546106bb565b612710600154846106ae9190610c7e565b6106b89190610cbc565b90505b92915050565b73ffffffffffffffffffffffffffffffffffffffff821661070e576040517f6b7a931000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008273ffffffffffffffffffffffffffffffffffffffff168260405160006040518083038185875af1925050503d8060008114610768576040519150601f19603f3d011682016040523d82523d6000602084013e61076d565b606091505b50509050806102b8576040517f465bc83400000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8416600482015260248101839052604401610515565b73ffffffffffffffffffffffffffffffffffffffff8216610814576040517f6b7a931000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6040805173ffffffffffffffffffffffffffffffffffffffff848116602483015260448083018590528351808403909101815260649092018352602080830180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fa9059cbb0000000000000000000000000000000000000000000000000000000017905283518085019094528084527f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564908401526102b892908616918591859185918591906000906108e89084908490610995565b90508051600014806109095750808060200190518101906109099190610cf7565b6102b8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f742073756363656564000000000000000000000000000000000000000000006064820152608401610515565b60606104668484600085856000808673ffffffffffffffffffffffffffffffffffffffff1685876040516109c99190610d38565b60006040518083038185875af1925050503d8060008114610a06576040519150601f19603f3d011682016040523d82523d6000602084013e610a0b565b606091505b5091509150610a1c87838387610a27565b979650505050505050565b60608315610abd578251600003610ab65773ffffffffffffffffffffffffffffffffffffffff85163b610ab6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610515565b5081610466565b6104668383815115610ad25781518083602001fd5b806040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105159190610d54565b73ffffffffffffffffffffffffffffffffffffffff8116811461052757600080fd5b600080600060608486031215610b3d57600080fd5b8335610b4881610b06565b92506020840135610b5881610b06565b929592945050506040919091013590565b801515811461052757600080fd5b600060208284031215610b8957600080fd5b8135610b9481610b69565b9392505050565b600060208284031215610bad57600080fd5b5035919050565b60008060008060808587031215610bca57600080fd5b8435610bd581610b06565b93506020850135610be581610b06565b92506040850135610bf581610b06565b9396929550929360600135925050565b60008060008060808587031215610c1b57600080fd5b8435610c2681610b06565b9350602085013563ffffffff81168114610c3f57600080fd5b9250604085013591506060850135610c5681610b69565b939692955090935050565b600060208284031215610c7357600080fd5b8135610b9481610b06565b80820281158282048414176106bb577f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b600082610cf2577f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b500490565b600060208284031215610d0957600080fd5b8151610b9481610b69565b60005b83811015610d2f578181015183820152602001610d17565b50506000910152565b60008251610d4a818460208701610d14565b9190910192915050565b6020815260008251806020840152610d73816040850160208701610d14565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016919091016040019291505056fea2646970667358221220a5949451e7850e7552b1148776157165cebf6d96f7c3a9023511d15d7e04058d64736f6c63430008160033",
338
+ "deployedBytecode": "0x6080604052600436106100dd5760003560e01c80638ee643a61161007f578063bf6e753611610059578063bf6e753614610237578063d424422114610257578063d51c548614610277578063f2fde38b1461028557600080fd5b80638ee643a6146101dd57806390953238146101fd57806396a141a01461022157600080fd5b80633972d46c116100bb5780633972d46c14610153578063715018a6146101735780637e8a0699146101885780638da5cb5b146101a857600080fd5b806301d9c2cb146100e257806301e336671461011157806301f1f6e814610133575b600080fd5b3480156100ee57600080fd5b506003546100fc9060ff1681565b60405190151581526020015b60405180910390f35b34801561011d57600080fd5b5061013161012c366004610b28565b6102a5565b005b34801561013f57600080fd5b5061013161014e366004610b77565b6102bd565b34801561015f57600080fd5b5061013161016e366004610b9b565b6102f6565b34801561017f57600080fd5b50610131610303565b34801561019457600080fd5b506101316101a3366004610bb4565b610317565b3480156101b457600080fd5b5060005460405173ffffffffffffffffffffffffffffffffffffffff9091168152602001610108565b3480156101e957600080fd5b506101316101f8366004610b9b565b6103b5565b34801561020957600080fd5b5061021360025481565b604051908152602001610108565b34801561022d57600080fd5b5061021360015481565b34801561024357600080fd5b50610131610252366004610b28565b6103c2565b34801561026357600080fd5b50610213610272366004610c05565b610457565b610213610272366004610c05565b34801561029157600080fd5b506101316102a0366004610c61565b61046e565b6102ad61052a565b6102b88383836105ab565b505050565b6102c561052a565b600380547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016911515919091179055565b6102fe61052a565b600155565b61030b61052a565b61031560006105db565b565b61031f61052a565b6040517f200175f700000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff848116600483015283811660248301526044820183905285169063200175f790606401600060405180830381600087803b15801561039757600080fd5b505af11580156103ab573d6000803e3d6000fd5b5050505050505050565b6103bd61052a565b600255565b6103ca61052a565b6040517ffd9be52200000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff83811660048301526024820183905284169063fd9be52290604401600060405180830381600087803b15801561043a57600080fd5b505af115801561044e573d6000803e3d6000fd5b50505050505050565b60006104638383610650565b90505b949350505050565b61047661052a565b73ffffffffffffffffffffffffffffffffffffffff811661051e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f646472657373000000000000000000000000000000000000000000000000000060648201526084015b60405180910390fd5b610527816105db565b50565b60005473ffffffffffffffffffffffffffffffffffffffff163314610315576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610515565b73ffffffffffffffffffffffffffffffffffffffff83166105d0576102b882826106c1565b6102b88383836107c7565b6000805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6000811561069d5760035460ff16610694576040517f1cf849b700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b506002546106bb565b612710600154846106ae9190610c7e565b6106b89190610cbc565b90505b92915050565b73ffffffffffffffffffffffffffffffffffffffff821661070e576040517f6b7a931000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008273ffffffffffffffffffffffffffffffffffffffff168260405160006040518083038185875af1925050503d8060008114610768576040519150601f19603f3d011682016040523d82523d6000602084013e61076d565b606091505b50509050806102b8576040517f465bc83400000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8416600482015260248101839052604401610515565b73ffffffffffffffffffffffffffffffffffffffff8216610814576040517f6b7a931000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6040805173ffffffffffffffffffffffffffffffffffffffff848116602483015260448083018590528351808403909101815260649092018352602080830180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fa9059cbb0000000000000000000000000000000000000000000000000000000017905283518085019094528084527f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564908401526102b892908616918591859185918591906000906108e89084908490610995565b90508051600014806109095750808060200190518101906109099190610cf7565b6102b8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f742073756363656564000000000000000000000000000000000000000000006064820152608401610515565b60606104668484600085856000808673ffffffffffffffffffffffffffffffffffffffff1685876040516109c99190610d38565b60006040518083038185875af1925050503d8060008114610a06576040519150601f19603f3d011682016040523d82523d6000602084013e610a0b565b606091505b5091509150610a1c87838387610a27565b979650505050505050565b60608315610abd578251600003610ab65773ffffffffffffffffffffffffffffffffffffffff85163b610ab6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610515565b5081610466565b6104668383815115610ad25781518083602001fd5b806040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105159190610d54565b73ffffffffffffffffffffffffffffffffffffffff8116811461052757600080fd5b600080600060608486031215610b3d57600080fd5b8335610b4881610b06565b92506020840135610b5881610b06565b929592945050506040919091013590565b801515811461052757600080fd5b600060208284031215610b8957600080fd5b8135610b9481610b69565b9392505050565b600060208284031215610bad57600080fd5b5035919050565b60008060008060808587031215610bca57600080fd5b8435610bd581610b06565b93506020850135610be581610b06565b92506040850135610bf581610b06565b9396929550929360600135925050565b60008060008060808587031215610c1b57600080fd5b8435610c2681610b06565b9350602085013563ffffffff81168114610c3f57600080fd5b9250604085013591506060850135610c5681610b69565b939692955090935050565b600060208284031215610c7357600080fd5b8135610b9481610b06565b80820281158282048414176106bb577f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b600082610cf2577f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b500490565b600060208284031215610d0957600080fd5b8151610b9481610b69565b60005b83811015610d2f578181015183820152602001610d17565b50506000910152565b60008251610d4a818460208701610d14565b9190910192915050565b6020815260008251806020840152610d73816040850160208701610d14565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016919091016040019291505056fea2646970667358221220a5949451e7850e7552b1148776157165cebf6d96f7c3a9023511d15d7e04058d64736f6c63430008160033",
339
+ "devdoc": {
340
+ "kind": "dev",
341
+ "methods": {
342
+ "owner()": {
343
+ "details": "Returns the address of the current owner."
344
+ },
345
+ "renounceOwnership()": {
346
+ "details": "Leaves the contract without owner. It will not be possible to call `onlyOwner` functions. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby disabling any functionality that is only available to the owner."
347
+ },
348
+ "transferOwnership(address)": {
349
+ "details": "Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner."
350
+ }
351
+ },
352
+ "version": 1
353
+ },
354
+ "userdoc": {
355
+ "kind": "user",
356
+ "methods": {},
357
+ "version": 1
358
+ },
359
+ "storageLayout": {
360
+ "storage": [
361
+ {
362
+ "astId": 7783,
363
+ "contract": "contracts/Treasury.sol:Treasury",
364
+ "label": "_owner",
365
+ "offset": 0,
366
+ "slot": "0",
367
+ "type": "t_address"
368
+ },
369
+ {
370
+ "astId": 15590,
371
+ "contract": "contracts/Treasury.sol:Treasury",
372
+ "label": "nativeBP",
373
+ "offset": 0,
374
+ "slot": "1",
375
+ "type": "t_uint256"
376
+ },
377
+ {
378
+ "astId": 15592,
379
+ "contract": "contracts/Treasury.sol:Treasury",
380
+ "label": "lzTokenFee",
381
+ "offset": 0,
382
+ "slot": "2",
383
+ "type": "t_uint256"
384
+ },
385
+ {
386
+ "astId": 15594,
387
+ "contract": "contracts/Treasury.sol:Treasury",
388
+ "label": "lzTokenEnabled",
389
+ "offset": 0,
390
+ "slot": "3",
391
+ "type": "t_bool"
392
+ }
393
+ ],
394
+ "types": {
395
+ "t_address": {
396
+ "encoding": "inplace",
397
+ "label": "address",
398
+ "numberOfBytes": "20"
399
+ },
400
+ "t_bool": {
401
+ "encoding": "inplace",
402
+ "label": "bool",
403
+ "numberOfBytes": "1"
404
+ },
405
+ "t_uint256": {
406
+ "encoding": "inplace",
407
+ "label": "uint256",
408
+ "numberOfBytes": "32"
409
+ }
410
+ }
411
+ }
412
+ }
@@ -0,0 +1,125 @@
1
+ {
2
+ "address": "0x88B27057A9e00c5F05DDa29241027afF63f9e6e0",
3
+ "abi": [
4
+ {
5
+ "inputs": [
6
+ {
7
+ "internalType": "address",
8
+ "name": "_endpoint",
9
+ "type": "address"
10
+ }
11
+ ],
12
+ "stateMutability": "nonpayable",
13
+ "type": "constructor"
14
+ },
15
+ {
16
+ "inputs": [
17
+ {
18
+ "internalType": "uint256",
19
+ "name": "required",
20
+ "type": "uint256"
21
+ },
22
+ {
23
+ "internalType": "uint256",
24
+ "name": "supplied",
25
+ "type": "uint256"
26
+ }
27
+ ],
28
+ "name": "LZ_TreasuryFeeHandler_InvalidAmount",
29
+ "type": "error"
30
+ },
31
+ {
32
+ "inputs": [],
33
+ "name": "LZ_TreasuryFeeHandler_OnlyOnSending",
34
+ "type": "error"
35
+ },
36
+ {
37
+ "inputs": [],
38
+ "name": "LZ_TreasuryFeeHandler_OnlySendLibrary",
39
+ "type": "error"
40
+ },
41
+ {
42
+ "inputs": [],
43
+ "name": "endpoint",
44
+ "outputs": [
45
+ {
46
+ "internalType": "contract ILayerZeroEndpoint",
47
+ "name": "",
48
+ "type": "address"
49
+ }
50
+ ],
51
+ "stateMutability": "view",
52
+ "type": "function"
53
+ },
54
+ {
55
+ "inputs": [
56
+ {
57
+ "internalType": "address",
58
+ "name": "_lzToken",
59
+ "type": "address"
60
+ },
61
+ {
62
+ "internalType": "address",
63
+ "name": "_sender",
64
+ "type": "address"
65
+ },
66
+ {
67
+ "internalType": "uint256",
68
+ "name": "_required",
69
+ "type": "uint256"
70
+ },
71
+ {
72
+ "internalType": "uint256",
73
+ "name": "_supplied",
74
+ "type": "uint256"
75
+ },
76
+ {
77
+ "internalType": "address",
78
+ "name": "_treasury",
79
+ "type": "address"
80
+ }
81
+ ],
82
+ "name": "payFee",
83
+ "outputs": [],
84
+ "stateMutability": "nonpayable",
85
+ "type": "function"
86
+ }
87
+ ],
88
+ "transactionHash": "0x0c42c13c08d3af0d9ba23f6d3d0c0afdda9d3aeb3cff5092a025db031d1ba1f2",
89
+ "receipt": {
90
+ "to": null,
91
+ "from": "0xc13b65f7c53Cd6db2EA205a4b574b4a0858720A6",
92
+ "contractAddress": "0x88B27057A9e00c5F05DDa29241027afF63f9e6e0",
93
+ "transactionIndex": 0,
94
+ "gasUsed": "501835",
95
+ "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
96
+ "blockHash": "0x8cd789e24efeff5f6d815c5173b7ad8ea988fbbf66009639ee55abcbc7db5ffa",
97
+ "transactionHash": "0x0c42c13c08d3af0d9ba23f6d3d0c0afdda9d3aeb3cff5092a025db031d1ba1f2",
98
+ "logs": [],
99
+ "blockNumber": 2936532,
100
+ "cumulativeGasUsed": "501835",
101
+ "status": 1,
102
+ "byzantium": true
103
+ },
104
+ "args": [
105
+ "0x83c73Da98cf733B03315aFa8758834b36a195b87"
106
+ ],
107
+ "numDeployments": 1,
108
+ "solcInputHash": "c1348614bdca535ead27abf9de3062c9",
109
+ "bytecode": "0x60a060405234801561001057600080fd5b506040516108be3803806108be83398101604081905261002f91610040565b6001600160a01b0316608052610070565b60006020828403121561005257600080fd5b81516001600160a01b038116811461006957600080fd5b9392505050565b6080516108276100976000396000818160400152818160e701526101a301526108276000f3fe608060405234801561001057600080fd5b50600436106100365760003560e01c80635e280f111461003b5780637da56b4b1461008b575b600080fd5b6100627f000000000000000000000000000000000000000000000000000000000000000081565b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200160405180910390f35b61009e6100993660046106bb565b6100a0565b005b6040517f9c729da100000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff858116600483015233917f000000000000000000000000000000000000000000000000000000000000000090911690639c729da190602401602060405180830381865afa158015610130573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610154919061071a565b73ffffffffffffffffffffffffffffffffffffffff16146101a1576040517fc857f60c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663e97a448a6040518163ffffffff1660e01b8152600401602060405180830381865afa15801561020c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610230919061073e565b610266576040517fbae51fef00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b818311156102af576040517f901cc98000000000000000000000000000000000000000000000000000000000815260048101849052602481018390526044015b60405180910390fd5b6102d173ffffffffffffffffffffffffffffffffffffffff86168583866102d8565b5050505050565b6040805173ffffffffffffffffffffffffffffffffffffffff85811660248301528416604482015260648082018490528251808303909101815260849091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f23b872dd0000000000000000000000000000000000000000000000000000000017905261036d908590610373565b50505050565b60006103d5826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c65648152508573ffffffffffffffffffffffffffffffffffffffff166104879092919063ffffffff16565b90508051600014806103f65750808060200190518101906103f6919061073e565b610482576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f7420737563636565640000000000000000000000000000000000000000000060648201526084016102a6565b505050565b6060610496848460008561049e565b949350505050565b606082471015610530576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f60448201527f722063616c6c000000000000000000000000000000000000000000000000000060648201526084016102a6565b6000808673ffffffffffffffffffffffffffffffffffffffff1685876040516105599190610784565b60006040518083038185875af1925050503d8060008114610596576040519150601f19603f3d011682016040523d82523d6000602084013e61059b565b606091505b50915091506105ac878383876105b7565b979650505050505050565b6060831561064d5782516000036106465773ffffffffffffffffffffffffffffffffffffffff85163b610646576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064016102a6565b5081610496565b61049683838151156106625781518083602001fd5b806040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016102a691906107a0565b73ffffffffffffffffffffffffffffffffffffffff811681146106b857600080fd5b50565b600080600080600060a086880312156106d357600080fd5b85356106de81610696565b945060208601356106ee81610696565b93506040860135925060608601359150608086013561070c81610696565b809150509295509295909350565b60006020828403121561072c57600080fd5b815161073781610696565b9392505050565b60006020828403121561075057600080fd5b8151801515811461073757600080fd5b60005b8381101561077b578181015183820152602001610763565b50506000910152565b60008251610796818460208701610760565b9190910192915050565b60208152600082518060208401526107bf816040850160208701610760565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016919091016040019291505056fea2646970667358221220f6e4a34a8ea04f675bb162ee572713d5663587ca35061700938515403941b3df64736f6c63430008160033",
110
+ "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100365760003560e01c80635e280f111461003b5780637da56b4b1461008b575b600080fd5b6100627f000000000000000000000000000000000000000000000000000000000000000081565b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200160405180910390f35b61009e6100993660046106bb565b6100a0565b005b6040517f9c729da100000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff858116600483015233917f000000000000000000000000000000000000000000000000000000000000000090911690639c729da190602401602060405180830381865afa158015610130573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610154919061071a565b73ffffffffffffffffffffffffffffffffffffffff16146101a1576040517fc857f60c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663e97a448a6040518163ffffffff1660e01b8152600401602060405180830381865afa15801561020c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610230919061073e565b610266576040517fbae51fef00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b818311156102af576040517f901cc98000000000000000000000000000000000000000000000000000000000815260048101849052602481018390526044015b60405180910390fd5b6102d173ffffffffffffffffffffffffffffffffffffffff86168583866102d8565b5050505050565b6040805173ffffffffffffffffffffffffffffffffffffffff85811660248301528416604482015260648082018490528251808303909101815260849091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f23b872dd0000000000000000000000000000000000000000000000000000000017905261036d908590610373565b50505050565b60006103d5826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c65648152508573ffffffffffffffffffffffffffffffffffffffff166104879092919063ffffffff16565b90508051600014806103f65750808060200190518101906103f6919061073e565b610482576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f7420737563636565640000000000000000000000000000000000000000000060648201526084016102a6565b505050565b6060610496848460008561049e565b949350505050565b606082471015610530576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f60448201527f722063616c6c000000000000000000000000000000000000000000000000000060648201526084016102a6565b6000808673ffffffffffffffffffffffffffffffffffffffff1685876040516105599190610784565b60006040518083038185875af1925050503d8060008114610596576040519150601f19603f3d011682016040523d82523d6000602084013e61059b565b606091505b50915091506105ac878383876105b7565b979650505050505050565b6060831561064d5782516000036106465773ffffffffffffffffffffffffffffffffffffffff85163b610646576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064016102a6565b5081610496565b61049683838151156106625781518083602001fd5b806040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016102a691906107a0565b73ffffffffffffffffffffffffffffffffffffffff811681146106b857600080fd5b50565b600080600080600060a086880312156106d357600080fd5b85356106de81610696565b945060208601356106ee81610696565b93506040860135925060608601359150608086013561070c81610696565b809150509295509295909350565b60006020828403121561072c57600080fd5b815161073781610696565b9392505050565b60006020828403121561075057600080fd5b8151801515811461073757600080fd5b60005b8381101561077b578181015183820152602001610763565b50506000910152565b60008251610796818460208701610760565b9190910192915050565b60208152600082518060208401526107bf816040850160208701610760565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016919091016040019291505056fea2646970667358221220f6e4a34a8ea04f675bb162ee572713d5663587ca35061700938515403941b3df64736f6c63430008160033",
111
+ "devdoc": {
112
+ "kind": "dev",
113
+ "methods": {},
114
+ "version": 1
115
+ },
116
+ "userdoc": {
117
+ "kind": "user",
118
+ "methods": {},
119
+ "version": 1
120
+ },
121
+ "storageLayout": {
122
+ "storage": [],
123
+ "types": null
124
+ }
125
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@layerzerolabs/lz-evm-sdk-v2",
3
- "version": "2.0.21",
3
+ "version": "2.0.22",
4
4
  "license": "LZBL-1.2",
5
5
  "exports": {
6
6
  ".": {
@@ -40,14 +40,14 @@
40
40
  "devDependencies": {
41
41
  "@ethersproject/abi": "^5.7.0",
42
42
  "@ethersproject/providers": "^5.7.0",
43
- "@layerzerolabs/lz-definitions": "^2.0.21",
44
- "@layerzerolabs/lz-evm-messagelib-v2": "^2.0.21",
45
- "@layerzerolabs/lz-evm-oapp-v2": "^2.0.21",
46
- "@layerzerolabs/lz-evm-protocol-v2": "^2.0.21",
43
+ "@layerzerolabs/lz-definitions": "^2.0.22",
44
+ "@layerzerolabs/lz-evm-messagelib-v2": "^2.0.22",
45
+ "@layerzerolabs/lz-evm-oapp-v2": "^2.0.22",
46
+ "@layerzerolabs/lz-evm-protocol-v2": "^2.0.22",
47
47
  "@layerzerolabs/monorepo-utilities": "^0.0.0",
48
- "@layerzerolabs/sdk-utilities": "^2.0.21",
49
- "@layerzerolabs/tsup-config-next": "^2.0.21",
50
- "@layerzerolabs/typescript-config-next": "^2.0.21",
48
+ "@layerzerolabs/sdk-utilities": "^2.0.22",
49
+ "@layerzerolabs/tsup-config-next": "^2.0.22",
50
+ "@layerzerolabs/typescript-config-next": "^2.0.22",
51
51
  "@typechain/ethers-v5": "^10.2.1",
52
52
  "@types/glob": "^8.1.0",
53
53
  "@types/node": "^20.10.5",