@he1sen/hashi 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (83) hide show
  1. package/README.md +23 -0
  2. package/contracts/src/HashiLightbulb.sol +71 -0
  3. package/contracts/src/HashiSwitch.sol +47 -0
  4. package/contracts/src/chainlink/CCIPAdapter.sol +35 -0
  5. package/contracts/src/chainlink/CCIPReporter.sol +60 -0
  6. package/contracts/src/vea/VeaAdapter.sol +49 -0
  7. package/contracts/src/vea/VeaReporter.sol +51 -0
  8. package/contracts/src/vea/interfaces/IReceiverGateway.sol +8 -0
  9. package/contracts/src/vea/interfaces/ISenderGateway.sol +9 -0
  10. package/contracts/src/vea/interfaces/IVeaInbox.sol +11 -0
  11. package/dist/contracts/broadcast/1514-42161.json +8 -0
  12. package/dist/contracts/broadcast/42161-1514.json +8 -0
  13. package/dist/contracts/broadcast/421614-10200.json +12 -0
  14. package/dist/contracts/broadcast/421614-11155111.json +12 -0
  15. package/dist/sdk/abi/Adapter.json +71 -0
  16. package/dist/sdk/abi/Hashi.json +171 -0
  17. package/dist/sdk/abi/Reporter.json +169 -0
  18. package/dist/sdk/abi/Yaho.json +504 -0
  19. package/dist/sdk/abi/Yaru.json +330 -0
  20. package/dist/sdk/abiMapping.d.ts +6 -0
  21. package/dist/sdk/abiMapping.js +16 -0
  22. package/dist/sdk/getters.d.ts +16 -0
  23. package/dist/sdk/getters.js +121 -0
  24. package/dist/sdk/index.d.ts +5 -0
  25. package/dist/sdk/index.js +23 -0
  26. package/dist/sdk/registry.d.ts +2 -0
  27. package/dist/sdk/registry.js +16 -0
  28. package/dist/sdk/types.d.ts +35 -0
  29. package/dist/sdk/types.js +9 -0
  30. package/dist/src/utils/chains.d.ts +7 -0
  31. package/dist/src/utils/chains.js +52 -0
  32. package/dist/tsconfig.sdk.tsbuildinfo +1 -0
  33. package/dist/typechain-types/Adapter.d.ts +57 -0
  34. package/dist/typechain-types/Adapter.js +2 -0
  35. package/dist/typechain-types/CCIPAdapter.d.ts +227 -0
  36. package/dist/typechain-types/CCIPAdapter.js +2 -0
  37. package/dist/typechain-types/CCIPReporter.d.ts +257 -0
  38. package/dist/typechain-types/CCIPReporter.js +2 -0
  39. package/dist/typechain-types/Hashi.d.ts +68 -0
  40. package/dist/typechain-types/Hashi.js +2 -0
  41. package/dist/typechain-types/LayerZeroAdapter.d.ts +319 -0
  42. package/dist/typechain-types/LayerZeroAdapter.js +2 -0
  43. package/dist/typechain-types/LayerZeroReporter.d.ts +359 -0
  44. package/dist/typechain-types/LayerZeroReporter.js +2 -0
  45. package/dist/typechain-types/Reporter.d.ts +118 -0
  46. package/dist/typechain-types/Reporter.js +2 -0
  47. package/dist/typechain-types/VeaAdapter.d.ts +137 -0
  48. package/dist/typechain-types/VeaAdapter.js +2 -0
  49. package/dist/typechain-types/VeaReporter.d.ts +166 -0
  50. package/dist/typechain-types/VeaReporter.js +2 -0
  51. package/dist/typechain-types/Yaho.d.ts +181 -0
  52. package/dist/typechain-types/Yaho.js +2 -0
  53. package/dist/typechain-types/Yaru.d.ts +142 -0
  54. package/dist/typechain-types/Yaru.js +2 -0
  55. package/dist/typechain-types/common.d.ts +21 -0
  56. package/dist/typechain-types/common.js +2 -0
  57. package/dist/typechain-types/factories/Adapter__factory.d.ts +61 -0
  58. package/dist/typechain-types/factories/Adapter__factory.js +88 -0
  59. package/dist/typechain-types/factories/CCIPAdapter__factory.d.ts +262 -0
  60. package/dist/typechain-types/factories/CCIPAdapter__factory.js +350 -0
  61. package/dist/typechain-types/factories/CCIPReporter__factory.d.ts +295 -0
  62. package/dist/typechain-types/factories/CCIPReporter__factory.js +389 -0
  63. package/dist/typechain-types/factories/Hashi__factory.d.ts +136 -0
  64. package/dist/typechain-types/factories/Hashi__factory.js +188 -0
  65. package/dist/typechain-types/factories/LayerZeroAdapter__factory.d.ts +407 -0
  66. package/dist/typechain-types/factories/LayerZeroAdapter__factory.js +538 -0
  67. package/dist/typechain-types/factories/LayerZeroReporter__factory.d.ts +430 -0
  68. package/dist/typechain-types/factories/LayerZeroReporter__factory.js +565 -0
  69. package/dist/typechain-types/factories/Reporter__factory.d.ts +138 -0
  70. package/dist/typechain-types/factories/Reporter__factory.js +186 -0
  71. package/dist/typechain-types/factories/VeaAdapter__factory.d.ts +185 -0
  72. package/dist/typechain-types/factories/VeaAdapter__factory.js +250 -0
  73. package/dist/typechain-types/factories/VeaReporter__factory.d.ts +246 -0
  74. package/dist/typechain-types/factories/VeaReporter__factory.js +327 -0
  75. package/dist/typechain-types/factories/Yaho__factory.d.ts +395 -0
  76. package/dist/typechain-types/factories/Yaho__factory.js +521 -0
  77. package/dist/typechain-types/factories/Yaru__factory.d.ts +260 -0
  78. package/dist/typechain-types/factories/Yaru__factory.js +347 -0
  79. package/dist/typechain-types/factories/index.d.ts +11 -0
  80. package/dist/typechain-types/factories/index.js +28 -0
  81. package/dist/typechain-types/index.d.ts +23 -0
  82. package/dist/typechain-types/index.js +59 -0
  83. package/package.json +54 -0
@@ -0,0 +1,186 @@
1
+ "use strict";
2
+ /* Autogenerated file. Do not edit manually. */
3
+ /* tslint:disable */
4
+ /* eslint-disable */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.Reporter__factory = void 0;
7
+ const ethers_1 = require("ethers");
8
+ const _abi = [
9
+ {
10
+ type: "function",
11
+ name: "HEADER_STORAGE",
12
+ inputs: [],
13
+ outputs: [
14
+ {
15
+ name: "",
16
+ type: "address",
17
+ internalType: "address",
18
+ },
19
+ ],
20
+ stateMutability: "view",
21
+ },
22
+ {
23
+ type: "function",
24
+ name: "YAHO",
25
+ inputs: [],
26
+ outputs: [
27
+ {
28
+ name: "",
29
+ type: "address",
30
+ internalType: "address",
31
+ },
32
+ ],
33
+ stateMutability: "view",
34
+ },
35
+ {
36
+ type: "function",
37
+ name: "dispatchBlocks",
38
+ inputs: [
39
+ {
40
+ name: "targetChainId",
41
+ type: "uint256",
42
+ internalType: "uint256",
43
+ },
44
+ {
45
+ name: "adapter",
46
+ type: "address",
47
+ internalType: "contract IAdapter",
48
+ },
49
+ {
50
+ name: "blockNumbers",
51
+ type: "uint256[]",
52
+ internalType: "uint256[]",
53
+ },
54
+ ],
55
+ outputs: [
56
+ {
57
+ name: "",
58
+ type: "bytes32",
59
+ internalType: "bytes32",
60
+ },
61
+ ],
62
+ stateMutability: "payable",
63
+ },
64
+ {
65
+ type: "function",
66
+ name: "dispatchMessages",
67
+ inputs: [
68
+ {
69
+ name: "targetChainId",
70
+ type: "uint256",
71
+ internalType: "uint256",
72
+ },
73
+ {
74
+ name: "adapter",
75
+ type: "address",
76
+ internalType: "contract IAdapter",
77
+ },
78
+ {
79
+ name: "messageIds",
80
+ type: "uint256[]",
81
+ internalType: "uint256[]",
82
+ },
83
+ {
84
+ name: "messageHashes",
85
+ type: "bytes32[]",
86
+ internalType: "bytes32[]",
87
+ },
88
+ ],
89
+ outputs: [
90
+ {
91
+ name: "",
92
+ type: "bytes32",
93
+ internalType: "bytes32",
94
+ },
95
+ ],
96
+ stateMutability: "payable",
97
+ },
98
+ {
99
+ type: "event",
100
+ name: "BlockDispatched",
101
+ inputs: [
102
+ {
103
+ name: "targetChainId",
104
+ type: "uint256",
105
+ indexed: true,
106
+ internalType: "uint256",
107
+ },
108
+ {
109
+ name: "adapter",
110
+ type: "address",
111
+ indexed: false,
112
+ internalType: "contract IAdapter",
113
+ },
114
+ {
115
+ name: "blockNumber",
116
+ type: "uint256",
117
+ indexed: true,
118
+ internalType: "uint256",
119
+ },
120
+ {
121
+ name: "blockHeader",
122
+ type: "bytes32",
123
+ indexed: false,
124
+ internalType: "bytes32",
125
+ },
126
+ ],
127
+ anonymous: false,
128
+ },
129
+ {
130
+ type: "event",
131
+ name: "MessageDispatched",
132
+ inputs: [
133
+ {
134
+ name: "targetChainId",
135
+ type: "uint256",
136
+ indexed: true,
137
+ internalType: "uint256",
138
+ },
139
+ {
140
+ name: "adapter",
141
+ type: "address",
142
+ indexed: false,
143
+ internalType: "contract IAdapter",
144
+ },
145
+ {
146
+ name: "messageId",
147
+ type: "uint256",
148
+ indexed: true,
149
+ internalType: "uint256",
150
+ },
151
+ {
152
+ name: "messageHash",
153
+ type: "bytes32",
154
+ indexed: false,
155
+ internalType: "bytes32",
156
+ },
157
+ ],
158
+ anonymous: false,
159
+ },
160
+ {
161
+ type: "error",
162
+ name: "NotYaho",
163
+ inputs: [
164
+ {
165
+ name: "sender",
166
+ type: "address",
167
+ internalType: "address",
168
+ },
169
+ {
170
+ name: "expectedYaho",
171
+ type: "address",
172
+ internalType: "address",
173
+ },
174
+ ],
175
+ },
176
+ ];
177
+ class Reporter__factory {
178
+ static createInterface() {
179
+ return new ethers_1.utils.Interface(_abi);
180
+ }
181
+ static connect(address, signerOrProvider) {
182
+ return new ethers_1.Contract(address, _abi, signerOrProvider);
183
+ }
184
+ }
185
+ exports.Reporter__factory = Reporter__factory;
186
+ Reporter__factory.abi = _abi;
@@ -0,0 +1,185 @@
1
+ import { Signer } from "ethers";
2
+ import type { Provider } from "@ethersproject/providers";
3
+ import type { VeaAdapter, VeaAdapterInterface } from "../VeaAdapter";
4
+ export declare class VeaAdapter__factory {
5
+ static readonly abi: readonly [{
6
+ readonly type: "constructor";
7
+ readonly inputs: readonly [{
8
+ readonly name: "veaOutbox_";
9
+ readonly type: "address";
10
+ readonly internalType: "address";
11
+ }, {
12
+ readonly name: "sourceChainId";
13
+ readonly type: "uint256";
14
+ readonly internalType: "uint256";
15
+ }];
16
+ readonly stateMutability: "nonpayable";
17
+ }, {
18
+ readonly type: "function";
19
+ readonly name: "PROVIDER";
20
+ readonly inputs: readonly [];
21
+ readonly outputs: readonly [{
22
+ readonly name: "";
23
+ readonly type: "string";
24
+ readonly internalType: "string";
25
+ }];
26
+ readonly stateMutability: "view";
27
+ }, {
28
+ readonly type: "function";
29
+ readonly name: "REPORTER";
30
+ readonly inputs: readonly [];
31
+ readonly outputs: readonly [{
32
+ readonly name: "";
33
+ readonly type: "address";
34
+ readonly internalType: "address";
35
+ }];
36
+ readonly stateMutability: "view";
37
+ }, {
38
+ readonly type: "function";
39
+ readonly name: "SOURCE_CHAIN_ID";
40
+ readonly inputs: readonly [];
41
+ readonly outputs: readonly [{
42
+ readonly name: "";
43
+ readonly type: "uint256";
44
+ readonly internalType: "uint256";
45
+ }];
46
+ readonly stateMutability: "view";
47
+ }, {
48
+ readonly type: "function";
49
+ readonly name: "VEA_OUTBOX";
50
+ readonly inputs: readonly [];
51
+ readonly outputs: readonly [{
52
+ readonly name: "";
53
+ readonly type: "address";
54
+ readonly internalType: "address";
55
+ }];
56
+ readonly stateMutability: "view";
57
+ }, {
58
+ readonly type: "function";
59
+ readonly name: "getHash";
60
+ readonly inputs: readonly [{
61
+ readonly name: "domain";
62
+ readonly type: "uint256";
63
+ readonly internalType: "uint256";
64
+ }, {
65
+ readonly name: "id";
66
+ readonly type: "uint256";
67
+ readonly internalType: "uint256";
68
+ }];
69
+ readonly outputs: readonly [{
70
+ readonly name: "";
71
+ readonly type: "bytes32";
72
+ readonly internalType: "bytes32";
73
+ }];
74
+ readonly stateMutability: "view";
75
+ }, {
76
+ readonly type: "function";
77
+ readonly name: "receiveMessage";
78
+ readonly inputs: readonly [{
79
+ readonly name: "sourceMsgSender";
80
+ readonly type: "address";
81
+ readonly internalType: "address";
82
+ }, {
83
+ readonly name: "data";
84
+ readonly type: "bytes";
85
+ readonly internalType: "bytes";
86
+ }];
87
+ readonly outputs: readonly [];
88
+ readonly stateMutability: "nonpayable";
89
+ }, {
90
+ readonly type: "function";
91
+ readonly name: "senderGateway";
92
+ readonly inputs: readonly [];
93
+ readonly outputs: readonly [{
94
+ readonly name: "";
95
+ readonly type: "address";
96
+ readonly internalType: "address";
97
+ }];
98
+ readonly stateMutability: "view";
99
+ }, {
100
+ readonly type: "function";
101
+ readonly name: "setReporter";
102
+ readonly inputs: readonly [{
103
+ readonly name: "reporter";
104
+ readonly type: "address";
105
+ readonly internalType: "address";
106
+ }];
107
+ readonly outputs: readonly [];
108
+ readonly stateMutability: "nonpayable";
109
+ }, {
110
+ readonly type: "function";
111
+ readonly name: "veaOutbox";
112
+ readonly inputs: readonly [];
113
+ readonly outputs: readonly [{
114
+ readonly name: "";
115
+ readonly type: "address";
116
+ readonly internalType: "address";
117
+ }];
118
+ readonly stateMutability: "view";
119
+ }, {
120
+ readonly type: "event";
121
+ readonly name: "HashStored";
122
+ readonly inputs: readonly [{
123
+ readonly name: "id";
124
+ readonly type: "uint256";
125
+ readonly indexed: true;
126
+ readonly internalType: "uint256";
127
+ }, {
128
+ readonly name: "hash";
129
+ readonly type: "bytes32";
130
+ readonly indexed: true;
131
+ readonly internalType: "bytes32";
132
+ }];
133
+ readonly anonymous: false;
134
+ }, {
135
+ readonly type: "error";
136
+ readonly name: "ArrayLengthMissmatch";
137
+ readonly inputs: readonly [];
138
+ }, {
139
+ readonly type: "error";
140
+ readonly name: "ConflictingBlockHeader";
141
+ readonly inputs: readonly [{
142
+ readonly name: "blockNumber";
143
+ readonly type: "uint256";
144
+ readonly internalType: "uint256";
145
+ }, {
146
+ readonly name: "blockHash";
147
+ readonly type: "bytes32";
148
+ readonly internalType: "bytes32";
149
+ }, {
150
+ readonly name: "storedBlockHash";
151
+ readonly type: "bytes32";
152
+ readonly internalType: "bytes32";
153
+ }];
154
+ }, {
155
+ readonly type: "error";
156
+ readonly name: "InvalidBlockHeaderRLP";
157
+ readonly inputs: readonly [];
158
+ }, {
159
+ readonly type: "error";
160
+ readonly name: "InvalidReporter";
161
+ readonly inputs: readonly [{
162
+ readonly name: "reporter";
163
+ readonly type: "address";
164
+ readonly internalType: "address";
165
+ }, {
166
+ readonly name: "expectedReporter";
167
+ readonly type: "address";
168
+ readonly internalType: "address";
169
+ }];
170
+ }, {
171
+ readonly type: "error";
172
+ readonly name: "InvalidVeaOutbox";
173
+ readonly inputs: readonly [{
174
+ readonly name: "veaOutbox";
175
+ readonly type: "address";
176
+ readonly internalType: "address";
177
+ }, {
178
+ readonly name: "expectedVeaOutboux";
179
+ readonly type: "address";
180
+ readonly internalType: "address";
181
+ }];
182
+ }];
183
+ static createInterface(): VeaAdapterInterface;
184
+ static connect(address: string, signerOrProvider: Signer | Provider): VeaAdapter;
185
+ }
@@ -0,0 +1,250 @@
1
+ "use strict";
2
+ /* Autogenerated file. Do not edit manually. */
3
+ /* tslint:disable */
4
+ /* eslint-disable */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.VeaAdapter__factory = void 0;
7
+ const ethers_1 = require("ethers");
8
+ const _abi = [
9
+ {
10
+ type: "constructor",
11
+ inputs: [
12
+ {
13
+ name: "veaOutbox_",
14
+ type: "address",
15
+ internalType: "address",
16
+ },
17
+ {
18
+ name: "sourceChainId",
19
+ type: "uint256",
20
+ internalType: "uint256",
21
+ },
22
+ ],
23
+ stateMutability: "nonpayable",
24
+ },
25
+ {
26
+ type: "function",
27
+ name: "PROVIDER",
28
+ inputs: [],
29
+ outputs: [
30
+ {
31
+ name: "",
32
+ type: "string",
33
+ internalType: "string",
34
+ },
35
+ ],
36
+ stateMutability: "view",
37
+ },
38
+ {
39
+ type: "function",
40
+ name: "REPORTER",
41
+ inputs: [],
42
+ outputs: [
43
+ {
44
+ name: "",
45
+ type: "address",
46
+ internalType: "address",
47
+ },
48
+ ],
49
+ stateMutability: "view",
50
+ },
51
+ {
52
+ type: "function",
53
+ name: "SOURCE_CHAIN_ID",
54
+ inputs: [],
55
+ outputs: [
56
+ {
57
+ name: "",
58
+ type: "uint256",
59
+ internalType: "uint256",
60
+ },
61
+ ],
62
+ stateMutability: "view",
63
+ },
64
+ {
65
+ type: "function",
66
+ name: "VEA_OUTBOX",
67
+ inputs: [],
68
+ outputs: [
69
+ {
70
+ name: "",
71
+ type: "address",
72
+ internalType: "address",
73
+ },
74
+ ],
75
+ stateMutability: "view",
76
+ },
77
+ {
78
+ type: "function",
79
+ name: "getHash",
80
+ inputs: [
81
+ {
82
+ name: "domain",
83
+ type: "uint256",
84
+ internalType: "uint256",
85
+ },
86
+ {
87
+ name: "id",
88
+ type: "uint256",
89
+ internalType: "uint256",
90
+ },
91
+ ],
92
+ outputs: [
93
+ {
94
+ name: "",
95
+ type: "bytes32",
96
+ internalType: "bytes32",
97
+ },
98
+ ],
99
+ stateMutability: "view",
100
+ },
101
+ {
102
+ type: "function",
103
+ name: "receiveMessage",
104
+ inputs: [
105
+ {
106
+ name: "sourceMsgSender",
107
+ type: "address",
108
+ internalType: "address",
109
+ },
110
+ {
111
+ name: "data",
112
+ type: "bytes",
113
+ internalType: "bytes",
114
+ },
115
+ ],
116
+ outputs: [],
117
+ stateMutability: "nonpayable",
118
+ },
119
+ {
120
+ type: "function",
121
+ name: "senderGateway",
122
+ inputs: [],
123
+ outputs: [
124
+ {
125
+ name: "",
126
+ type: "address",
127
+ internalType: "address",
128
+ },
129
+ ],
130
+ stateMutability: "view",
131
+ },
132
+ {
133
+ type: "function",
134
+ name: "setReporter",
135
+ inputs: [
136
+ {
137
+ name: "reporter",
138
+ type: "address",
139
+ internalType: "address",
140
+ },
141
+ ],
142
+ outputs: [],
143
+ stateMutability: "nonpayable",
144
+ },
145
+ {
146
+ type: "function",
147
+ name: "veaOutbox",
148
+ inputs: [],
149
+ outputs: [
150
+ {
151
+ name: "",
152
+ type: "address",
153
+ internalType: "address",
154
+ },
155
+ ],
156
+ stateMutability: "view",
157
+ },
158
+ {
159
+ type: "event",
160
+ name: "HashStored",
161
+ inputs: [
162
+ {
163
+ name: "id",
164
+ type: "uint256",
165
+ indexed: true,
166
+ internalType: "uint256",
167
+ },
168
+ {
169
+ name: "hash",
170
+ type: "bytes32",
171
+ indexed: true,
172
+ internalType: "bytes32",
173
+ },
174
+ ],
175
+ anonymous: false,
176
+ },
177
+ {
178
+ type: "error",
179
+ name: "ArrayLengthMissmatch",
180
+ inputs: [],
181
+ },
182
+ {
183
+ type: "error",
184
+ name: "ConflictingBlockHeader",
185
+ inputs: [
186
+ {
187
+ name: "blockNumber",
188
+ type: "uint256",
189
+ internalType: "uint256",
190
+ },
191
+ {
192
+ name: "blockHash",
193
+ type: "bytes32",
194
+ internalType: "bytes32",
195
+ },
196
+ {
197
+ name: "storedBlockHash",
198
+ type: "bytes32",
199
+ internalType: "bytes32",
200
+ },
201
+ ],
202
+ },
203
+ {
204
+ type: "error",
205
+ name: "InvalidBlockHeaderRLP",
206
+ inputs: [],
207
+ },
208
+ {
209
+ type: "error",
210
+ name: "InvalidReporter",
211
+ inputs: [
212
+ {
213
+ name: "reporter",
214
+ type: "address",
215
+ internalType: "address",
216
+ },
217
+ {
218
+ name: "expectedReporter",
219
+ type: "address",
220
+ internalType: "address",
221
+ },
222
+ ],
223
+ },
224
+ {
225
+ type: "error",
226
+ name: "InvalidVeaOutbox",
227
+ inputs: [
228
+ {
229
+ name: "veaOutbox",
230
+ type: "address",
231
+ internalType: "address",
232
+ },
233
+ {
234
+ name: "expectedVeaOutboux",
235
+ type: "address",
236
+ internalType: "address",
237
+ },
238
+ ],
239
+ },
240
+ ];
241
+ class VeaAdapter__factory {
242
+ static createInterface() {
243
+ return new ethers_1.utils.Interface(_abi);
244
+ }
245
+ static connect(address, signerOrProvider) {
246
+ return new ethers_1.Contract(address, _abi, signerOrProvider);
247
+ }
248
+ }
249
+ exports.VeaAdapter__factory = VeaAdapter__factory;
250
+ VeaAdapter__factory.abi = _abi;