@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.
- package/README.md +23 -0
- package/contracts/src/HashiLightbulb.sol +71 -0
- package/contracts/src/HashiSwitch.sol +47 -0
- package/contracts/src/chainlink/CCIPAdapter.sol +35 -0
- package/contracts/src/chainlink/CCIPReporter.sol +60 -0
- package/contracts/src/vea/VeaAdapter.sol +49 -0
- package/contracts/src/vea/VeaReporter.sol +51 -0
- package/contracts/src/vea/interfaces/IReceiverGateway.sol +8 -0
- package/contracts/src/vea/interfaces/ISenderGateway.sol +9 -0
- package/contracts/src/vea/interfaces/IVeaInbox.sol +11 -0
- package/dist/contracts/broadcast/1514-42161.json +8 -0
- package/dist/contracts/broadcast/42161-1514.json +8 -0
- package/dist/contracts/broadcast/421614-10200.json +12 -0
- package/dist/contracts/broadcast/421614-11155111.json +12 -0
- package/dist/sdk/abi/Adapter.json +71 -0
- package/dist/sdk/abi/Hashi.json +171 -0
- package/dist/sdk/abi/Reporter.json +169 -0
- package/dist/sdk/abi/Yaho.json +504 -0
- package/dist/sdk/abi/Yaru.json +330 -0
- package/dist/sdk/abiMapping.d.ts +6 -0
- package/dist/sdk/abiMapping.js +16 -0
- package/dist/sdk/getters.d.ts +16 -0
- package/dist/sdk/getters.js +121 -0
- package/dist/sdk/index.d.ts +5 -0
- package/dist/sdk/index.js +23 -0
- package/dist/sdk/registry.d.ts +2 -0
- package/dist/sdk/registry.js +16 -0
- package/dist/sdk/types.d.ts +35 -0
- package/dist/sdk/types.js +9 -0
- package/dist/src/utils/chains.d.ts +7 -0
- package/dist/src/utils/chains.js +52 -0
- package/dist/tsconfig.sdk.tsbuildinfo +1 -0
- package/dist/typechain-types/Adapter.d.ts +57 -0
- package/dist/typechain-types/Adapter.js +2 -0
- package/dist/typechain-types/CCIPAdapter.d.ts +227 -0
- package/dist/typechain-types/CCIPAdapter.js +2 -0
- package/dist/typechain-types/CCIPReporter.d.ts +257 -0
- package/dist/typechain-types/CCIPReporter.js +2 -0
- package/dist/typechain-types/Hashi.d.ts +68 -0
- package/dist/typechain-types/Hashi.js +2 -0
- package/dist/typechain-types/LayerZeroAdapter.d.ts +319 -0
- package/dist/typechain-types/LayerZeroAdapter.js +2 -0
- package/dist/typechain-types/LayerZeroReporter.d.ts +359 -0
- package/dist/typechain-types/LayerZeroReporter.js +2 -0
- package/dist/typechain-types/Reporter.d.ts +118 -0
- package/dist/typechain-types/Reporter.js +2 -0
- package/dist/typechain-types/VeaAdapter.d.ts +137 -0
- package/dist/typechain-types/VeaAdapter.js +2 -0
- package/dist/typechain-types/VeaReporter.d.ts +166 -0
- package/dist/typechain-types/VeaReporter.js +2 -0
- package/dist/typechain-types/Yaho.d.ts +181 -0
- package/dist/typechain-types/Yaho.js +2 -0
- package/dist/typechain-types/Yaru.d.ts +142 -0
- package/dist/typechain-types/Yaru.js +2 -0
- package/dist/typechain-types/common.d.ts +21 -0
- package/dist/typechain-types/common.js +2 -0
- package/dist/typechain-types/factories/Adapter__factory.d.ts +61 -0
- package/dist/typechain-types/factories/Adapter__factory.js +88 -0
- package/dist/typechain-types/factories/CCIPAdapter__factory.d.ts +262 -0
- package/dist/typechain-types/factories/CCIPAdapter__factory.js +350 -0
- package/dist/typechain-types/factories/CCIPReporter__factory.d.ts +295 -0
- package/dist/typechain-types/factories/CCIPReporter__factory.js +389 -0
- package/dist/typechain-types/factories/Hashi__factory.d.ts +136 -0
- package/dist/typechain-types/factories/Hashi__factory.js +188 -0
- package/dist/typechain-types/factories/LayerZeroAdapter__factory.d.ts +407 -0
- package/dist/typechain-types/factories/LayerZeroAdapter__factory.js +538 -0
- package/dist/typechain-types/factories/LayerZeroReporter__factory.d.ts +430 -0
- package/dist/typechain-types/factories/LayerZeroReporter__factory.js +565 -0
- package/dist/typechain-types/factories/Reporter__factory.d.ts +138 -0
- package/dist/typechain-types/factories/Reporter__factory.js +186 -0
- package/dist/typechain-types/factories/VeaAdapter__factory.d.ts +185 -0
- package/dist/typechain-types/factories/VeaAdapter__factory.js +250 -0
- package/dist/typechain-types/factories/VeaReporter__factory.d.ts +246 -0
- package/dist/typechain-types/factories/VeaReporter__factory.js +327 -0
- package/dist/typechain-types/factories/Yaho__factory.d.ts +395 -0
- package/dist/typechain-types/factories/Yaho__factory.js +521 -0
- package/dist/typechain-types/factories/Yaru__factory.d.ts +260 -0
- package/dist/typechain-types/factories/Yaru__factory.js +347 -0
- package/dist/typechain-types/factories/index.d.ts +11 -0
- package/dist/typechain-types/factories/index.js +28 -0
- package/dist/typechain-types/index.d.ts +23 -0
- package/dist/typechain-types/index.js +59 -0
- package/package.json +54 -0
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
import { Signer } from "ethers";
|
|
2
|
+
import type { Provider } from "@ethersproject/providers";
|
|
3
|
+
import type { Hashi, HashiInterface } from "../Hashi";
|
|
4
|
+
export declare class Hashi__factory {
|
|
5
|
+
static readonly abi: readonly [{
|
|
6
|
+
readonly type: "function";
|
|
7
|
+
readonly name: "checkHashWithThresholdFromAdapters";
|
|
8
|
+
readonly inputs: readonly [{
|
|
9
|
+
readonly name: "domain";
|
|
10
|
+
readonly type: "uint256";
|
|
11
|
+
readonly internalType: "uint256";
|
|
12
|
+
}, {
|
|
13
|
+
readonly name: "id";
|
|
14
|
+
readonly type: "uint256";
|
|
15
|
+
readonly internalType: "uint256";
|
|
16
|
+
}, {
|
|
17
|
+
readonly name: "threshold";
|
|
18
|
+
readonly type: "uint256";
|
|
19
|
+
readonly internalType: "uint256";
|
|
20
|
+
}, {
|
|
21
|
+
readonly name: "adapters";
|
|
22
|
+
readonly type: "address[]";
|
|
23
|
+
readonly internalType: "contract IAdapter[]";
|
|
24
|
+
}];
|
|
25
|
+
readonly outputs: readonly [{
|
|
26
|
+
readonly name: "";
|
|
27
|
+
readonly type: "bool";
|
|
28
|
+
readonly internalType: "bool";
|
|
29
|
+
}];
|
|
30
|
+
readonly stateMutability: "view";
|
|
31
|
+
}, {
|
|
32
|
+
readonly type: "function";
|
|
33
|
+
readonly name: "getHash";
|
|
34
|
+
readonly inputs: readonly [{
|
|
35
|
+
readonly name: "domain";
|
|
36
|
+
readonly type: "uint256";
|
|
37
|
+
readonly internalType: "uint256";
|
|
38
|
+
}, {
|
|
39
|
+
readonly name: "id";
|
|
40
|
+
readonly type: "uint256";
|
|
41
|
+
readonly internalType: "uint256";
|
|
42
|
+
}, {
|
|
43
|
+
readonly name: "adapters";
|
|
44
|
+
readonly type: "address[]";
|
|
45
|
+
readonly internalType: "contract IAdapter[]";
|
|
46
|
+
}];
|
|
47
|
+
readonly outputs: readonly [{
|
|
48
|
+
readonly name: "hash";
|
|
49
|
+
readonly type: "bytes32";
|
|
50
|
+
readonly internalType: "bytes32";
|
|
51
|
+
}];
|
|
52
|
+
readonly stateMutability: "view";
|
|
53
|
+
}, {
|
|
54
|
+
readonly type: "function";
|
|
55
|
+
readonly name: "getHashFromAdapter";
|
|
56
|
+
readonly inputs: readonly [{
|
|
57
|
+
readonly name: "domain";
|
|
58
|
+
readonly type: "uint256";
|
|
59
|
+
readonly internalType: "uint256";
|
|
60
|
+
}, {
|
|
61
|
+
readonly name: "id";
|
|
62
|
+
readonly type: "uint256";
|
|
63
|
+
readonly internalType: "uint256";
|
|
64
|
+
}, {
|
|
65
|
+
readonly name: "adapter";
|
|
66
|
+
readonly type: "address";
|
|
67
|
+
readonly internalType: "contract IAdapter";
|
|
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: "getHashesFromAdapters";
|
|
78
|
+
readonly inputs: readonly [{
|
|
79
|
+
readonly name: "domain";
|
|
80
|
+
readonly type: "uint256";
|
|
81
|
+
readonly internalType: "uint256";
|
|
82
|
+
}, {
|
|
83
|
+
readonly name: "id";
|
|
84
|
+
readonly type: "uint256";
|
|
85
|
+
readonly internalType: "uint256";
|
|
86
|
+
}, {
|
|
87
|
+
readonly name: "adapters";
|
|
88
|
+
readonly type: "address[]";
|
|
89
|
+
readonly internalType: "contract IAdapter[]";
|
|
90
|
+
}];
|
|
91
|
+
readonly outputs: readonly [{
|
|
92
|
+
readonly name: "";
|
|
93
|
+
readonly type: "bytes32[]";
|
|
94
|
+
readonly internalType: "bytes32[]";
|
|
95
|
+
}];
|
|
96
|
+
readonly stateMutability: "view";
|
|
97
|
+
}, {
|
|
98
|
+
readonly type: "error";
|
|
99
|
+
readonly name: "AdaptersDisagree";
|
|
100
|
+
readonly inputs: readonly [{
|
|
101
|
+
readonly name: "adapterOne";
|
|
102
|
+
readonly type: "address";
|
|
103
|
+
readonly internalType: "contract IAdapter";
|
|
104
|
+
}, {
|
|
105
|
+
readonly name: "adapterTwo";
|
|
106
|
+
readonly type: "address";
|
|
107
|
+
readonly internalType: "contract IAdapter";
|
|
108
|
+
}];
|
|
109
|
+
}, {
|
|
110
|
+
readonly type: "error";
|
|
111
|
+
readonly name: "HashNotAvailableInAdapter";
|
|
112
|
+
readonly inputs: readonly [{
|
|
113
|
+
readonly name: "adapter";
|
|
114
|
+
readonly type: "address";
|
|
115
|
+
readonly internalType: "contract IAdapter";
|
|
116
|
+
}];
|
|
117
|
+
}, {
|
|
118
|
+
readonly type: "error";
|
|
119
|
+
readonly name: "InvalidThreshold";
|
|
120
|
+
readonly inputs: readonly [{
|
|
121
|
+
readonly name: "threshold";
|
|
122
|
+
readonly type: "uint256";
|
|
123
|
+
readonly internalType: "uint256";
|
|
124
|
+
}, {
|
|
125
|
+
readonly name: "maxThreshold";
|
|
126
|
+
readonly type: "uint256";
|
|
127
|
+
readonly internalType: "uint256";
|
|
128
|
+
}];
|
|
129
|
+
}, {
|
|
130
|
+
readonly type: "error";
|
|
131
|
+
readonly name: "NoAdaptersGiven";
|
|
132
|
+
readonly inputs: readonly [];
|
|
133
|
+
}];
|
|
134
|
+
static createInterface(): HashiInterface;
|
|
135
|
+
static connect(address: string, signerOrProvider: Signer | Provider): Hashi;
|
|
136
|
+
}
|
|
@@ -0,0 +1,188 @@
|
|
|
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.Hashi__factory = void 0;
|
|
7
|
+
const ethers_1 = require("ethers");
|
|
8
|
+
const _abi = [
|
|
9
|
+
{
|
|
10
|
+
type: "function",
|
|
11
|
+
name: "checkHashWithThresholdFromAdapters",
|
|
12
|
+
inputs: [
|
|
13
|
+
{
|
|
14
|
+
name: "domain",
|
|
15
|
+
type: "uint256",
|
|
16
|
+
internalType: "uint256",
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
name: "id",
|
|
20
|
+
type: "uint256",
|
|
21
|
+
internalType: "uint256",
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
name: "threshold",
|
|
25
|
+
type: "uint256",
|
|
26
|
+
internalType: "uint256",
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
name: "adapters",
|
|
30
|
+
type: "address[]",
|
|
31
|
+
internalType: "contract IAdapter[]",
|
|
32
|
+
},
|
|
33
|
+
],
|
|
34
|
+
outputs: [
|
|
35
|
+
{
|
|
36
|
+
name: "",
|
|
37
|
+
type: "bool",
|
|
38
|
+
internalType: "bool",
|
|
39
|
+
},
|
|
40
|
+
],
|
|
41
|
+
stateMutability: "view",
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
type: "function",
|
|
45
|
+
name: "getHash",
|
|
46
|
+
inputs: [
|
|
47
|
+
{
|
|
48
|
+
name: "domain",
|
|
49
|
+
type: "uint256",
|
|
50
|
+
internalType: "uint256",
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
name: "id",
|
|
54
|
+
type: "uint256",
|
|
55
|
+
internalType: "uint256",
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
name: "adapters",
|
|
59
|
+
type: "address[]",
|
|
60
|
+
internalType: "contract IAdapter[]",
|
|
61
|
+
},
|
|
62
|
+
],
|
|
63
|
+
outputs: [
|
|
64
|
+
{
|
|
65
|
+
name: "hash",
|
|
66
|
+
type: "bytes32",
|
|
67
|
+
internalType: "bytes32",
|
|
68
|
+
},
|
|
69
|
+
],
|
|
70
|
+
stateMutability: "view",
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
type: "function",
|
|
74
|
+
name: "getHashFromAdapter",
|
|
75
|
+
inputs: [
|
|
76
|
+
{
|
|
77
|
+
name: "domain",
|
|
78
|
+
type: "uint256",
|
|
79
|
+
internalType: "uint256",
|
|
80
|
+
},
|
|
81
|
+
{
|
|
82
|
+
name: "id",
|
|
83
|
+
type: "uint256",
|
|
84
|
+
internalType: "uint256",
|
|
85
|
+
},
|
|
86
|
+
{
|
|
87
|
+
name: "adapter",
|
|
88
|
+
type: "address",
|
|
89
|
+
internalType: "contract IAdapter",
|
|
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: "getHashesFromAdapters",
|
|
104
|
+
inputs: [
|
|
105
|
+
{
|
|
106
|
+
name: "domain",
|
|
107
|
+
type: "uint256",
|
|
108
|
+
internalType: "uint256",
|
|
109
|
+
},
|
|
110
|
+
{
|
|
111
|
+
name: "id",
|
|
112
|
+
type: "uint256",
|
|
113
|
+
internalType: "uint256",
|
|
114
|
+
},
|
|
115
|
+
{
|
|
116
|
+
name: "adapters",
|
|
117
|
+
type: "address[]",
|
|
118
|
+
internalType: "contract IAdapter[]",
|
|
119
|
+
},
|
|
120
|
+
],
|
|
121
|
+
outputs: [
|
|
122
|
+
{
|
|
123
|
+
name: "",
|
|
124
|
+
type: "bytes32[]",
|
|
125
|
+
internalType: "bytes32[]",
|
|
126
|
+
},
|
|
127
|
+
],
|
|
128
|
+
stateMutability: "view",
|
|
129
|
+
},
|
|
130
|
+
{
|
|
131
|
+
type: "error",
|
|
132
|
+
name: "AdaptersDisagree",
|
|
133
|
+
inputs: [
|
|
134
|
+
{
|
|
135
|
+
name: "adapterOne",
|
|
136
|
+
type: "address",
|
|
137
|
+
internalType: "contract IAdapter",
|
|
138
|
+
},
|
|
139
|
+
{
|
|
140
|
+
name: "adapterTwo",
|
|
141
|
+
type: "address",
|
|
142
|
+
internalType: "contract IAdapter",
|
|
143
|
+
},
|
|
144
|
+
],
|
|
145
|
+
},
|
|
146
|
+
{
|
|
147
|
+
type: "error",
|
|
148
|
+
name: "HashNotAvailableInAdapter",
|
|
149
|
+
inputs: [
|
|
150
|
+
{
|
|
151
|
+
name: "adapter",
|
|
152
|
+
type: "address",
|
|
153
|
+
internalType: "contract IAdapter",
|
|
154
|
+
},
|
|
155
|
+
],
|
|
156
|
+
},
|
|
157
|
+
{
|
|
158
|
+
type: "error",
|
|
159
|
+
name: "InvalidThreshold",
|
|
160
|
+
inputs: [
|
|
161
|
+
{
|
|
162
|
+
name: "threshold",
|
|
163
|
+
type: "uint256",
|
|
164
|
+
internalType: "uint256",
|
|
165
|
+
},
|
|
166
|
+
{
|
|
167
|
+
name: "maxThreshold",
|
|
168
|
+
type: "uint256",
|
|
169
|
+
internalType: "uint256",
|
|
170
|
+
},
|
|
171
|
+
],
|
|
172
|
+
},
|
|
173
|
+
{
|
|
174
|
+
type: "error",
|
|
175
|
+
name: "NoAdaptersGiven",
|
|
176
|
+
inputs: [],
|
|
177
|
+
},
|
|
178
|
+
];
|
|
179
|
+
class Hashi__factory {
|
|
180
|
+
static createInterface() {
|
|
181
|
+
return new ethers_1.utils.Interface(_abi);
|
|
182
|
+
}
|
|
183
|
+
static connect(address, signerOrProvider) {
|
|
184
|
+
return new ethers_1.Contract(address, _abi, signerOrProvider);
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
exports.Hashi__factory = Hashi__factory;
|
|
188
|
+
Hashi__factory.abi = _abi;
|