@fangorn-network/sdk 0.1.5 → 0.1.6
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/lib/cli/sell.js +1 -1
- package/lib/config.d.ts +153 -153
- package/lib/contracts/data-registry/abi.d.ts +1 -1
- package/lib/contracts/data-registry/abi.js +1 -1
- package/lib/contracts/settlement-registry/abi.d.ts +1 -1
- package/lib/contracts/settlement-registry/abi.js +1 -1
- package/lib/contracts/write.d.ts +13 -4
- package/lib/contracts/write.js +18 -8
- package/lib/engine/index.d.ts +14 -2
- package/lib/engine/index.js +17 -5
- package/lib/erc8004.js +2 -1
- package/lib/fangorn.d.ts +1 -1
- package/lib/fangorn.js +13 -6
- package/lib/test/mem-registry.d.ts +2 -2
- package/lib/test/testbed.d.ts +5141 -5141
- package/lib/test/testbed.js +1 -1
- package/package.json +1 -1
package/lib/cli/sell.js
CHANGED
|
@@ -33,7 +33,7 @@ async function sealRecords(fangorn, repo, records, o) {
|
|
|
33
33
|
}) };
|
|
34
34
|
const out = [];
|
|
35
35
|
let kRepo;
|
|
36
|
-
const existing = (await fangorn.engine.readRecord(publisher, repo, depositId)
|
|
36
|
+
const existing = (await fangorn.engine.readRecord(publisher, repo, depositId))?.payload;
|
|
37
37
|
if (existing) kRepo = await requestKey({
|
|
38
38
|
deposit: existing,
|
|
39
39
|
key: WHOLE_REPO,
|
package/lib/config.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as viem_chains0 from "viem/chains";
|
|
2
|
-
import * as
|
|
2
|
+
import * as viem5838 from "viem";
|
|
3
3
|
import { Chain, Hex } from "viem";
|
|
4
4
|
|
|
5
5
|
//#region src/config.d.ts
|
|
@@ -99,7 +99,7 @@ declare const BaseSepoliaConfig: {
|
|
|
99
99
|
testnet: true;
|
|
100
100
|
custom?: Record<string, unknown> | undefined;
|
|
101
101
|
extendSchema?: Record<string, unknown> | undefined;
|
|
102
|
-
fees?:
|
|
102
|
+
fees?: viem5838.ChainFees<undefined> | undefined;
|
|
103
103
|
formatters: {
|
|
104
104
|
readonly block: {
|
|
105
105
|
exclude: [] | undefined;
|
|
@@ -108,28 +108,28 @@ declare const BaseSepoliaConfig: {
|
|
|
108
108
|
blobGasUsed: bigint;
|
|
109
109
|
difficulty: bigint;
|
|
110
110
|
excessBlobGas: bigint;
|
|
111
|
-
extraData:
|
|
111
|
+
extraData: viem5838.Hex;
|
|
112
112
|
gasLimit: bigint;
|
|
113
113
|
gasUsed: bigint;
|
|
114
114
|
hash: `0x${string}` | null;
|
|
115
115
|
logsBloom: `0x${string}` | null;
|
|
116
|
-
miner:
|
|
117
|
-
mixHash:
|
|
116
|
+
miner: viem5838.Address;
|
|
117
|
+
mixHash: viem5838.Hash;
|
|
118
118
|
nonce: `0x${string}` | null;
|
|
119
119
|
number: bigint | null;
|
|
120
120
|
parentBeaconBlockRoot?: `0x${string}` | undefined;
|
|
121
|
-
parentHash:
|
|
122
|
-
receiptsRoot:
|
|
123
|
-
sealFields:
|
|
124
|
-
sha3Uncles:
|
|
121
|
+
parentHash: viem5838.Hash;
|
|
122
|
+
receiptsRoot: viem5838.Hex;
|
|
123
|
+
sealFields: viem5838.Hex[];
|
|
124
|
+
sha3Uncles: viem5838.Hash;
|
|
125
125
|
size: bigint;
|
|
126
|
-
stateRoot:
|
|
126
|
+
stateRoot: viem5838.Hash;
|
|
127
127
|
timestamp: bigint;
|
|
128
128
|
totalDifficulty: bigint | null;
|
|
129
129
|
transactions: `0x${string}`[] | viem_chains0.OpStackTransaction<boolean>[];
|
|
130
|
-
transactionsRoot:
|
|
131
|
-
uncles:
|
|
132
|
-
withdrawals?:
|
|
130
|
+
transactionsRoot: viem5838.Hash;
|
|
131
|
+
uncles: viem5838.Hash[];
|
|
132
|
+
withdrawals?: viem5838.Withdrawal[] | undefined | undefined;
|
|
133
133
|
withdrawalsRoot?: `0x${string}` | undefined;
|
|
134
134
|
} & {};
|
|
135
135
|
type: "block";
|
|
@@ -139,16 +139,16 @@ declare const BaseSepoliaConfig: {
|
|
|
139
139
|
format: (args: viem_chains0.OpStackRpcTransaction, action?: string | undefined) => ({
|
|
140
140
|
blockHash: `0x${string}` | null;
|
|
141
141
|
blockNumber: bigint | null;
|
|
142
|
-
from:
|
|
142
|
+
from: viem5838.Address;
|
|
143
143
|
gas: bigint;
|
|
144
|
-
hash:
|
|
145
|
-
input:
|
|
144
|
+
hash: viem5838.Hash;
|
|
145
|
+
input: viem5838.Hex;
|
|
146
146
|
nonce: number;
|
|
147
|
-
r:
|
|
148
|
-
s:
|
|
149
|
-
to:
|
|
147
|
+
r: viem5838.Hex;
|
|
148
|
+
s: viem5838.Hex;
|
|
149
|
+
to: viem5838.Address | null;
|
|
150
150
|
transactionIndex: number | null;
|
|
151
|
-
typeHex:
|
|
151
|
+
typeHex: viem5838.Hex | null;
|
|
152
152
|
v: bigint;
|
|
153
153
|
value: bigint;
|
|
154
154
|
yParity: number;
|
|
@@ -158,23 +158,23 @@ declare const BaseSepoliaConfig: {
|
|
|
158
158
|
maxPriorityFeePerGas: bigint;
|
|
159
159
|
isSystemTx?: boolean;
|
|
160
160
|
mint?: bigint | undefined | undefined;
|
|
161
|
-
sourceHash:
|
|
161
|
+
sourceHash: viem5838.Hex;
|
|
162
162
|
type: "deposit";
|
|
163
163
|
} | {
|
|
164
|
-
r:
|
|
165
|
-
s:
|
|
164
|
+
r: viem5838.Hex;
|
|
165
|
+
s: viem5838.Hex;
|
|
166
166
|
v: bigint;
|
|
167
|
-
to:
|
|
168
|
-
from:
|
|
167
|
+
to: viem5838.Address | null;
|
|
168
|
+
from: viem5838.Address;
|
|
169
169
|
gas: bigint;
|
|
170
170
|
nonce: number;
|
|
171
171
|
value: bigint;
|
|
172
172
|
blockHash: `0x${string}` | null;
|
|
173
173
|
blockNumber: bigint | null;
|
|
174
|
-
hash:
|
|
175
|
-
input:
|
|
174
|
+
hash: viem5838.Hash;
|
|
175
|
+
input: viem5838.Hex;
|
|
176
176
|
transactionIndex: number | null;
|
|
177
|
-
typeHex:
|
|
177
|
+
typeHex: viem5838.Hex | null;
|
|
178
178
|
accessList?: undefined | undefined;
|
|
179
179
|
authorizationList?: undefined | undefined;
|
|
180
180
|
blobVersionedHashes?: undefined | undefined;
|
|
@@ -191,20 +191,20 @@ declare const BaseSepoliaConfig: {
|
|
|
191
191
|
} | {
|
|
192
192
|
blockHash: `0x${string}` | null;
|
|
193
193
|
blockNumber: bigint | null;
|
|
194
|
-
from:
|
|
194
|
+
from: viem5838.Address;
|
|
195
195
|
gas: bigint;
|
|
196
|
-
hash:
|
|
197
|
-
input:
|
|
196
|
+
hash: viem5838.Hash;
|
|
197
|
+
input: viem5838.Hex;
|
|
198
198
|
nonce: number;
|
|
199
|
-
r:
|
|
200
|
-
s:
|
|
201
|
-
to:
|
|
199
|
+
r: viem5838.Hex;
|
|
200
|
+
s: viem5838.Hex;
|
|
201
|
+
to: viem5838.Address | null;
|
|
202
202
|
transactionIndex: number | null;
|
|
203
|
-
typeHex:
|
|
203
|
+
typeHex: viem5838.Hex | null;
|
|
204
204
|
v: bigint;
|
|
205
205
|
value: bigint;
|
|
206
206
|
yParity: number;
|
|
207
|
-
accessList:
|
|
207
|
+
accessList: viem5838.AccessList;
|
|
208
208
|
authorizationList?: undefined | undefined;
|
|
209
209
|
blobVersionedHashes?: undefined | undefined;
|
|
210
210
|
chainId: number;
|
|
@@ -219,20 +219,20 @@ declare const BaseSepoliaConfig: {
|
|
|
219
219
|
} | {
|
|
220
220
|
blockHash: `0x${string}` | null;
|
|
221
221
|
blockNumber: bigint | null;
|
|
222
|
-
from:
|
|
222
|
+
from: viem5838.Address;
|
|
223
223
|
gas: bigint;
|
|
224
|
-
hash:
|
|
225
|
-
input:
|
|
224
|
+
hash: viem5838.Hash;
|
|
225
|
+
input: viem5838.Hex;
|
|
226
226
|
nonce: number;
|
|
227
|
-
r:
|
|
228
|
-
s:
|
|
229
|
-
to:
|
|
227
|
+
r: viem5838.Hex;
|
|
228
|
+
s: viem5838.Hex;
|
|
229
|
+
to: viem5838.Address | null;
|
|
230
230
|
transactionIndex: number | null;
|
|
231
|
-
typeHex:
|
|
231
|
+
typeHex: viem5838.Hex | null;
|
|
232
232
|
v: bigint;
|
|
233
233
|
value: bigint;
|
|
234
234
|
yParity: number;
|
|
235
|
-
accessList:
|
|
235
|
+
accessList: viem5838.AccessList;
|
|
236
236
|
authorizationList?: undefined | undefined;
|
|
237
237
|
blobVersionedHashes?: undefined | undefined;
|
|
238
238
|
chainId: number;
|
|
@@ -247,22 +247,22 @@ declare const BaseSepoliaConfig: {
|
|
|
247
247
|
} | {
|
|
248
248
|
blockHash: `0x${string}` | null;
|
|
249
249
|
blockNumber: bigint | null;
|
|
250
|
-
from:
|
|
250
|
+
from: viem5838.Address;
|
|
251
251
|
gas: bigint;
|
|
252
|
-
hash:
|
|
253
|
-
input:
|
|
252
|
+
hash: viem5838.Hash;
|
|
253
|
+
input: viem5838.Hex;
|
|
254
254
|
nonce: number;
|
|
255
|
-
r:
|
|
256
|
-
s:
|
|
257
|
-
to:
|
|
255
|
+
r: viem5838.Hex;
|
|
256
|
+
s: viem5838.Hex;
|
|
257
|
+
to: viem5838.Address | null;
|
|
258
258
|
transactionIndex: number | null;
|
|
259
|
-
typeHex:
|
|
259
|
+
typeHex: viem5838.Hex | null;
|
|
260
260
|
v: bigint;
|
|
261
261
|
value: bigint;
|
|
262
262
|
yParity: number;
|
|
263
|
-
accessList:
|
|
263
|
+
accessList: viem5838.AccessList;
|
|
264
264
|
authorizationList?: undefined | undefined;
|
|
265
|
-
blobVersionedHashes: readonly
|
|
265
|
+
blobVersionedHashes: readonly viem5838.Hex[];
|
|
266
266
|
chainId: number;
|
|
267
267
|
type: "eip4844";
|
|
268
268
|
gasPrice?: undefined | undefined;
|
|
@@ -275,21 +275,21 @@ declare const BaseSepoliaConfig: {
|
|
|
275
275
|
} | {
|
|
276
276
|
blockHash: `0x${string}` | null;
|
|
277
277
|
blockNumber: bigint | null;
|
|
278
|
-
from:
|
|
278
|
+
from: viem5838.Address;
|
|
279
279
|
gas: bigint;
|
|
280
|
-
hash:
|
|
281
|
-
input:
|
|
280
|
+
hash: viem5838.Hash;
|
|
281
|
+
input: viem5838.Hex;
|
|
282
282
|
nonce: number;
|
|
283
|
-
r:
|
|
284
|
-
s:
|
|
285
|
-
to:
|
|
283
|
+
r: viem5838.Hex;
|
|
284
|
+
s: viem5838.Hex;
|
|
285
|
+
to: viem5838.Address | null;
|
|
286
286
|
transactionIndex: number | null;
|
|
287
|
-
typeHex:
|
|
287
|
+
typeHex: viem5838.Hex | null;
|
|
288
288
|
v: bigint;
|
|
289
289
|
value: bigint;
|
|
290
290
|
yParity: number;
|
|
291
|
-
accessList:
|
|
292
|
-
authorizationList:
|
|
291
|
+
accessList: viem5838.AccessList;
|
|
292
|
+
authorizationList: viem5838.SignedAuthorizationList;
|
|
293
293
|
blobVersionedHashes?: undefined | undefined;
|
|
294
294
|
chainId: number;
|
|
295
295
|
type: "eip7702";
|
|
@@ -308,22 +308,22 @@ declare const BaseSepoliaConfig: {
|
|
|
308
308
|
format: (args: viem_chains0.OpStackRpcTransactionReceipt, action?: string | undefined) => {
|
|
309
309
|
blobGasPrice?: bigint | undefined;
|
|
310
310
|
blobGasUsed?: bigint | undefined;
|
|
311
|
-
blockHash:
|
|
311
|
+
blockHash: viem5838.Hash;
|
|
312
312
|
blockNumber: bigint;
|
|
313
313
|
blockTimestamp?: bigint | undefined;
|
|
314
|
-
contractAddress:
|
|
314
|
+
contractAddress: viem5838.Address | null | undefined;
|
|
315
315
|
cumulativeGasUsed: bigint;
|
|
316
316
|
effectiveGasPrice: bigint;
|
|
317
|
-
from:
|
|
317
|
+
from: viem5838.Address;
|
|
318
318
|
gasUsed: bigint;
|
|
319
|
-
logs:
|
|
320
|
-
logsBloom:
|
|
319
|
+
logs: viem5838.Log<bigint, number, false>[];
|
|
320
|
+
logsBloom: viem5838.Hex;
|
|
321
321
|
root?: `0x${string}` | undefined;
|
|
322
322
|
status: "success" | "reverted";
|
|
323
|
-
to:
|
|
324
|
-
transactionHash:
|
|
323
|
+
to: viem5838.Address | null;
|
|
324
|
+
transactionHash: viem5838.Hash;
|
|
325
325
|
transactionIndex: number;
|
|
326
|
-
type:
|
|
326
|
+
type: viem5838.TransactionType;
|
|
327
327
|
l1GasPrice: bigint | null;
|
|
328
328
|
l1GasUsed: bigint | null;
|
|
329
329
|
l1Fee: bigint | null;
|
|
@@ -332,17 +332,17 @@ declare const BaseSepoliaConfig: {
|
|
|
332
332
|
type: "transactionReceipt";
|
|
333
333
|
};
|
|
334
334
|
};
|
|
335
|
-
prepareTransactionRequest?: ((args:
|
|
335
|
+
prepareTransactionRequest?: ((args: viem5838.PrepareTransactionRequestParameters, options: {
|
|
336
336
|
phase: "beforeFillTransaction" | "beforeFillParameters" | "afterFillParameters";
|
|
337
|
-
}) => Promise<
|
|
337
|
+
}) => Promise<viem5838.PrepareTransactionRequestParameters>) | [fn: ((args: viem5838.PrepareTransactionRequestParameters, options: {
|
|
338
338
|
phase: "beforeFillTransaction" | "beforeFillParameters" | "afterFillParameters";
|
|
339
|
-
}) => Promise<
|
|
339
|
+
}) => Promise<viem5838.PrepareTransactionRequestParameters>) | undefined, options: {
|
|
340
340
|
runAt: readonly ("beforeFillTransaction" | "beforeFillParameters" | "afterFillParameters")[];
|
|
341
341
|
}] | undefined;
|
|
342
342
|
serializers: {
|
|
343
343
|
readonly transaction: typeof viem_chains0.serializeTransactionOpStack;
|
|
344
344
|
};
|
|
345
|
-
verifyHash?: ((client:
|
|
345
|
+
verifyHash?: ((client: viem5838.Client, parameters: viem5838.VerifyHashActionParameters) => Promise<viem5838.VerifyHashActionReturnType>) | undefined;
|
|
346
346
|
readonly network: "base-sepolia";
|
|
347
347
|
};
|
|
348
348
|
rpcUrl: string;
|
|
@@ -389,17 +389,17 @@ declare const ArbitrumSepoliaConfig: {
|
|
|
389
389
|
testnet: true;
|
|
390
390
|
custom?: Record<string, unknown> | undefined;
|
|
391
391
|
extendSchema?: Record<string, unknown> | undefined;
|
|
392
|
-
fees?:
|
|
392
|
+
fees?: viem5838.ChainFees<undefined> | undefined;
|
|
393
393
|
formatters?: undefined;
|
|
394
|
-
prepareTransactionRequest?: ((args:
|
|
394
|
+
prepareTransactionRequest?: ((args: viem5838.PrepareTransactionRequestParameters, options: {
|
|
395
395
|
phase: "beforeFillTransaction" | "beforeFillParameters" | "afterFillParameters";
|
|
396
|
-
}) => Promise<
|
|
396
|
+
}) => Promise<viem5838.PrepareTransactionRequestParameters>) | [fn: ((args: viem5838.PrepareTransactionRequestParameters, options: {
|
|
397
397
|
phase: "beforeFillTransaction" | "beforeFillParameters" | "afterFillParameters";
|
|
398
|
-
}) => Promise<
|
|
398
|
+
}) => Promise<viem5838.PrepareTransactionRequestParameters>) | undefined, options: {
|
|
399
399
|
runAt: readonly ("beforeFillTransaction" | "beforeFillParameters" | "afterFillParameters")[];
|
|
400
400
|
}] | undefined;
|
|
401
|
-
serializers?:
|
|
402
|
-
verifyHash?: ((client:
|
|
401
|
+
serializers?: viem5838.ChainSerializers<undefined, viem5838.TransactionSerializable> | undefined;
|
|
402
|
+
verifyHash?: ((client: viem5838.Client, parameters: viem5838.VerifyHashActionParameters) => Promise<viem5838.VerifyHashActionReturnType>) | undefined;
|
|
403
403
|
};
|
|
404
404
|
rpcUrl: string;
|
|
405
405
|
caip2: number;
|
|
@@ -489,7 +489,7 @@ declare const FangornConfig: {
|
|
|
489
489
|
testnet: true;
|
|
490
490
|
custom?: Record<string, unknown> | undefined;
|
|
491
491
|
extendSchema?: Record<string, unknown> | undefined;
|
|
492
|
-
fees?:
|
|
492
|
+
fees?: viem5838.ChainFees<undefined> | undefined;
|
|
493
493
|
formatters: {
|
|
494
494
|
readonly block: {
|
|
495
495
|
exclude: [] | undefined;
|
|
@@ -498,28 +498,28 @@ declare const FangornConfig: {
|
|
|
498
498
|
blobGasUsed: bigint;
|
|
499
499
|
difficulty: bigint;
|
|
500
500
|
excessBlobGas: bigint;
|
|
501
|
-
extraData:
|
|
501
|
+
extraData: viem5838.Hex;
|
|
502
502
|
gasLimit: bigint;
|
|
503
503
|
gasUsed: bigint;
|
|
504
504
|
hash: `0x${string}` | null;
|
|
505
505
|
logsBloom: `0x${string}` | null;
|
|
506
|
-
miner:
|
|
507
|
-
mixHash:
|
|
506
|
+
miner: viem5838.Address;
|
|
507
|
+
mixHash: viem5838.Hash;
|
|
508
508
|
nonce: `0x${string}` | null;
|
|
509
509
|
number: bigint | null;
|
|
510
510
|
parentBeaconBlockRoot?: `0x${string}` | undefined;
|
|
511
|
-
parentHash:
|
|
512
|
-
receiptsRoot:
|
|
513
|
-
sealFields:
|
|
514
|
-
sha3Uncles:
|
|
511
|
+
parentHash: viem5838.Hash;
|
|
512
|
+
receiptsRoot: viem5838.Hex;
|
|
513
|
+
sealFields: viem5838.Hex[];
|
|
514
|
+
sha3Uncles: viem5838.Hash;
|
|
515
515
|
size: bigint;
|
|
516
|
-
stateRoot:
|
|
516
|
+
stateRoot: viem5838.Hash;
|
|
517
517
|
timestamp: bigint;
|
|
518
518
|
totalDifficulty: bigint | null;
|
|
519
519
|
transactions: `0x${string}`[] | viem_chains0.OpStackTransaction<boolean>[];
|
|
520
|
-
transactionsRoot:
|
|
521
|
-
uncles:
|
|
522
|
-
withdrawals?:
|
|
520
|
+
transactionsRoot: viem5838.Hash;
|
|
521
|
+
uncles: viem5838.Hash[];
|
|
522
|
+
withdrawals?: viem5838.Withdrawal[] | undefined | undefined;
|
|
523
523
|
withdrawalsRoot?: `0x${string}` | undefined;
|
|
524
524
|
} & {};
|
|
525
525
|
type: "block";
|
|
@@ -529,16 +529,16 @@ declare const FangornConfig: {
|
|
|
529
529
|
format: (args: viem_chains0.OpStackRpcTransaction, action?: string | undefined) => ({
|
|
530
530
|
blockHash: `0x${string}` | null;
|
|
531
531
|
blockNumber: bigint | null;
|
|
532
|
-
from:
|
|
532
|
+
from: viem5838.Address;
|
|
533
533
|
gas: bigint;
|
|
534
|
-
hash:
|
|
535
|
-
input:
|
|
534
|
+
hash: viem5838.Hash;
|
|
535
|
+
input: viem5838.Hex;
|
|
536
536
|
nonce: number;
|
|
537
|
-
r:
|
|
538
|
-
s:
|
|
539
|
-
to:
|
|
537
|
+
r: viem5838.Hex;
|
|
538
|
+
s: viem5838.Hex;
|
|
539
|
+
to: viem5838.Address | null;
|
|
540
540
|
transactionIndex: number | null;
|
|
541
|
-
typeHex:
|
|
541
|
+
typeHex: viem5838.Hex | null;
|
|
542
542
|
v: bigint;
|
|
543
543
|
value: bigint;
|
|
544
544
|
yParity: number;
|
|
@@ -548,23 +548,23 @@ declare const FangornConfig: {
|
|
|
548
548
|
maxPriorityFeePerGas: bigint;
|
|
549
549
|
isSystemTx?: boolean;
|
|
550
550
|
mint?: bigint | undefined | undefined;
|
|
551
|
-
sourceHash:
|
|
551
|
+
sourceHash: viem5838.Hex;
|
|
552
552
|
type: "deposit";
|
|
553
553
|
} | {
|
|
554
|
-
r:
|
|
555
|
-
s:
|
|
554
|
+
r: viem5838.Hex;
|
|
555
|
+
s: viem5838.Hex;
|
|
556
556
|
v: bigint;
|
|
557
|
-
to:
|
|
558
|
-
from:
|
|
557
|
+
to: viem5838.Address | null;
|
|
558
|
+
from: viem5838.Address;
|
|
559
559
|
gas: bigint;
|
|
560
560
|
nonce: number;
|
|
561
561
|
value: bigint;
|
|
562
562
|
blockHash: `0x${string}` | null;
|
|
563
563
|
blockNumber: bigint | null;
|
|
564
|
-
hash:
|
|
565
|
-
input:
|
|
564
|
+
hash: viem5838.Hash;
|
|
565
|
+
input: viem5838.Hex;
|
|
566
566
|
transactionIndex: number | null;
|
|
567
|
-
typeHex:
|
|
567
|
+
typeHex: viem5838.Hex | null;
|
|
568
568
|
accessList?: undefined | undefined;
|
|
569
569
|
authorizationList?: undefined | undefined;
|
|
570
570
|
blobVersionedHashes?: undefined | undefined;
|
|
@@ -581,20 +581,20 @@ declare const FangornConfig: {
|
|
|
581
581
|
} | {
|
|
582
582
|
blockHash: `0x${string}` | null;
|
|
583
583
|
blockNumber: bigint | null;
|
|
584
|
-
from:
|
|
584
|
+
from: viem5838.Address;
|
|
585
585
|
gas: bigint;
|
|
586
|
-
hash:
|
|
587
|
-
input:
|
|
586
|
+
hash: viem5838.Hash;
|
|
587
|
+
input: viem5838.Hex;
|
|
588
588
|
nonce: number;
|
|
589
|
-
r:
|
|
590
|
-
s:
|
|
591
|
-
to:
|
|
589
|
+
r: viem5838.Hex;
|
|
590
|
+
s: viem5838.Hex;
|
|
591
|
+
to: viem5838.Address | null;
|
|
592
592
|
transactionIndex: number | null;
|
|
593
|
-
typeHex:
|
|
593
|
+
typeHex: viem5838.Hex | null;
|
|
594
594
|
v: bigint;
|
|
595
595
|
value: bigint;
|
|
596
596
|
yParity: number;
|
|
597
|
-
accessList:
|
|
597
|
+
accessList: viem5838.AccessList;
|
|
598
598
|
authorizationList?: undefined | undefined;
|
|
599
599
|
blobVersionedHashes?: undefined | undefined;
|
|
600
600
|
chainId: number;
|
|
@@ -609,20 +609,20 @@ declare const FangornConfig: {
|
|
|
609
609
|
} | {
|
|
610
610
|
blockHash: `0x${string}` | null;
|
|
611
611
|
blockNumber: bigint | null;
|
|
612
|
-
from:
|
|
612
|
+
from: viem5838.Address;
|
|
613
613
|
gas: bigint;
|
|
614
|
-
hash:
|
|
615
|
-
input:
|
|
614
|
+
hash: viem5838.Hash;
|
|
615
|
+
input: viem5838.Hex;
|
|
616
616
|
nonce: number;
|
|
617
|
-
r:
|
|
618
|
-
s:
|
|
619
|
-
to:
|
|
617
|
+
r: viem5838.Hex;
|
|
618
|
+
s: viem5838.Hex;
|
|
619
|
+
to: viem5838.Address | null;
|
|
620
620
|
transactionIndex: number | null;
|
|
621
|
-
typeHex:
|
|
621
|
+
typeHex: viem5838.Hex | null;
|
|
622
622
|
v: bigint;
|
|
623
623
|
value: bigint;
|
|
624
624
|
yParity: number;
|
|
625
|
-
accessList:
|
|
625
|
+
accessList: viem5838.AccessList;
|
|
626
626
|
authorizationList?: undefined | undefined;
|
|
627
627
|
blobVersionedHashes?: undefined | undefined;
|
|
628
628
|
chainId: number;
|
|
@@ -637,22 +637,22 @@ declare const FangornConfig: {
|
|
|
637
637
|
} | {
|
|
638
638
|
blockHash: `0x${string}` | null;
|
|
639
639
|
blockNumber: bigint | null;
|
|
640
|
-
from:
|
|
640
|
+
from: viem5838.Address;
|
|
641
641
|
gas: bigint;
|
|
642
|
-
hash:
|
|
643
|
-
input:
|
|
642
|
+
hash: viem5838.Hash;
|
|
643
|
+
input: viem5838.Hex;
|
|
644
644
|
nonce: number;
|
|
645
|
-
r:
|
|
646
|
-
s:
|
|
647
|
-
to:
|
|
645
|
+
r: viem5838.Hex;
|
|
646
|
+
s: viem5838.Hex;
|
|
647
|
+
to: viem5838.Address | null;
|
|
648
648
|
transactionIndex: number | null;
|
|
649
|
-
typeHex:
|
|
649
|
+
typeHex: viem5838.Hex | null;
|
|
650
650
|
v: bigint;
|
|
651
651
|
value: bigint;
|
|
652
652
|
yParity: number;
|
|
653
|
-
accessList:
|
|
653
|
+
accessList: viem5838.AccessList;
|
|
654
654
|
authorizationList?: undefined | undefined;
|
|
655
|
-
blobVersionedHashes: readonly
|
|
655
|
+
blobVersionedHashes: readonly viem5838.Hex[];
|
|
656
656
|
chainId: number;
|
|
657
657
|
type: "eip4844";
|
|
658
658
|
gasPrice?: undefined | undefined;
|
|
@@ -665,21 +665,21 @@ declare const FangornConfig: {
|
|
|
665
665
|
} | {
|
|
666
666
|
blockHash: `0x${string}` | null;
|
|
667
667
|
blockNumber: bigint | null;
|
|
668
|
-
from:
|
|
668
|
+
from: viem5838.Address;
|
|
669
669
|
gas: bigint;
|
|
670
|
-
hash:
|
|
671
|
-
input:
|
|
670
|
+
hash: viem5838.Hash;
|
|
671
|
+
input: viem5838.Hex;
|
|
672
672
|
nonce: number;
|
|
673
|
-
r:
|
|
674
|
-
s:
|
|
675
|
-
to:
|
|
673
|
+
r: viem5838.Hex;
|
|
674
|
+
s: viem5838.Hex;
|
|
675
|
+
to: viem5838.Address | null;
|
|
676
676
|
transactionIndex: number | null;
|
|
677
|
-
typeHex:
|
|
677
|
+
typeHex: viem5838.Hex | null;
|
|
678
678
|
v: bigint;
|
|
679
679
|
value: bigint;
|
|
680
680
|
yParity: number;
|
|
681
|
-
accessList:
|
|
682
|
-
authorizationList:
|
|
681
|
+
accessList: viem5838.AccessList;
|
|
682
|
+
authorizationList: viem5838.SignedAuthorizationList;
|
|
683
683
|
blobVersionedHashes?: undefined | undefined;
|
|
684
684
|
chainId: number;
|
|
685
685
|
type: "eip7702";
|
|
@@ -698,22 +698,22 @@ declare const FangornConfig: {
|
|
|
698
698
|
format: (args: viem_chains0.OpStackRpcTransactionReceipt, action?: string | undefined) => {
|
|
699
699
|
blobGasPrice?: bigint | undefined;
|
|
700
700
|
blobGasUsed?: bigint | undefined;
|
|
701
|
-
blockHash:
|
|
701
|
+
blockHash: viem5838.Hash;
|
|
702
702
|
blockNumber: bigint;
|
|
703
703
|
blockTimestamp?: bigint | undefined;
|
|
704
|
-
contractAddress:
|
|
704
|
+
contractAddress: viem5838.Address | null | undefined;
|
|
705
705
|
cumulativeGasUsed: bigint;
|
|
706
706
|
effectiveGasPrice: bigint;
|
|
707
|
-
from:
|
|
707
|
+
from: viem5838.Address;
|
|
708
708
|
gasUsed: bigint;
|
|
709
|
-
logs:
|
|
710
|
-
logsBloom:
|
|
709
|
+
logs: viem5838.Log<bigint, number, false>[];
|
|
710
|
+
logsBloom: viem5838.Hex;
|
|
711
711
|
root?: `0x${string}` | undefined;
|
|
712
712
|
status: "success" | "reverted";
|
|
713
|
-
to:
|
|
714
|
-
transactionHash:
|
|
713
|
+
to: viem5838.Address | null;
|
|
714
|
+
transactionHash: viem5838.Hash;
|
|
715
715
|
transactionIndex: number;
|
|
716
|
-
type:
|
|
716
|
+
type: viem5838.TransactionType;
|
|
717
717
|
l1GasPrice: bigint | null;
|
|
718
718
|
l1GasUsed: bigint | null;
|
|
719
719
|
l1Fee: bigint | null;
|
|
@@ -722,17 +722,17 @@ declare const FangornConfig: {
|
|
|
722
722
|
type: "transactionReceipt";
|
|
723
723
|
};
|
|
724
724
|
};
|
|
725
|
-
prepareTransactionRequest?: ((args:
|
|
725
|
+
prepareTransactionRequest?: ((args: viem5838.PrepareTransactionRequestParameters, options: {
|
|
726
726
|
phase: "beforeFillTransaction" | "beforeFillParameters" | "afterFillParameters";
|
|
727
|
-
}) => Promise<
|
|
727
|
+
}) => Promise<viem5838.PrepareTransactionRequestParameters>) | [fn: ((args: viem5838.PrepareTransactionRequestParameters, options: {
|
|
728
728
|
phase: "beforeFillTransaction" | "beforeFillParameters" | "afterFillParameters";
|
|
729
|
-
}) => Promise<
|
|
729
|
+
}) => Promise<viem5838.PrepareTransactionRequestParameters>) | undefined, options: {
|
|
730
730
|
runAt: readonly ("beforeFillTransaction" | "beforeFillParameters" | "afterFillParameters")[];
|
|
731
731
|
}] | undefined;
|
|
732
732
|
serializers: {
|
|
733
733
|
readonly transaction: typeof viem_chains0.serializeTransactionOpStack;
|
|
734
734
|
};
|
|
735
|
-
verifyHash?: ((client:
|
|
735
|
+
verifyHash?: ((client: viem5838.Client, parameters: viem5838.VerifyHashActionParameters) => Promise<viem5838.VerifyHashActionReturnType>) | undefined;
|
|
736
736
|
readonly network: "base-sepolia";
|
|
737
737
|
};
|
|
738
738
|
rpcUrl: string;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
//#region src/contracts/data-registry/abi.d.ts
|
|
2
2
|
/**
|
|
3
3
|
* Generated from `forge inspect DataRegistry abi` in fangorn-network/contracts
|
|
4
|
-
* (
|
|
4
|
+
* (src/DataRegistry.sol). Regenerate with scripts/gen-abis.sh, do not edit.
|
|
5
5
|
*/
|
|
6
6
|
declare const DATA_REGISTRY_ABI: readonly [{
|
|
7
7
|
readonly type: "constructor";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
//#region src/contracts/data-registry/abi.ts
|
|
2
2
|
/**
|
|
3
3
|
* Generated from `forge inspect DataRegistry abi` in fangorn-network/contracts
|
|
4
|
-
* (
|
|
4
|
+
* (src/DataRegistry.sol). Regenerate with scripts/gen-abis.sh, do not edit.
|
|
5
5
|
*/
|
|
6
6
|
const DATA_REGISTRY_ABI = [
|
|
7
7
|
{
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
//#region src/contracts/settlement-registry/abi.d.ts
|
|
2
2
|
/**
|
|
3
3
|
* Generated from `forge inspect SettlementRegistry abi` in fangorn-network/contracts
|
|
4
|
-
* (
|
|
4
|
+
* (src/SettlementRegistry.sol). Regenerate with scripts/gen-abis.sh, do not edit.
|
|
5
5
|
*/
|
|
6
6
|
declare const SETTLEMENT_REGISTRY_ABI: readonly [{
|
|
7
7
|
readonly type: "constructor";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
//#region src/contracts/settlement-registry/abi.ts
|
|
2
2
|
/**
|
|
3
3
|
* Generated from `forge inspect SettlementRegistry abi` in fangorn-network/contracts
|
|
4
|
-
* (
|
|
4
|
+
* (src/SettlementRegistry.sol). Regenerate with scripts/gen-abis.sh, do not edit.
|
|
5
5
|
*/
|
|
6
6
|
const SETTLEMENT_REGISTRY_ABI = [
|
|
7
7
|
{
|
package/lib/contracts/write.d.ts
CHANGED
|
@@ -25,13 +25,22 @@ interface PreparedTx {
|
|
|
25
25
|
* Two deliberate choices, both about transactions that would otherwise silently
|
|
26
26
|
* fail on a live L2:
|
|
27
27
|
*
|
|
28
|
-
* - **30% gas headroom.** The estimate is taken against the
|
|
29
|
-
* time the transaction lands the state has moved.
|
|
30
|
-
*
|
|
28
|
+
* - **30% + APPEND_ALLOWANCE gas headroom.** The estimate is taken against the
|
|
29
|
+
* current state; by the time the transaction lands the state has moved. The
|
|
30
|
+
* fixed allowance covers the one jump the 30% can't: other updates landing
|
|
31
|
+
* first, so this one appends to the log at a length of 2^k − 1. Unused gas is
|
|
32
|
+
* refunded, so the headroom is free and running out of it is not.
|
|
31
33
|
* - **3x maxFeePerGas.** This is a ceiling, not a payment — you pay
|
|
32
34
|
* base + priority. Quoting it tightly is how a transaction gets stuck when the
|
|
33
35
|
* base fee ticks up between estimate and inclusion.
|
|
34
36
|
*/
|
|
37
|
+
/**
|
|
38
|
+
* The most DataRegistry._append can cost over an append estimated at any other
|
|
39
|
+
* log length: 63 merges (cold SLOAD + keccak, ~2.5k each) and a first write to
|
|
40
|
+
* peaks[63] (~20k). logLength is a uint64, so this is a hard bound, not a guess.
|
|
41
|
+
* The contracts repo pins it: test_append_worst_case_fits_sdk_allowance.
|
|
42
|
+
*/
|
|
43
|
+
declare const APPEND_ALLOWANCE = 200000n;
|
|
35
44
|
declare function sendWrite(publicClient: PublicClient, walletClient: WalletClient, address: Address, abi: Abi, functionName: string, args: readonly unknown[], value?: bigint): Promise<Hash>;
|
|
36
45
|
/** Guard for clients that accept a read-only construction. */
|
|
37
46
|
declare function requireWallet(walletClient: WalletClient | undefined, what: string): WalletClient;
|
|
@@ -56,4 +65,4 @@ declare function prepareWrite(publicClient: PublicClient, from: Address, address
|
|
|
56
65
|
simulate?: boolean;
|
|
57
66
|
}): Promise<PreparedTx>;
|
|
58
67
|
//#endregion
|
|
59
|
-
export { PreparedTx, prepareWrite, requireWallet, sendWrite };
|
|
68
|
+
export { APPEND_ALLOWANCE, PreparedTx, prepareWrite, requireWallet, sendWrite };
|