@gitmyabi/teikhosbounty 1.0.2 → 1.0.3
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 +3 -3
- package/contracts/TeikhosBounty_json.d.ts +257 -4
- package/contracts/TeikhosBounty_json.js +255 -4
- package/contracts/TeikhosBounty_json.ts +332 -6
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
Auto-generated TypeScript type bindings for **TeikhosBounty**
|
|
4
4
|
|
|
5
|
-
- **Build ID**: `etherscan-teikhosbounty-
|
|
5
|
+
- **Build ID**: `etherscan-teikhosbounty-973c2178-1793587980586`
|
|
6
6
|
- **Build Number**: 1
|
|
7
|
-
- **Commit**: `
|
|
7
|
+
- **Commit**: `7884fcf`
|
|
8
8
|
- **Branch**: `etherscan`
|
|
9
9
|
- **Target**: `ethers-v6`
|
|
10
10
|
- **Contracts**: 1
|
|
@@ -12,7 +12,7 @@ Auto-generated TypeScript type bindings for **TeikhosBounty**
|
|
|
12
12
|
## Installation
|
|
13
13
|
|
|
14
14
|
```bash
|
|
15
|
-
npm install @gitmyabi/teikhosbounty@1.0.
|
|
15
|
+
npm install @gitmyabi/teikhosbounty@1.0.3
|
|
16
16
|
```
|
|
17
17
|
|
|
18
18
|
## Usage
|
|
@@ -5,17 +5,133 @@ import type { Address, PublicClient, WalletClient } from 'viem';
|
|
|
5
5
|
* This ABI is typed using viem's type system for full type safety.
|
|
6
6
|
*/
|
|
7
7
|
export declare const TeikhosBounty_jsonAbi: readonly [{
|
|
8
|
+
readonly constant: true;
|
|
9
|
+
readonly inputs: readonly [];
|
|
10
|
+
readonly name: "proof_of_public_key1";
|
|
11
|
+
readonly outputs: readonly [{
|
|
12
|
+
readonly name: "";
|
|
13
|
+
readonly type: "bytes32";
|
|
14
|
+
}];
|
|
15
|
+
readonly payable: false;
|
|
16
|
+
readonly stateMutability: "view";
|
|
17
|
+
readonly type: "function";
|
|
18
|
+
}, {
|
|
19
|
+
readonly constant: false;
|
|
20
|
+
readonly inputs: readonly [];
|
|
21
|
+
readonly name: "reward";
|
|
22
|
+
readonly outputs: readonly [];
|
|
23
|
+
readonly payable: false;
|
|
24
|
+
readonly stateMutability: "nonpayable";
|
|
25
|
+
readonly type: "function";
|
|
26
|
+
}, {
|
|
27
|
+
readonly constant: true;
|
|
28
|
+
readonly inputs: readonly [];
|
|
29
|
+
readonly name: "isSolved";
|
|
30
|
+
readonly outputs: readonly [{
|
|
31
|
+
readonly name: "timestamp";
|
|
32
|
+
readonly type: "uint256";
|
|
33
|
+
}, {
|
|
34
|
+
readonly name: "publicKey";
|
|
35
|
+
readonly type: "bytes";
|
|
36
|
+
}, {
|
|
37
|
+
readonly name: "msgHash";
|
|
38
|
+
readonly type: "bytes32";
|
|
39
|
+
}];
|
|
40
|
+
readonly payable: false;
|
|
41
|
+
readonly stateMutability: "view";
|
|
42
|
+
readonly type: "function";
|
|
43
|
+
}, {
|
|
8
44
|
readonly constant: false;
|
|
9
45
|
readonly inputs: readonly [{
|
|
10
|
-
readonly name: "
|
|
46
|
+
readonly name: "_signature";
|
|
11
47
|
readonly type: "bytes";
|
|
12
48
|
}];
|
|
13
|
-
readonly name: "
|
|
49
|
+
readonly name: "commit";
|
|
50
|
+
readonly outputs: readonly [];
|
|
51
|
+
readonly payable: false;
|
|
52
|
+
readonly stateMutability: "nonpayable";
|
|
53
|
+
readonly type: "function";
|
|
54
|
+
}, {
|
|
55
|
+
readonly constant: true;
|
|
56
|
+
readonly inputs: readonly [];
|
|
57
|
+
readonly name: "sha3_512";
|
|
58
|
+
readonly outputs: readonly [{
|
|
59
|
+
readonly name: "";
|
|
60
|
+
readonly type: "address";
|
|
61
|
+
}];
|
|
62
|
+
readonly payable: false;
|
|
63
|
+
readonly stateMutability: "view";
|
|
64
|
+
readonly type: "function";
|
|
65
|
+
}, {
|
|
66
|
+
readonly constant: false;
|
|
67
|
+
readonly inputs: readonly [];
|
|
68
|
+
readonly name: "reveal";
|
|
69
|
+
readonly outputs: readonly [];
|
|
70
|
+
readonly payable: false;
|
|
71
|
+
readonly stateMutability: "nonpayable";
|
|
72
|
+
readonly type: "function";
|
|
73
|
+
}, {
|
|
74
|
+
readonly constant: true;
|
|
75
|
+
readonly inputs: readonly [{
|
|
76
|
+
readonly name: "";
|
|
77
|
+
readonly type: "address";
|
|
78
|
+
}];
|
|
79
|
+
readonly name: "commitment";
|
|
80
|
+
readonly outputs: readonly [{
|
|
81
|
+
readonly name: "timestamp";
|
|
82
|
+
readonly type: "uint256";
|
|
83
|
+
}, {
|
|
84
|
+
readonly name: "signature";
|
|
85
|
+
readonly type: "bytes";
|
|
86
|
+
}];
|
|
87
|
+
readonly payable: false;
|
|
88
|
+
readonly stateMutability: "view";
|
|
89
|
+
readonly type: "function";
|
|
90
|
+
}, {
|
|
91
|
+
readonly constant: true;
|
|
92
|
+
readonly inputs: readonly [];
|
|
93
|
+
readonly name: "proof_of_public_key2";
|
|
14
94
|
readonly outputs: readonly [{
|
|
15
95
|
readonly name: "";
|
|
16
|
-
readonly type: "
|
|
96
|
+
readonly type: "bytes32";
|
|
17
97
|
}];
|
|
18
98
|
readonly payable: false;
|
|
99
|
+
readonly stateMutability: "view";
|
|
100
|
+
readonly type: "function";
|
|
101
|
+
}, {
|
|
102
|
+
readonly constant: true;
|
|
103
|
+
readonly inputs: readonly [];
|
|
104
|
+
readonly name: "bipedaljoe";
|
|
105
|
+
readonly outputs: readonly [{
|
|
106
|
+
readonly name: "";
|
|
107
|
+
readonly type: "address";
|
|
108
|
+
}];
|
|
109
|
+
readonly payable: false;
|
|
110
|
+
readonly stateMutability: "view";
|
|
111
|
+
readonly type: "function";
|
|
112
|
+
}, {
|
|
113
|
+
readonly constant: true;
|
|
114
|
+
readonly inputs: readonly [];
|
|
115
|
+
readonly name: "winner";
|
|
116
|
+
readonly outputs: readonly [{
|
|
117
|
+
readonly name: "timestamp";
|
|
118
|
+
readonly type: "uint256";
|
|
119
|
+
}, {
|
|
120
|
+
readonly name: "winner";
|
|
121
|
+
readonly type: "address";
|
|
122
|
+
}];
|
|
123
|
+
readonly payable: false;
|
|
124
|
+
readonly stateMutability: "view";
|
|
125
|
+
readonly type: "function";
|
|
126
|
+
}, {
|
|
127
|
+
readonly constant: false;
|
|
128
|
+
readonly inputs: readonly [{
|
|
129
|
+
readonly name: "_publicKey";
|
|
130
|
+
readonly type: "bytes";
|
|
131
|
+
}];
|
|
132
|
+
readonly name: "authenticate";
|
|
133
|
+
readonly outputs: readonly [];
|
|
134
|
+
readonly payable: false;
|
|
19
135
|
readonly stateMutability: "nonpayable";
|
|
20
136
|
readonly type: "function";
|
|
21
137
|
}, {
|
|
@@ -79,6 +195,92 @@ export declare class TeikhosBounty_json {
|
|
|
79
195
|
* Get the underlying viem contract instance
|
|
80
196
|
*/
|
|
81
197
|
getContract(): TeikhosBounty_jsonContract;
|
|
198
|
+
/**
|
|
199
|
+
* proof_of_public_key1
|
|
200
|
+
* view
|
|
201
|
+
*/
|
|
202
|
+
proof_of_public_key1(): Promise<`0x${string}`>;
|
|
203
|
+
/**
|
|
204
|
+
* isSolved
|
|
205
|
+
* view
|
|
206
|
+
*/
|
|
207
|
+
isSolved(): Promise<[bigint, `0x${string}`, `0x${string}`]>;
|
|
208
|
+
/**
|
|
209
|
+
* sha3_512
|
|
210
|
+
* view
|
|
211
|
+
*/
|
|
212
|
+
sha3_512(): Promise<`0x${string}`>;
|
|
213
|
+
/**
|
|
214
|
+
* commitment
|
|
215
|
+
* view
|
|
216
|
+
*/
|
|
217
|
+
commitment(arg0: `0x${string}`): Promise<[bigint, `0x${string}`]>;
|
|
218
|
+
/**
|
|
219
|
+
* proof_of_public_key2
|
|
220
|
+
* view
|
|
221
|
+
*/
|
|
222
|
+
proof_of_public_key2(): Promise<`0x${string}`>;
|
|
223
|
+
/**
|
|
224
|
+
* bipedaljoe
|
|
225
|
+
* view
|
|
226
|
+
*/
|
|
227
|
+
bipedaljoe(): Promise<`0x${string}`>;
|
|
228
|
+
/**
|
|
229
|
+
* winner
|
|
230
|
+
* view
|
|
231
|
+
*/
|
|
232
|
+
winner(): Promise<[bigint, `0x${string}`]>;
|
|
233
|
+
/**
|
|
234
|
+
* reward
|
|
235
|
+
* nonpayable
|
|
236
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
237
|
+
*/
|
|
238
|
+
reward(options?: {
|
|
239
|
+
accessList?: import('viem').AccessList;
|
|
240
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
241
|
+
chain?: import('viem').Chain | null;
|
|
242
|
+
dataSuffix?: `0x${string}`;
|
|
243
|
+
gas?: bigint;
|
|
244
|
+
gasPrice?: bigint;
|
|
245
|
+
maxFeePerGas?: bigint;
|
|
246
|
+
maxPriorityFeePerGas?: bigint;
|
|
247
|
+
nonce?: number;
|
|
248
|
+
value?: bigint;
|
|
249
|
+
}): Promise<`0x${string}`>;
|
|
250
|
+
/**
|
|
251
|
+
* commit
|
|
252
|
+
* nonpayable
|
|
253
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
254
|
+
*/
|
|
255
|
+
commit(_signature: `0x${string}`, options?: {
|
|
256
|
+
accessList?: import('viem').AccessList;
|
|
257
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
258
|
+
chain?: import('viem').Chain | null;
|
|
259
|
+
dataSuffix?: `0x${string}`;
|
|
260
|
+
gas?: bigint;
|
|
261
|
+
gasPrice?: bigint;
|
|
262
|
+
maxFeePerGas?: bigint;
|
|
263
|
+
maxPriorityFeePerGas?: bigint;
|
|
264
|
+
nonce?: number;
|
|
265
|
+
value?: bigint;
|
|
266
|
+
}): Promise<`0x${string}`>;
|
|
267
|
+
/**
|
|
268
|
+
* reveal
|
|
269
|
+
* nonpayable
|
|
270
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
271
|
+
*/
|
|
272
|
+
reveal(options?: {
|
|
273
|
+
accessList?: import('viem').AccessList;
|
|
274
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
275
|
+
chain?: import('viem').Chain | null;
|
|
276
|
+
dataSuffix?: `0x${string}`;
|
|
277
|
+
gas?: bigint;
|
|
278
|
+
gasPrice?: bigint;
|
|
279
|
+
maxFeePerGas?: bigint;
|
|
280
|
+
maxPriorityFeePerGas?: bigint;
|
|
281
|
+
nonce?: number;
|
|
282
|
+
value?: bigint;
|
|
283
|
+
}): Promise<`0x${string}`>;
|
|
82
284
|
/**
|
|
83
285
|
* authenticate
|
|
84
286
|
* nonpayable
|
|
@@ -105,6 +307,57 @@ export declare class TeikhosBounty_json {
|
|
|
105
307
|
* console.log('Would succeed:', result.result);
|
|
106
308
|
*/
|
|
107
309
|
get simulate(): {
|
|
310
|
+
/**
|
|
311
|
+
* Simulate reward
|
|
312
|
+
* Returns gas estimate and result without sending transaction
|
|
313
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
314
|
+
*/
|
|
315
|
+
reward(options?: {
|
|
316
|
+
accessList?: import("viem").AccessList;
|
|
317
|
+
authorizationList?: import("viem").AuthorizationList;
|
|
318
|
+
chain?: import("viem").Chain | null;
|
|
319
|
+
dataSuffix?: `0x${string}`;
|
|
320
|
+
gas?: bigint;
|
|
321
|
+
gasPrice?: bigint;
|
|
322
|
+
maxFeePerGas?: bigint;
|
|
323
|
+
maxPriorityFeePerGas?: bigint;
|
|
324
|
+
nonce?: number;
|
|
325
|
+
value?: bigint;
|
|
326
|
+
}): Promise<void>;
|
|
327
|
+
/**
|
|
328
|
+
* Simulate commit
|
|
329
|
+
* Returns gas estimate and result without sending transaction
|
|
330
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
331
|
+
*/
|
|
332
|
+
commit(_signature: `0x${string}`, options?: {
|
|
333
|
+
accessList?: import("viem").AccessList;
|
|
334
|
+
authorizationList?: import("viem").AuthorizationList;
|
|
335
|
+
chain?: import("viem").Chain | null;
|
|
336
|
+
dataSuffix?: `0x${string}`;
|
|
337
|
+
gas?: bigint;
|
|
338
|
+
gasPrice?: bigint;
|
|
339
|
+
maxFeePerGas?: bigint;
|
|
340
|
+
maxPriorityFeePerGas?: bigint;
|
|
341
|
+
nonce?: number;
|
|
342
|
+
value?: bigint;
|
|
343
|
+
}): Promise<void>;
|
|
344
|
+
/**
|
|
345
|
+
* Simulate reveal
|
|
346
|
+
* Returns gas estimate and result without sending transaction
|
|
347
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
348
|
+
*/
|
|
349
|
+
reveal(options?: {
|
|
350
|
+
accessList?: import("viem").AccessList;
|
|
351
|
+
authorizationList?: import("viem").AuthorizationList;
|
|
352
|
+
chain?: import("viem").Chain | null;
|
|
353
|
+
dataSuffix?: `0x${string}`;
|
|
354
|
+
gas?: bigint;
|
|
355
|
+
gasPrice?: bigint;
|
|
356
|
+
maxFeePerGas?: bigint;
|
|
357
|
+
maxPriorityFeePerGas?: bigint;
|
|
358
|
+
nonce?: number;
|
|
359
|
+
value?: bigint;
|
|
360
|
+
}): Promise<void>;
|
|
108
361
|
/**
|
|
109
362
|
* Simulate authenticate
|
|
110
363
|
* Returns gas estimate and result without sending transaction
|
|
@@ -121,7 +374,7 @@ export declare class TeikhosBounty_json {
|
|
|
121
374
|
maxPriorityFeePerGas?: bigint;
|
|
122
375
|
nonce?: number;
|
|
123
376
|
value?: bigint;
|
|
124
|
-
}): Promise<
|
|
377
|
+
}): Promise<void>;
|
|
125
378
|
};
|
|
126
379
|
/**
|
|
127
380
|
* Watch contract events
|
|
@@ -8,22 +8,168 @@ const viem_1 = require("viem");
|
|
|
8
8
|
* This ABI is typed using viem's type system for full type safety.
|
|
9
9
|
*/
|
|
10
10
|
exports.TeikhosBounty_jsonAbi = [
|
|
11
|
+
{
|
|
12
|
+
"constant": true,
|
|
13
|
+
"inputs": [],
|
|
14
|
+
"name": "proof_of_public_key1",
|
|
15
|
+
"outputs": [
|
|
16
|
+
{
|
|
17
|
+
"name": "",
|
|
18
|
+
"type": "bytes32"
|
|
19
|
+
}
|
|
20
|
+
],
|
|
21
|
+
"payable": false,
|
|
22
|
+
"stateMutability": "view",
|
|
23
|
+
"type": "function"
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
"constant": false,
|
|
27
|
+
"inputs": [],
|
|
28
|
+
"name": "reward",
|
|
29
|
+
"outputs": [],
|
|
30
|
+
"payable": false,
|
|
31
|
+
"stateMutability": "nonpayable",
|
|
32
|
+
"type": "function"
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
"constant": true,
|
|
36
|
+
"inputs": [],
|
|
37
|
+
"name": "isSolved",
|
|
38
|
+
"outputs": [
|
|
39
|
+
{
|
|
40
|
+
"name": "timestamp",
|
|
41
|
+
"type": "uint256"
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
"name": "publicKey",
|
|
45
|
+
"type": "bytes"
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
"name": "msgHash",
|
|
49
|
+
"type": "bytes32"
|
|
50
|
+
}
|
|
51
|
+
],
|
|
52
|
+
"payable": false,
|
|
53
|
+
"stateMutability": "view",
|
|
54
|
+
"type": "function"
|
|
55
|
+
},
|
|
11
56
|
{
|
|
12
57
|
"constant": false,
|
|
13
58
|
"inputs": [
|
|
14
59
|
{
|
|
15
|
-
"name": "
|
|
60
|
+
"name": "_signature",
|
|
16
61
|
"type": "bytes"
|
|
17
62
|
}
|
|
18
63
|
],
|
|
19
|
-
"name": "
|
|
64
|
+
"name": "commit",
|
|
65
|
+
"outputs": [],
|
|
66
|
+
"payable": false,
|
|
67
|
+
"stateMutability": "nonpayable",
|
|
68
|
+
"type": "function"
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
"constant": true,
|
|
72
|
+
"inputs": [],
|
|
73
|
+
"name": "sha3_512",
|
|
20
74
|
"outputs": [
|
|
21
75
|
{
|
|
22
76
|
"name": "",
|
|
23
|
-
"type": "
|
|
77
|
+
"type": "address"
|
|
24
78
|
}
|
|
25
79
|
],
|
|
26
80
|
"payable": false,
|
|
81
|
+
"stateMutability": "view",
|
|
82
|
+
"type": "function"
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
"constant": false,
|
|
86
|
+
"inputs": [],
|
|
87
|
+
"name": "reveal",
|
|
88
|
+
"outputs": [],
|
|
89
|
+
"payable": false,
|
|
90
|
+
"stateMutability": "nonpayable",
|
|
91
|
+
"type": "function"
|
|
92
|
+
},
|
|
93
|
+
{
|
|
94
|
+
"constant": true,
|
|
95
|
+
"inputs": [
|
|
96
|
+
{
|
|
97
|
+
"name": "",
|
|
98
|
+
"type": "address"
|
|
99
|
+
}
|
|
100
|
+
],
|
|
101
|
+
"name": "commitment",
|
|
102
|
+
"outputs": [
|
|
103
|
+
{
|
|
104
|
+
"name": "timestamp",
|
|
105
|
+
"type": "uint256"
|
|
106
|
+
},
|
|
107
|
+
{
|
|
108
|
+
"name": "signature",
|
|
109
|
+
"type": "bytes"
|
|
110
|
+
}
|
|
111
|
+
],
|
|
112
|
+
"payable": false,
|
|
113
|
+
"stateMutability": "view",
|
|
114
|
+
"type": "function"
|
|
115
|
+
},
|
|
116
|
+
{
|
|
117
|
+
"constant": true,
|
|
118
|
+
"inputs": [],
|
|
119
|
+
"name": "proof_of_public_key2",
|
|
120
|
+
"outputs": [
|
|
121
|
+
{
|
|
122
|
+
"name": "",
|
|
123
|
+
"type": "bytes32"
|
|
124
|
+
}
|
|
125
|
+
],
|
|
126
|
+
"payable": false,
|
|
127
|
+
"stateMutability": "view",
|
|
128
|
+
"type": "function"
|
|
129
|
+
},
|
|
130
|
+
{
|
|
131
|
+
"constant": true,
|
|
132
|
+
"inputs": [],
|
|
133
|
+
"name": "bipedaljoe",
|
|
134
|
+
"outputs": [
|
|
135
|
+
{
|
|
136
|
+
"name": "",
|
|
137
|
+
"type": "address"
|
|
138
|
+
}
|
|
139
|
+
],
|
|
140
|
+
"payable": false,
|
|
141
|
+
"stateMutability": "view",
|
|
142
|
+
"type": "function"
|
|
143
|
+
},
|
|
144
|
+
{
|
|
145
|
+
"constant": true,
|
|
146
|
+
"inputs": [],
|
|
147
|
+
"name": "winner",
|
|
148
|
+
"outputs": [
|
|
149
|
+
{
|
|
150
|
+
"name": "timestamp",
|
|
151
|
+
"type": "uint256"
|
|
152
|
+
},
|
|
153
|
+
{
|
|
154
|
+
"name": "winner",
|
|
155
|
+
"type": "address"
|
|
156
|
+
}
|
|
157
|
+
],
|
|
158
|
+
"payable": false,
|
|
159
|
+
"stateMutability": "view",
|
|
160
|
+
"type": "function"
|
|
161
|
+
},
|
|
162
|
+
{
|
|
163
|
+
"constant": false,
|
|
164
|
+
"inputs": [
|
|
165
|
+
{
|
|
166
|
+
"name": "_publicKey",
|
|
167
|
+
"type": "bytes"
|
|
168
|
+
}
|
|
169
|
+
],
|
|
170
|
+
"name": "authenticate",
|
|
171
|
+
"outputs": [],
|
|
172
|
+
"payable": false,
|
|
27
173
|
"stateMutability": "nonpayable",
|
|
28
174
|
"type": "function"
|
|
29
175
|
},
|
|
@@ -90,7 +236,88 @@ class TeikhosBounty_json {
|
|
|
90
236
|
getContract() {
|
|
91
237
|
return this.contract;
|
|
92
238
|
}
|
|
93
|
-
|
|
239
|
+
/**
|
|
240
|
+
* proof_of_public_key1
|
|
241
|
+
* view
|
|
242
|
+
*/
|
|
243
|
+
async proof_of_public_key1() {
|
|
244
|
+
return this.contract.read.proof_of_public_key1();
|
|
245
|
+
}
|
|
246
|
+
/**
|
|
247
|
+
* isSolved
|
|
248
|
+
* view
|
|
249
|
+
*/
|
|
250
|
+
async isSolved() {
|
|
251
|
+
return this.contract.read.isSolved();
|
|
252
|
+
}
|
|
253
|
+
/**
|
|
254
|
+
* sha3_512
|
|
255
|
+
* view
|
|
256
|
+
*/
|
|
257
|
+
async sha3_512() {
|
|
258
|
+
return this.contract.read.sha3_512();
|
|
259
|
+
}
|
|
260
|
+
/**
|
|
261
|
+
* commitment
|
|
262
|
+
* view
|
|
263
|
+
*/
|
|
264
|
+
async commitment(arg0) {
|
|
265
|
+
return this.contract.read.commitment([arg0]);
|
|
266
|
+
}
|
|
267
|
+
/**
|
|
268
|
+
* proof_of_public_key2
|
|
269
|
+
* view
|
|
270
|
+
*/
|
|
271
|
+
async proof_of_public_key2() {
|
|
272
|
+
return this.contract.read.proof_of_public_key2();
|
|
273
|
+
}
|
|
274
|
+
/**
|
|
275
|
+
* bipedaljoe
|
|
276
|
+
* view
|
|
277
|
+
*/
|
|
278
|
+
async bipedaljoe() {
|
|
279
|
+
return this.contract.read.bipedaljoe();
|
|
280
|
+
}
|
|
281
|
+
/**
|
|
282
|
+
* winner
|
|
283
|
+
* view
|
|
284
|
+
*/
|
|
285
|
+
async winner() {
|
|
286
|
+
return this.contract.read.winner();
|
|
287
|
+
}
|
|
288
|
+
/**
|
|
289
|
+
* reward
|
|
290
|
+
* nonpayable
|
|
291
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
292
|
+
*/
|
|
293
|
+
async reward(options) {
|
|
294
|
+
if (!this.contract.write) {
|
|
295
|
+
throw new Error('Wallet client is required for write operations');
|
|
296
|
+
}
|
|
297
|
+
return this.contract.write.reward(options);
|
|
298
|
+
}
|
|
299
|
+
/**
|
|
300
|
+
* commit
|
|
301
|
+
* nonpayable
|
|
302
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
303
|
+
*/
|
|
304
|
+
async commit(_signature, options) {
|
|
305
|
+
if (!this.contract.write) {
|
|
306
|
+
throw new Error('Wallet client is required for write operations');
|
|
307
|
+
}
|
|
308
|
+
return this.contract.write.commit([_signature], options);
|
|
309
|
+
}
|
|
310
|
+
/**
|
|
311
|
+
* reveal
|
|
312
|
+
* nonpayable
|
|
313
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
314
|
+
*/
|
|
315
|
+
async reveal(options) {
|
|
316
|
+
if (!this.contract.write) {
|
|
317
|
+
throw new Error('Wallet client is required for write operations');
|
|
318
|
+
}
|
|
319
|
+
return this.contract.write.reveal(options);
|
|
320
|
+
}
|
|
94
321
|
/**
|
|
95
322
|
* authenticate
|
|
96
323
|
* nonpayable
|
|
@@ -116,6 +343,30 @@ class TeikhosBounty_json {
|
|
|
116
343
|
throw new Error('Public client is required for simulation');
|
|
117
344
|
}
|
|
118
345
|
return {
|
|
346
|
+
/**
|
|
347
|
+
* Simulate reward
|
|
348
|
+
* Returns gas estimate and result without sending transaction
|
|
349
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
350
|
+
*/
|
|
351
|
+
async reward(options) {
|
|
352
|
+
return contract.simulate.reward(options);
|
|
353
|
+
},
|
|
354
|
+
/**
|
|
355
|
+
* Simulate commit
|
|
356
|
+
* Returns gas estimate and result without sending transaction
|
|
357
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
358
|
+
*/
|
|
359
|
+
async commit(_signature, options) {
|
|
360
|
+
return contract.simulate.commit([_signature], options);
|
|
361
|
+
},
|
|
362
|
+
/**
|
|
363
|
+
* Simulate reveal
|
|
364
|
+
* Returns gas estimate and result without sending transaction
|
|
365
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
366
|
+
*/
|
|
367
|
+
async reveal(options) {
|
|
368
|
+
return contract.simulate.reveal(options);
|
|
369
|
+
},
|
|
119
370
|
/**
|
|
120
371
|
* Simulate authenticate
|
|
121
372
|
* Returns gas estimate and result without sending transaction
|
|
@@ -7,22 +7,168 @@ import { getContract } from 'viem';
|
|
|
7
7
|
* This ABI is typed using viem's type system for full type safety.
|
|
8
8
|
*/
|
|
9
9
|
export const TeikhosBounty_jsonAbi = [
|
|
10
|
+
{
|
|
11
|
+
"constant": true,
|
|
12
|
+
"inputs": [],
|
|
13
|
+
"name": "proof_of_public_key1",
|
|
14
|
+
"outputs": [
|
|
15
|
+
{
|
|
16
|
+
"name": "",
|
|
17
|
+
"type": "bytes32"
|
|
18
|
+
}
|
|
19
|
+
],
|
|
20
|
+
"payable": false,
|
|
21
|
+
"stateMutability": "view",
|
|
22
|
+
"type": "function"
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
"constant": false,
|
|
26
|
+
"inputs": [],
|
|
27
|
+
"name": "reward",
|
|
28
|
+
"outputs": [],
|
|
29
|
+
"payable": false,
|
|
30
|
+
"stateMutability": "nonpayable",
|
|
31
|
+
"type": "function"
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
"constant": true,
|
|
35
|
+
"inputs": [],
|
|
36
|
+
"name": "isSolved",
|
|
37
|
+
"outputs": [
|
|
38
|
+
{
|
|
39
|
+
"name": "timestamp",
|
|
40
|
+
"type": "uint256"
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
"name": "publicKey",
|
|
44
|
+
"type": "bytes"
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
"name": "msgHash",
|
|
48
|
+
"type": "bytes32"
|
|
49
|
+
}
|
|
50
|
+
],
|
|
51
|
+
"payable": false,
|
|
52
|
+
"stateMutability": "view",
|
|
53
|
+
"type": "function"
|
|
54
|
+
},
|
|
10
55
|
{
|
|
11
56
|
"constant": false,
|
|
12
57
|
"inputs": [
|
|
13
58
|
{
|
|
14
|
-
"name": "
|
|
59
|
+
"name": "_signature",
|
|
15
60
|
"type": "bytes"
|
|
16
61
|
}
|
|
17
62
|
],
|
|
18
|
-
"name": "
|
|
63
|
+
"name": "commit",
|
|
64
|
+
"outputs": [],
|
|
65
|
+
"payable": false,
|
|
66
|
+
"stateMutability": "nonpayable",
|
|
67
|
+
"type": "function"
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
"constant": true,
|
|
71
|
+
"inputs": [],
|
|
72
|
+
"name": "sha3_512",
|
|
19
73
|
"outputs": [
|
|
20
74
|
{
|
|
21
75
|
"name": "",
|
|
22
|
-
"type": "
|
|
76
|
+
"type": "address"
|
|
23
77
|
}
|
|
24
78
|
],
|
|
25
79
|
"payable": false,
|
|
80
|
+
"stateMutability": "view",
|
|
81
|
+
"type": "function"
|
|
82
|
+
},
|
|
83
|
+
{
|
|
84
|
+
"constant": false,
|
|
85
|
+
"inputs": [],
|
|
86
|
+
"name": "reveal",
|
|
87
|
+
"outputs": [],
|
|
88
|
+
"payable": false,
|
|
89
|
+
"stateMutability": "nonpayable",
|
|
90
|
+
"type": "function"
|
|
91
|
+
},
|
|
92
|
+
{
|
|
93
|
+
"constant": true,
|
|
94
|
+
"inputs": [
|
|
95
|
+
{
|
|
96
|
+
"name": "",
|
|
97
|
+
"type": "address"
|
|
98
|
+
}
|
|
99
|
+
],
|
|
100
|
+
"name": "commitment",
|
|
101
|
+
"outputs": [
|
|
102
|
+
{
|
|
103
|
+
"name": "timestamp",
|
|
104
|
+
"type": "uint256"
|
|
105
|
+
},
|
|
106
|
+
{
|
|
107
|
+
"name": "signature",
|
|
108
|
+
"type": "bytes"
|
|
109
|
+
}
|
|
110
|
+
],
|
|
111
|
+
"payable": false,
|
|
112
|
+
"stateMutability": "view",
|
|
113
|
+
"type": "function"
|
|
114
|
+
},
|
|
115
|
+
{
|
|
116
|
+
"constant": true,
|
|
117
|
+
"inputs": [],
|
|
118
|
+
"name": "proof_of_public_key2",
|
|
119
|
+
"outputs": [
|
|
120
|
+
{
|
|
121
|
+
"name": "",
|
|
122
|
+
"type": "bytes32"
|
|
123
|
+
}
|
|
124
|
+
],
|
|
125
|
+
"payable": false,
|
|
126
|
+
"stateMutability": "view",
|
|
127
|
+
"type": "function"
|
|
128
|
+
},
|
|
129
|
+
{
|
|
130
|
+
"constant": true,
|
|
131
|
+
"inputs": [],
|
|
132
|
+
"name": "bipedaljoe",
|
|
133
|
+
"outputs": [
|
|
134
|
+
{
|
|
135
|
+
"name": "",
|
|
136
|
+
"type": "address"
|
|
137
|
+
}
|
|
138
|
+
],
|
|
139
|
+
"payable": false,
|
|
140
|
+
"stateMutability": "view",
|
|
141
|
+
"type": "function"
|
|
142
|
+
},
|
|
143
|
+
{
|
|
144
|
+
"constant": true,
|
|
145
|
+
"inputs": [],
|
|
146
|
+
"name": "winner",
|
|
147
|
+
"outputs": [
|
|
148
|
+
{
|
|
149
|
+
"name": "timestamp",
|
|
150
|
+
"type": "uint256"
|
|
151
|
+
},
|
|
152
|
+
{
|
|
153
|
+
"name": "winner",
|
|
154
|
+
"type": "address"
|
|
155
|
+
}
|
|
156
|
+
],
|
|
157
|
+
"payable": false,
|
|
158
|
+
"stateMutability": "view",
|
|
159
|
+
"type": "function"
|
|
160
|
+
},
|
|
161
|
+
{
|
|
162
|
+
"constant": false,
|
|
163
|
+
"inputs": [
|
|
164
|
+
{
|
|
165
|
+
"name": "_publicKey",
|
|
166
|
+
"type": "bytes"
|
|
167
|
+
}
|
|
168
|
+
],
|
|
169
|
+
"name": "authenticate",
|
|
170
|
+
"outputs": [],
|
|
171
|
+
"payable": false,
|
|
26
172
|
"stateMutability": "nonpayable",
|
|
27
173
|
"type": "function"
|
|
28
174
|
},
|
|
@@ -115,7 +261,130 @@ export class TeikhosBounty_json {
|
|
|
115
261
|
return this.contract;
|
|
116
262
|
}
|
|
117
263
|
|
|
118
|
-
|
|
264
|
+
/**
|
|
265
|
+
* proof_of_public_key1
|
|
266
|
+
* view
|
|
267
|
+
*/
|
|
268
|
+
async proof_of_public_key1(): Promise<`0x${string}`> {
|
|
269
|
+
return this.contract.read.proof_of_public_key1() as Promise<`0x${string}`>;
|
|
270
|
+
}
|
|
271
|
+
|
|
272
|
+
/**
|
|
273
|
+
* isSolved
|
|
274
|
+
* view
|
|
275
|
+
*/
|
|
276
|
+
async isSolved(): Promise<[bigint, `0x${string}`, `0x${string}`]> {
|
|
277
|
+
return this.contract.read.isSolved() as Promise<[bigint, `0x${string}`, `0x${string}`]>;
|
|
278
|
+
}
|
|
279
|
+
|
|
280
|
+
/**
|
|
281
|
+
* sha3_512
|
|
282
|
+
* view
|
|
283
|
+
*/
|
|
284
|
+
async sha3_512(): Promise<`0x${string}`> {
|
|
285
|
+
return this.contract.read.sha3_512() as Promise<`0x${string}`>;
|
|
286
|
+
}
|
|
287
|
+
|
|
288
|
+
/**
|
|
289
|
+
* commitment
|
|
290
|
+
* view
|
|
291
|
+
*/
|
|
292
|
+
async commitment(arg0: `0x${string}`): Promise<[bigint, `0x${string}`]> {
|
|
293
|
+
return this.contract.read.commitment([arg0] as const) as Promise<[bigint, `0x${string}`]>;
|
|
294
|
+
}
|
|
295
|
+
|
|
296
|
+
/**
|
|
297
|
+
* proof_of_public_key2
|
|
298
|
+
* view
|
|
299
|
+
*/
|
|
300
|
+
async proof_of_public_key2(): Promise<`0x${string}`> {
|
|
301
|
+
return this.contract.read.proof_of_public_key2() as Promise<`0x${string}`>;
|
|
302
|
+
}
|
|
303
|
+
|
|
304
|
+
/**
|
|
305
|
+
* bipedaljoe
|
|
306
|
+
* view
|
|
307
|
+
*/
|
|
308
|
+
async bipedaljoe(): Promise<`0x${string}`> {
|
|
309
|
+
return this.contract.read.bipedaljoe() as Promise<`0x${string}`>;
|
|
310
|
+
}
|
|
311
|
+
|
|
312
|
+
/**
|
|
313
|
+
* winner
|
|
314
|
+
* view
|
|
315
|
+
*/
|
|
316
|
+
async winner(): Promise<[bigint, `0x${string}`]> {
|
|
317
|
+
return this.contract.read.winner() as Promise<[bigint, `0x${string}`]>;
|
|
318
|
+
}
|
|
319
|
+
|
|
320
|
+
/**
|
|
321
|
+
* reward
|
|
322
|
+
* nonpayable
|
|
323
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
324
|
+
*/
|
|
325
|
+
async reward(options?: {
|
|
326
|
+
accessList?: import('viem').AccessList;
|
|
327
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
328
|
+
chain?: import('viem').Chain | null;
|
|
329
|
+
dataSuffix?: `0x${string}`;
|
|
330
|
+
gas?: bigint;
|
|
331
|
+
gasPrice?: bigint;
|
|
332
|
+
maxFeePerGas?: bigint;
|
|
333
|
+
maxPriorityFeePerGas?: bigint;
|
|
334
|
+
nonce?: number;
|
|
335
|
+
value?: bigint;
|
|
336
|
+
}): Promise<`0x${string}`> {
|
|
337
|
+
if (!this.contract.write) {
|
|
338
|
+
throw new Error('Wallet client is required for write operations');
|
|
339
|
+
}
|
|
340
|
+
return this.contract.write.reward(options) as Promise<`0x${string}`>;
|
|
341
|
+
}
|
|
342
|
+
|
|
343
|
+
/**
|
|
344
|
+
* commit
|
|
345
|
+
* nonpayable
|
|
346
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
347
|
+
*/
|
|
348
|
+
async commit(_signature: `0x${string}`, options?: {
|
|
349
|
+
accessList?: import('viem').AccessList;
|
|
350
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
351
|
+
chain?: import('viem').Chain | null;
|
|
352
|
+
dataSuffix?: `0x${string}`;
|
|
353
|
+
gas?: bigint;
|
|
354
|
+
gasPrice?: bigint;
|
|
355
|
+
maxFeePerGas?: bigint;
|
|
356
|
+
maxPriorityFeePerGas?: bigint;
|
|
357
|
+
nonce?: number;
|
|
358
|
+
value?: bigint;
|
|
359
|
+
}): Promise<`0x${string}`> {
|
|
360
|
+
if (!this.contract.write) {
|
|
361
|
+
throw new Error('Wallet client is required for write operations');
|
|
362
|
+
}
|
|
363
|
+
return this.contract.write.commit([_signature] as const, options) as Promise<`0x${string}`>;
|
|
364
|
+
}
|
|
365
|
+
|
|
366
|
+
/**
|
|
367
|
+
* reveal
|
|
368
|
+
* nonpayable
|
|
369
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
370
|
+
*/
|
|
371
|
+
async reveal(options?: {
|
|
372
|
+
accessList?: import('viem').AccessList;
|
|
373
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
374
|
+
chain?: import('viem').Chain | null;
|
|
375
|
+
dataSuffix?: `0x${string}`;
|
|
376
|
+
gas?: bigint;
|
|
377
|
+
gasPrice?: bigint;
|
|
378
|
+
maxFeePerGas?: bigint;
|
|
379
|
+
maxPriorityFeePerGas?: bigint;
|
|
380
|
+
nonce?: number;
|
|
381
|
+
value?: bigint;
|
|
382
|
+
}): Promise<`0x${string}`> {
|
|
383
|
+
if (!this.contract.write) {
|
|
384
|
+
throw new Error('Wallet client is required for write operations');
|
|
385
|
+
}
|
|
386
|
+
return this.contract.write.reveal(options) as Promise<`0x${string}`>;
|
|
387
|
+
}
|
|
119
388
|
|
|
120
389
|
/**
|
|
121
390
|
* authenticate
|
|
@@ -156,6 +425,63 @@ export class TeikhosBounty_json {
|
|
|
156
425
|
throw new Error('Public client is required for simulation');
|
|
157
426
|
}
|
|
158
427
|
return {
|
|
428
|
+
/**
|
|
429
|
+
* Simulate reward
|
|
430
|
+
* Returns gas estimate and result without sending transaction
|
|
431
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
432
|
+
*/
|
|
433
|
+
async reward(options?: {
|
|
434
|
+
accessList?: import('viem').AccessList;
|
|
435
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
436
|
+
chain?: import('viem').Chain | null;
|
|
437
|
+
dataSuffix?: `0x${string}`;
|
|
438
|
+
gas?: bigint;
|
|
439
|
+
gasPrice?: bigint;
|
|
440
|
+
maxFeePerGas?: bigint;
|
|
441
|
+
maxPriorityFeePerGas?: bigint;
|
|
442
|
+
nonce?: number;
|
|
443
|
+
value?: bigint;
|
|
444
|
+
}): Promise<void> {
|
|
445
|
+
return contract.simulate.reward(options) as Promise<void>;
|
|
446
|
+
},
|
|
447
|
+
/**
|
|
448
|
+
* Simulate commit
|
|
449
|
+
* Returns gas estimate and result without sending transaction
|
|
450
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
451
|
+
*/
|
|
452
|
+
async commit(_signature: `0x${string}`, options?: {
|
|
453
|
+
accessList?: import('viem').AccessList;
|
|
454
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
455
|
+
chain?: import('viem').Chain | null;
|
|
456
|
+
dataSuffix?: `0x${string}`;
|
|
457
|
+
gas?: bigint;
|
|
458
|
+
gasPrice?: bigint;
|
|
459
|
+
maxFeePerGas?: bigint;
|
|
460
|
+
maxPriorityFeePerGas?: bigint;
|
|
461
|
+
nonce?: number;
|
|
462
|
+
value?: bigint;
|
|
463
|
+
}): Promise<void> {
|
|
464
|
+
return contract.simulate.commit([_signature] as const, options) as Promise<void>;
|
|
465
|
+
},
|
|
466
|
+
/**
|
|
467
|
+
* Simulate reveal
|
|
468
|
+
* Returns gas estimate and result without sending transaction
|
|
469
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
470
|
+
*/
|
|
471
|
+
async reveal(options?: {
|
|
472
|
+
accessList?: import('viem').AccessList;
|
|
473
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
474
|
+
chain?: import('viem').Chain | null;
|
|
475
|
+
dataSuffix?: `0x${string}`;
|
|
476
|
+
gas?: bigint;
|
|
477
|
+
gasPrice?: bigint;
|
|
478
|
+
maxFeePerGas?: bigint;
|
|
479
|
+
maxPriorityFeePerGas?: bigint;
|
|
480
|
+
nonce?: number;
|
|
481
|
+
value?: bigint;
|
|
482
|
+
}): Promise<void> {
|
|
483
|
+
return contract.simulate.reveal(options) as Promise<void>;
|
|
484
|
+
},
|
|
159
485
|
/**
|
|
160
486
|
* Simulate authenticate
|
|
161
487
|
* Returns gas estimate and result without sending transaction
|
|
@@ -172,8 +498,8 @@ export class TeikhosBounty_json {
|
|
|
172
498
|
maxPriorityFeePerGas?: bigint;
|
|
173
499
|
nonce?: number;
|
|
174
500
|
value?: bigint;
|
|
175
|
-
}): Promise<
|
|
176
|
-
return contract.simulate.authenticate([_publicKey] as const, options) as Promise<
|
|
501
|
+
}): Promise<void> {
|
|
502
|
+
return contract.simulate.authenticate([_publicKey] as const, options) as Promise<void>;
|
|
177
503
|
}
|
|
178
504
|
};
|
|
179
505
|
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gitmyabi/teikhosbounty",
|
|
3
|
-
"version": "1.0.
|
|
4
|
-
"description": "Auto-generated TypeScript type bindings for TeikhosBounty (build etherscan-teikhosbounty-
|
|
3
|
+
"version": "1.0.3",
|
|
4
|
+
"description": "Auto-generated TypeScript type bindings for TeikhosBounty (build etherscan-teikhosbounty-973c2178-1793587980586, commit 7884fcf, branch etherscan)",
|
|
5
5
|
"main": "./index.js",
|
|
6
6
|
"types": "./index.d.ts",
|
|
7
7
|
"exports": {
|
|
@@ -39,5 +39,5 @@
|
|
|
39
39
|
"url": "https://github.com/etherscan/teikhosbounty"
|
|
40
40
|
},
|
|
41
41
|
"branch": "etherscan",
|
|
42
|
-
"shortHash": "
|
|
42
|
+
"shortHash": "7884fcf"
|
|
43
43
|
}
|