@layerzerolabs/lz-evm-oapp-v2 2.0.2

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 (51) hide show
  1. package/artifacts/contracts/oapp/OApp.sol/OApp.json +332 -0
  2. package/artifacts/contracts/oapp/OAppCore.sol/OAppCore.json +195 -0
  3. package/artifacts/contracts/oapp/OAppReceiver.sol/OAppReceiver.json +316 -0
  4. package/artifacts/contracts/oapp/OAppSender.sol/OAppSender.json +211 -0
  5. package/artifacts/contracts/oapp/examples/OmniCounter.sol/MsgCodec.json +10 -0
  6. package/artifacts/contracts/oapp/examples/OmniCounter.sol/OmniCounter.json +874 -0
  7. package/artifacts/contracts/oapp/examples/OmniCounterPreCrime.sol/OmniCounterPreCrime.json +373 -0
  8. package/artifacts/contracts/oapp/interfaces/IOAppComposer.sol/IOAppComposer.json +44 -0
  9. package/artifacts/contracts/oapp/interfaces/IOAppCore.sol/IOAppCore.json +143 -0
  10. package/artifacts/contracts/oapp/interfaces/IOAppMsgInspector.sol/IOAppMsgInspector.json +51 -0
  11. package/artifacts/contracts/oapp/interfaces/IOAppOptionsType3.sol/IOAppOptionsType3.json +111 -0
  12. package/artifacts/contracts/oapp/libs/OAppOptionsType3.sol/OAppOptionsType3.json +187 -0
  13. package/artifacts/contracts/oapp/libs/OptionsBuilder.sol/OptionsBuilder.json +38 -0
  14. package/artifacts/contracts/oft/OFT.sol/OFT.json +1466 -0
  15. package/artifacts/contracts/oft/OFTAdapter.sol/OFTAdapter.json +1204 -0
  16. package/artifacts/contracts/oft/OFTCore.sol/OFTCore.json +1170 -0
  17. package/artifacts/contracts/oft/interfaces/IOFT.sol/IOFT.json +472 -0
  18. package/artifacts/contracts/oft/libs/OFTComposeMsgCodec.sol/OFTComposeMsgCodec.json +10 -0
  19. package/artifacts/contracts/oft/libs/OFTMsgCodec.sol/OFTMsgCodec.json +10 -0
  20. package/artifacts/contracts/precrime/OAppPreCrimeSimulator.sol/OAppPreCrimeSimulator.json +277 -0
  21. package/artifacts/contracts/precrime/PreCrime.sol/PreCrime.json +352 -0
  22. package/artifacts/contracts/precrime/extensions/PreCrimeE1.sol/PreCrimeE1.json +352 -0
  23. package/artifacts/contracts/precrime/interfaces/IOAppPreCrimeSimulator.sol/IOAppPreCrimeSimulator.json +175 -0
  24. package/artifacts/contracts/precrime/interfaces/IPreCrime.sol/IPreCrime.json +188 -0
  25. package/artifacts/contracts/precrime/libs/Packet.sol/PacketDecoder.json +10 -0
  26. package/contracts/oapp/OApp.sol +39 -0
  27. package/contracts/oapp/OAppCore.sol +68 -0
  28. package/contracts/oapp/OAppReceiver.sol +101 -0
  29. package/contracts/oapp/OAppSender.sol +124 -0
  30. package/contracts/oapp/examples/OmniCounter.sol +283 -0
  31. package/contracts/oapp/examples/OmniCounterPreCrime.sol +102 -0
  32. package/contracts/oapp/interfaces/IOAppComposer.sol +12 -0
  33. package/contracts/oapp/interfaces/IOAppCore.sol +51 -0
  34. package/contracts/oapp/interfaces/IOAppMsgInspector.sol +22 -0
  35. package/contracts/oapp/interfaces/IOAppOptionsType3.sol +43 -0
  36. package/contracts/oapp/libs/OAppOptionsType3.sol +82 -0
  37. package/contracts/oapp/libs/OptionsBuilder.sol +200 -0
  38. package/contracts/oft/OFT.sol +116 -0
  39. package/contracts/oft/OFTAdapter.sol +131 -0
  40. package/contracts/oft/OFTCore.sol +456 -0
  41. package/contracts/oft/OFTPrecrime.sol +99 -0
  42. package/contracts/oft/interfaces/IOFT.sol +168 -0
  43. package/contracts/oft/libs/OFTComposeMsgCodec.sol +91 -0
  44. package/contracts/oft/libs/OFTMsgCodec.sol +83 -0
  45. package/contracts/precrime/OAppPreCrimeSimulator.sol +125 -0
  46. package/contracts/precrime/PreCrime.sol +208 -0
  47. package/contracts/precrime/extensions/PreCrimeE1.sol +30 -0
  48. package/contracts/precrime/interfaces/IOAppPreCrimeSimulator.sol +55 -0
  49. package/contracts/precrime/interfaces/IPreCrime.sol +40 -0
  50. package/contracts/precrime/libs/Packet.sol +61 -0
  51. package/package.json +35 -0
@@ -0,0 +1,332 @@
1
+ {
2
+ "_format": "hh-sol-artifact-1",
3
+ "contractName": "OApp",
4
+ "sourceName": "contracts/oapp/OApp.sol",
5
+ "abi": [
6
+ {
7
+ "inputs": [],
8
+ "name": "InvalidEndpointCall",
9
+ "type": "error"
10
+ },
11
+ {
12
+ "inputs": [],
13
+ "name": "LzTokenUnavailable",
14
+ "type": "error"
15
+ },
16
+ {
17
+ "inputs": [
18
+ {
19
+ "internalType": "uint32",
20
+ "name": "eid",
21
+ "type": "uint32"
22
+ }
23
+ ],
24
+ "name": "NoPeer",
25
+ "type": "error"
26
+ },
27
+ {
28
+ "inputs": [
29
+ {
30
+ "internalType": "uint256",
31
+ "name": "msgValue",
32
+ "type": "uint256"
33
+ }
34
+ ],
35
+ "name": "NotEnoughNative",
36
+ "type": "error"
37
+ },
38
+ {
39
+ "inputs": [
40
+ {
41
+ "internalType": "address",
42
+ "name": "addr",
43
+ "type": "address"
44
+ }
45
+ ],
46
+ "name": "OnlyEndpoint",
47
+ "type": "error"
48
+ },
49
+ {
50
+ "inputs": [
51
+ {
52
+ "internalType": "uint32",
53
+ "name": "eid",
54
+ "type": "uint32"
55
+ },
56
+ {
57
+ "internalType": "bytes32",
58
+ "name": "sender",
59
+ "type": "bytes32"
60
+ }
61
+ ],
62
+ "name": "OnlyPeer",
63
+ "type": "error"
64
+ },
65
+ {
66
+ "anonymous": false,
67
+ "inputs": [
68
+ {
69
+ "indexed": true,
70
+ "internalType": "address",
71
+ "name": "previousOwner",
72
+ "type": "address"
73
+ },
74
+ {
75
+ "indexed": true,
76
+ "internalType": "address",
77
+ "name": "newOwner",
78
+ "type": "address"
79
+ }
80
+ ],
81
+ "name": "OwnershipTransferred",
82
+ "type": "event"
83
+ },
84
+ {
85
+ "anonymous": false,
86
+ "inputs": [
87
+ {
88
+ "indexed": false,
89
+ "internalType": "uint32",
90
+ "name": "eid",
91
+ "type": "uint32"
92
+ },
93
+ {
94
+ "indexed": false,
95
+ "internalType": "bytes32",
96
+ "name": "peer",
97
+ "type": "bytes32"
98
+ }
99
+ ],
100
+ "name": "PeerSet",
101
+ "type": "event"
102
+ },
103
+ {
104
+ "inputs": [
105
+ {
106
+ "components": [
107
+ {
108
+ "internalType": "uint32",
109
+ "name": "srcEid",
110
+ "type": "uint32"
111
+ },
112
+ {
113
+ "internalType": "bytes32",
114
+ "name": "sender",
115
+ "type": "bytes32"
116
+ },
117
+ {
118
+ "internalType": "uint64",
119
+ "name": "nonce",
120
+ "type": "uint64"
121
+ }
122
+ ],
123
+ "internalType": "struct Origin",
124
+ "name": "origin",
125
+ "type": "tuple"
126
+ }
127
+ ],
128
+ "name": "allowInitializePath",
129
+ "outputs": [
130
+ {
131
+ "internalType": "bool",
132
+ "name": "",
133
+ "type": "bool"
134
+ }
135
+ ],
136
+ "stateMutability": "view",
137
+ "type": "function"
138
+ },
139
+ {
140
+ "inputs": [],
141
+ "name": "endpoint",
142
+ "outputs": [
143
+ {
144
+ "internalType": "contract ILayerZeroEndpointV2",
145
+ "name": "",
146
+ "type": "address"
147
+ }
148
+ ],
149
+ "stateMutability": "view",
150
+ "type": "function"
151
+ },
152
+ {
153
+ "inputs": [
154
+ {
155
+ "components": [
156
+ {
157
+ "internalType": "uint32",
158
+ "name": "srcEid",
159
+ "type": "uint32"
160
+ },
161
+ {
162
+ "internalType": "bytes32",
163
+ "name": "sender",
164
+ "type": "bytes32"
165
+ },
166
+ {
167
+ "internalType": "uint64",
168
+ "name": "nonce",
169
+ "type": "uint64"
170
+ }
171
+ ],
172
+ "internalType": "struct Origin",
173
+ "name": "_origin",
174
+ "type": "tuple"
175
+ },
176
+ {
177
+ "internalType": "bytes32",
178
+ "name": "_guid",
179
+ "type": "bytes32"
180
+ },
181
+ {
182
+ "internalType": "bytes",
183
+ "name": "_message",
184
+ "type": "bytes"
185
+ },
186
+ {
187
+ "internalType": "address",
188
+ "name": "_executor",
189
+ "type": "address"
190
+ },
191
+ {
192
+ "internalType": "bytes",
193
+ "name": "_extraData",
194
+ "type": "bytes"
195
+ }
196
+ ],
197
+ "name": "lzReceive",
198
+ "outputs": [],
199
+ "stateMutability": "payable",
200
+ "type": "function"
201
+ },
202
+ {
203
+ "inputs": [
204
+ {
205
+ "internalType": "uint32",
206
+ "name": "",
207
+ "type": "uint32"
208
+ },
209
+ {
210
+ "internalType": "bytes32",
211
+ "name": "",
212
+ "type": "bytes32"
213
+ }
214
+ ],
215
+ "name": "nextNonce",
216
+ "outputs": [
217
+ {
218
+ "internalType": "uint64",
219
+ "name": "nonce",
220
+ "type": "uint64"
221
+ }
222
+ ],
223
+ "stateMutability": "view",
224
+ "type": "function"
225
+ },
226
+ {
227
+ "inputs": [],
228
+ "name": "oAppVersion",
229
+ "outputs": [
230
+ {
231
+ "internalType": "uint64",
232
+ "name": "senderVersion",
233
+ "type": "uint64"
234
+ },
235
+ {
236
+ "internalType": "uint64",
237
+ "name": "receiverVersion",
238
+ "type": "uint64"
239
+ }
240
+ ],
241
+ "stateMutability": "pure",
242
+ "type": "function"
243
+ },
244
+ {
245
+ "inputs": [],
246
+ "name": "owner",
247
+ "outputs": [
248
+ {
249
+ "internalType": "address",
250
+ "name": "",
251
+ "type": "address"
252
+ }
253
+ ],
254
+ "stateMutability": "view",
255
+ "type": "function"
256
+ },
257
+ {
258
+ "inputs": [
259
+ {
260
+ "internalType": "uint32",
261
+ "name": "eid",
262
+ "type": "uint32"
263
+ }
264
+ ],
265
+ "name": "peers",
266
+ "outputs": [
267
+ {
268
+ "internalType": "bytes32",
269
+ "name": "peer",
270
+ "type": "bytes32"
271
+ }
272
+ ],
273
+ "stateMutability": "view",
274
+ "type": "function"
275
+ },
276
+ {
277
+ "inputs": [],
278
+ "name": "renounceOwnership",
279
+ "outputs": [],
280
+ "stateMutability": "nonpayable",
281
+ "type": "function"
282
+ },
283
+ {
284
+ "inputs": [
285
+ {
286
+ "internalType": "address",
287
+ "name": "_delegate",
288
+ "type": "address"
289
+ }
290
+ ],
291
+ "name": "setDelegate",
292
+ "outputs": [],
293
+ "stateMutability": "nonpayable",
294
+ "type": "function"
295
+ },
296
+ {
297
+ "inputs": [
298
+ {
299
+ "internalType": "uint32",
300
+ "name": "_eid",
301
+ "type": "uint32"
302
+ },
303
+ {
304
+ "internalType": "bytes32",
305
+ "name": "_peer",
306
+ "type": "bytes32"
307
+ }
308
+ ],
309
+ "name": "setPeer",
310
+ "outputs": [],
311
+ "stateMutability": "nonpayable",
312
+ "type": "function"
313
+ },
314
+ {
315
+ "inputs": [
316
+ {
317
+ "internalType": "address",
318
+ "name": "newOwner",
319
+ "type": "address"
320
+ }
321
+ ],
322
+ "name": "transferOwnership",
323
+ "outputs": [],
324
+ "stateMutability": "nonpayable",
325
+ "type": "function"
326
+ }
327
+ ],
328
+ "bytecode": "0x",
329
+ "deployedBytecode": "0x",
330
+ "linkReferences": {},
331
+ "deployedLinkReferences": {}
332
+ }
@@ -0,0 +1,195 @@
1
+ {
2
+ "_format": "hh-sol-artifact-1",
3
+ "contractName": "OAppCore",
4
+ "sourceName": "contracts/oapp/OAppCore.sol",
5
+ "abi": [
6
+ {
7
+ "inputs": [],
8
+ "name": "InvalidEndpointCall",
9
+ "type": "error"
10
+ },
11
+ {
12
+ "inputs": [
13
+ {
14
+ "internalType": "uint32",
15
+ "name": "eid",
16
+ "type": "uint32"
17
+ }
18
+ ],
19
+ "name": "NoPeer",
20
+ "type": "error"
21
+ },
22
+ {
23
+ "inputs": [
24
+ {
25
+ "internalType": "uint32",
26
+ "name": "eid",
27
+ "type": "uint32"
28
+ },
29
+ {
30
+ "internalType": "bytes32",
31
+ "name": "sender",
32
+ "type": "bytes32"
33
+ }
34
+ ],
35
+ "name": "OnlyPeer",
36
+ "type": "error"
37
+ },
38
+ {
39
+ "anonymous": false,
40
+ "inputs": [
41
+ {
42
+ "indexed": true,
43
+ "internalType": "address",
44
+ "name": "previousOwner",
45
+ "type": "address"
46
+ },
47
+ {
48
+ "indexed": true,
49
+ "internalType": "address",
50
+ "name": "newOwner",
51
+ "type": "address"
52
+ }
53
+ ],
54
+ "name": "OwnershipTransferred",
55
+ "type": "event"
56
+ },
57
+ {
58
+ "anonymous": false,
59
+ "inputs": [
60
+ {
61
+ "indexed": false,
62
+ "internalType": "uint32",
63
+ "name": "eid",
64
+ "type": "uint32"
65
+ },
66
+ {
67
+ "indexed": false,
68
+ "internalType": "bytes32",
69
+ "name": "peer",
70
+ "type": "bytes32"
71
+ }
72
+ ],
73
+ "name": "PeerSet",
74
+ "type": "event"
75
+ },
76
+ {
77
+ "inputs": [],
78
+ "name": "endpoint",
79
+ "outputs": [
80
+ {
81
+ "internalType": "contract ILayerZeroEndpointV2",
82
+ "name": "",
83
+ "type": "address"
84
+ }
85
+ ],
86
+ "stateMutability": "view",
87
+ "type": "function"
88
+ },
89
+ {
90
+ "inputs": [],
91
+ "name": "oAppVersion",
92
+ "outputs": [
93
+ {
94
+ "internalType": "uint64",
95
+ "name": "senderVersion",
96
+ "type": "uint64"
97
+ },
98
+ {
99
+ "internalType": "uint64",
100
+ "name": "receiverVersion",
101
+ "type": "uint64"
102
+ }
103
+ ],
104
+ "stateMutability": "view",
105
+ "type": "function"
106
+ },
107
+ {
108
+ "inputs": [],
109
+ "name": "owner",
110
+ "outputs": [
111
+ {
112
+ "internalType": "address",
113
+ "name": "",
114
+ "type": "address"
115
+ }
116
+ ],
117
+ "stateMutability": "view",
118
+ "type": "function"
119
+ },
120
+ {
121
+ "inputs": [
122
+ {
123
+ "internalType": "uint32",
124
+ "name": "eid",
125
+ "type": "uint32"
126
+ }
127
+ ],
128
+ "name": "peers",
129
+ "outputs": [
130
+ {
131
+ "internalType": "bytes32",
132
+ "name": "peer",
133
+ "type": "bytes32"
134
+ }
135
+ ],
136
+ "stateMutability": "view",
137
+ "type": "function"
138
+ },
139
+ {
140
+ "inputs": [],
141
+ "name": "renounceOwnership",
142
+ "outputs": [],
143
+ "stateMutability": "nonpayable",
144
+ "type": "function"
145
+ },
146
+ {
147
+ "inputs": [
148
+ {
149
+ "internalType": "address",
150
+ "name": "_delegate",
151
+ "type": "address"
152
+ }
153
+ ],
154
+ "name": "setDelegate",
155
+ "outputs": [],
156
+ "stateMutability": "nonpayable",
157
+ "type": "function"
158
+ },
159
+ {
160
+ "inputs": [
161
+ {
162
+ "internalType": "uint32",
163
+ "name": "_eid",
164
+ "type": "uint32"
165
+ },
166
+ {
167
+ "internalType": "bytes32",
168
+ "name": "_peer",
169
+ "type": "bytes32"
170
+ }
171
+ ],
172
+ "name": "setPeer",
173
+ "outputs": [],
174
+ "stateMutability": "nonpayable",
175
+ "type": "function"
176
+ },
177
+ {
178
+ "inputs": [
179
+ {
180
+ "internalType": "address",
181
+ "name": "newOwner",
182
+ "type": "address"
183
+ }
184
+ ],
185
+ "name": "transferOwnership",
186
+ "outputs": [],
187
+ "stateMutability": "nonpayable",
188
+ "type": "function"
189
+ }
190
+ ],
191
+ "bytecode": "0x",
192
+ "deployedBytecode": "0x",
193
+ "linkReferences": {},
194
+ "deployedLinkReferences": {}
195
+ }