@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,51 @@
1
+ {
2
+ "_format": "hh-sol-artifact-1",
3
+ "contractName": "IOAppMsgInspector",
4
+ "sourceName": "contracts/oapp/interfaces/IOAppMsgInspector.sol",
5
+ "abi": [
6
+ {
7
+ "inputs": [
8
+ {
9
+ "internalType": "bytes",
10
+ "name": "message",
11
+ "type": "bytes"
12
+ },
13
+ {
14
+ "internalType": "bytes",
15
+ "name": "options",
16
+ "type": "bytes"
17
+ }
18
+ ],
19
+ "name": "InspectionFailed",
20
+ "type": "error"
21
+ },
22
+ {
23
+ "inputs": [
24
+ {
25
+ "internalType": "bytes",
26
+ "name": "_message",
27
+ "type": "bytes"
28
+ },
29
+ {
30
+ "internalType": "bytes",
31
+ "name": "_options",
32
+ "type": "bytes"
33
+ }
34
+ ],
35
+ "name": "inspect",
36
+ "outputs": [
37
+ {
38
+ "internalType": "bool",
39
+ "name": "valid",
40
+ "type": "bool"
41
+ }
42
+ ],
43
+ "stateMutability": "view",
44
+ "type": "function"
45
+ }
46
+ ],
47
+ "bytecode": "0x",
48
+ "deployedBytecode": "0x",
49
+ "linkReferences": {},
50
+ "deployedLinkReferences": {}
51
+ }
@@ -0,0 +1,111 @@
1
+ {
2
+ "_format": "hh-sol-artifact-1",
3
+ "contractName": "IOAppOptionsType3",
4
+ "sourceName": "contracts/oapp/interfaces/IOAppOptionsType3.sol",
5
+ "abi": [
6
+ {
7
+ "inputs": [
8
+ {
9
+ "internalType": "bytes",
10
+ "name": "options",
11
+ "type": "bytes"
12
+ }
13
+ ],
14
+ "name": "InvalidOptions",
15
+ "type": "error"
16
+ },
17
+ {
18
+ "anonymous": false,
19
+ "inputs": [
20
+ {
21
+ "components": [
22
+ {
23
+ "internalType": "uint32",
24
+ "name": "eid",
25
+ "type": "uint32"
26
+ },
27
+ {
28
+ "internalType": "uint16",
29
+ "name": "msgType",
30
+ "type": "uint16"
31
+ },
32
+ {
33
+ "internalType": "bytes",
34
+ "name": "options",
35
+ "type": "bytes"
36
+ }
37
+ ],
38
+ "indexed": false,
39
+ "internalType": "struct EnforcedOptionParam[]",
40
+ "name": "_enforcedOptions",
41
+ "type": "tuple[]"
42
+ }
43
+ ],
44
+ "name": "EnforcedOptionSet",
45
+ "type": "event"
46
+ },
47
+ {
48
+ "inputs": [
49
+ {
50
+ "internalType": "uint32",
51
+ "name": "_eid",
52
+ "type": "uint32"
53
+ },
54
+ {
55
+ "internalType": "uint16",
56
+ "name": "_msgType",
57
+ "type": "uint16"
58
+ },
59
+ {
60
+ "internalType": "bytes",
61
+ "name": "_extraOptions",
62
+ "type": "bytes"
63
+ }
64
+ ],
65
+ "name": "combineOptions",
66
+ "outputs": [
67
+ {
68
+ "internalType": "bytes",
69
+ "name": "options",
70
+ "type": "bytes"
71
+ }
72
+ ],
73
+ "stateMutability": "view",
74
+ "type": "function"
75
+ },
76
+ {
77
+ "inputs": [
78
+ {
79
+ "components": [
80
+ {
81
+ "internalType": "uint32",
82
+ "name": "eid",
83
+ "type": "uint32"
84
+ },
85
+ {
86
+ "internalType": "uint16",
87
+ "name": "msgType",
88
+ "type": "uint16"
89
+ },
90
+ {
91
+ "internalType": "bytes",
92
+ "name": "options",
93
+ "type": "bytes"
94
+ }
95
+ ],
96
+ "internalType": "struct EnforcedOptionParam[]",
97
+ "name": "_enforcedOptions",
98
+ "type": "tuple[]"
99
+ }
100
+ ],
101
+ "name": "setEnforcedOptions",
102
+ "outputs": [],
103
+ "stateMutability": "nonpayable",
104
+ "type": "function"
105
+ }
106
+ ],
107
+ "bytecode": "0x",
108
+ "deployedBytecode": "0x",
109
+ "linkReferences": {},
110
+ "deployedLinkReferences": {}
111
+ }
@@ -0,0 +1,187 @@
1
+ {
2
+ "_format": "hh-sol-artifact-1",
3
+ "contractName": "OAppOptionsType3",
4
+ "sourceName": "contracts/oapp/libs/OAppOptionsType3.sol",
5
+ "abi": [
6
+ {
7
+ "inputs": [
8
+ {
9
+ "internalType": "bytes",
10
+ "name": "options",
11
+ "type": "bytes"
12
+ }
13
+ ],
14
+ "name": "InvalidOptions",
15
+ "type": "error"
16
+ },
17
+ {
18
+ "anonymous": false,
19
+ "inputs": [
20
+ {
21
+ "components": [
22
+ {
23
+ "internalType": "uint32",
24
+ "name": "eid",
25
+ "type": "uint32"
26
+ },
27
+ {
28
+ "internalType": "uint16",
29
+ "name": "msgType",
30
+ "type": "uint16"
31
+ },
32
+ {
33
+ "internalType": "bytes",
34
+ "name": "options",
35
+ "type": "bytes"
36
+ }
37
+ ],
38
+ "indexed": false,
39
+ "internalType": "struct EnforcedOptionParam[]",
40
+ "name": "_enforcedOptions",
41
+ "type": "tuple[]"
42
+ }
43
+ ],
44
+ "name": "EnforcedOptionSet",
45
+ "type": "event"
46
+ },
47
+ {
48
+ "anonymous": false,
49
+ "inputs": [
50
+ {
51
+ "indexed": true,
52
+ "internalType": "address",
53
+ "name": "previousOwner",
54
+ "type": "address"
55
+ },
56
+ {
57
+ "indexed": true,
58
+ "internalType": "address",
59
+ "name": "newOwner",
60
+ "type": "address"
61
+ }
62
+ ],
63
+ "name": "OwnershipTransferred",
64
+ "type": "event"
65
+ },
66
+ {
67
+ "inputs": [
68
+ {
69
+ "internalType": "uint32",
70
+ "name": "_eid",
71
+ "type": "uint32"
72
+ },
73
+ {
74
+ "internalType": "uint16",
75
+ "name": "_msgType",
76
+ "type": "uint16"
77
+ },
78
+ {
79
+ "internalType": "bytes",
80
+ "name": "_extraOptions",
81
+ "type": "bytes"
82
+ }
83
+ ],
84
+ "name": "combineOptions",
85
+ "outputs": [
86
+ {
87
+ "internalType": "bytes",
88
+ "name": "",
89
+ "type": "bytes"
90
+ }
91
+ ],
92
+ "stateMutability": "view",
93
+ "type": "function"
94
+ },
95
+ {
96
+ "inputs": [
97
+ {
98
+ "internalType": "uint32",
99
+ "name": "eid",
100
+ "type": "uint32"
101
+ },
102
+ {
103
+ "internalType": "uint16",
104
+ "name": "msgType",
105
+ "type": "uint16"
106
+ }
107
+ ],
108
+ "name": "enforcedOptions",
109
+ "outputs": [
110
+ {
111
+ "internalType": "bytes",
112
+ "name": "enforcedOption",
113
+ "type": "bytes"
114
+ }
115
+ ],
116
+ "stateMutability": "view",
117
+ "type": "function"
118
+ },
119
+ {
120
+ "inputs": [],
121
+ "name": "owner",
122
+ "outputs": [
123
+ {
124
+ "internalType": "address",
125
+ "name": "",
126
+ "type": "address"
127
+ }
128
+ ],
129
+ "stateMutability": "view",
130
+ "type": "function"
131
+ },
132
+ {
133
+ "inputs": [],
134
+ "name": "renounceOwnership",
135
+ "outputs": [],
136
+ "stateMutability": "nonpayable",
137
+ "type": "function"
138
+ },
139
+ {
140
+ "inputs": [
141
+ {
142
+ "components": [
143
+ {
144
+ "internalType": "uint32",
145
+ "name": "eid",
146
+ "type": "uint32"
147
+ },
148
+ {
149
+ "internalType": "uint16",
150
+ "name": "msgType",
151
+ "type": "uint16"
152
+ },
153
+ {
154
+ "internalType": "bytes",
155
+ "name": "options",
156
+ "type": "bytes"
157
+ }
158
+ ],
159
+ "internalType": "struct EnforcedOptionParam[]",
160
+ "name": "_enforcedOptions",
161
+ "type": "tuple[]"
162
+ }
163
+ ],
164
+ "name": "setEnforcedOptions",
165
+ "outputs": [],
166
+ "stateMutability": "nonpayable",
167
+ "type": "function"
168
+ },
169
+ {
170
+ "inputs": [
171
+ {
172
+ "internalType": "address",
173
+ "name": "newOwner",
174
+ "type": "address"
175
+ }
176
+ ],
177
+ "name": "transferOwnership",
178
+ "outputs": [],
179
+ "stateMutability": "nonpayable",
180
+ "type": "function"
181
+ }
182
+ ],
183
+ "bytecode": "0x",
184
+ "deployedBytecode": "0x",
185
+ "linkReferences": {},
186
+ "deployedLinkReferences": {}
187
+ }
@@ -0,0 +1,38 @@
1
+ {
2
+ "_format": "hh-sol-artifact-1",
3
+ "contractName": "OptionsBuilder",
4
+ "sourceName": "contracts/oapp/libs/OptionsBuilder.sol",
5
+ "abi": [
6
+ {
7
+ "inputs": [
8
+ {
9
+ "internalType": "uint16",
10
+ "name": "optionType",
11
+ "type": "uint16"
12
+ }
13
+ ],
14
+ "name": "InvalidOptionType",
15
+ "type": "error"
16
+ },
17
+ {
18
+ "inputs": [
19
+ {
20
+ "internalType": "uint256",
21
+ "name": "max",
22
+ "type": "uint256"
23
+ },
24
+ {
25
+ "internalType": "uint256",
26
+ "name": "actual",
27
+ "type": "uint256"
28
+ }
29
+ ],
30
+ "name": "InvalidSize",
31
+ "type": "error"
32
+ }
33
+ ],
34
+ "bytecode": "0x60566037600b82828239805160001a607314602a57634e487b7160e01b600052600060045260246000fd5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea26469706673582212208d7f4288b135bb9ce8d15dadb94ebef0d2063ca80a40297da7252bd333f2b1fa64736f6c63430008160033",
35
+ "deployedBytecode": "0x73000000000000000000000000000000000000000030146080604052600080fdfea26469706673582212208d7f4288b135bb9ce8d15dadb94ebef0d2063ca80a40297da7252bd333f2b1fa64736f6c63430008160033",
36
+ "linkReferences": {},
37
+ "deployedLinkReferences": {}
38
+ }