@fuel-ts/account 0.0.0-rc-1976-20240409134753 → 0.0.0-rc-2021-20240409144708
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.
Potentially problematic release.
This version of @fuel-ts/account might be problematic. Click here for more details.
- package/README.md +1 -1
- package/dist/account.d.ts +5 -4
- package/dist/account.d.ts.map +1 -1
- package/dist/configs.d.ts.map +1 -1
- package/dist/configs.global.js +1 -1
- package/dist/configs.global.js.map +1 -1
- package/dist/configs.js +1 -1
- package/dist/configs.js.map +1 -1
- package/dist/configs.mjs +1 -1
- package/dist/configs.mjs.map +1 -1
- package/dist/index.global.js +870 -617
- package/dist/index.global.js.map +1 -1
- package/dist/index.js +850 -611
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +692 -454
- package/dist/index.mjs.map +1 -1
- package/dist/predicate/predicate.d.ts +10 -2
- package/dist/predicate/predicate.d.ts.map +1 -1
- package/dist/providers/__generated__/operations.d.ts +888 -322
- package/dist/providers/__generated__/operations.d.ts.map +1 -1
- package/dist/providers/coin-quantity.d.ts +3 -3
- package/dist/providers/coin-quantity.d.ts.map +1 -1
- package/dist/providers/coin.d.ts +4 -2
- package/dist/providers/coin.d.ts.map +1 -1
- package/dist/providers/fuel-graphql-subscriber.d.ts.map +1 -1
- package/dist/providers/message.d.ts +3 -1
- package/dist/providers/message.d.ts.map +1 -1
- package/dist/providers/provider.d.ts +45 -34
- package/dist/providers/provider.d.ts.map +1 -1
- package/dist/providers/transaction-request/create-transaction-request.d.ts.map +1 -1
- package/dist/providers/transaction-request/input.d.ts +2 -2
- package/dist/providers/transaction-request/input.d.ts.map +1 -1
- package/dist/providers/transaction-request/script-transaction-request.d.ts.map +1 -1
- package/dist/providers/transaction-request/transaction-request.d.ts +9 -29
- package/dist/providers/transaction-request/transaction-request.d.ts.map +1 -1
- package/dist/providers/transaction-request/utils.d.ts +3 -0
- package/dist/providers/transaction-request/utils.d.ts.map +1 -1
- package/dist/providers/transaction-response/transaction-response.d.ts.map +1 -1
- package/dist/providers/transaction-summary/assemble-transaction-summary.d.ts +2 -0
- package/dist/providers/transaction-summary/assemble-transaction-summary.d.ts.map +1 -1
- package/dist/providers/transaction-summary/calculate-transaction-fee.d.ts +3 -2
- package/dist/providers/transaction-summary/calculate-transaction-fee.d.ts.map +1 -1
- package/dist/providers/transaction-summary/get-transaction-summary.d.ts.map +1 -1
- package/dist/providers/utils/gas.d.ts +8 -2
- package/dist/providers/utils/gas.d.ts.map +1 -1
- package/dist/test-utils/launchNode.d.ts.map +1 -1
- package/dist/test-utils.global.js +1585 -1118
- package/dist/test-utils.global.js.map +1 -1
- package/dist/test-utils.js +826 -608
- package/dist/test-utils.js.map +1 -1
- package/dist/test-utils.mjs +684 -466
- package/dist/test-utils.mjs.map +1 -1
- package/dist/wallet/base-wallet-unlocked.d.ts.map +1 -1
- package/package.json +17 -17
@@ -280,7 +280,7 @@
|
|
280
280
|
}
|
281
281
|
return num !== null && typeof num === "object" && num.constructor.wordSize === BN2.wordSize && Array.isArray(num.words);
|
282
282
|
};
|
283
|
-
BN2.max = function
|
283
|
+
BN2.max = function max(left, right) {
|
284
284
|
if (left.cmp(right) > 0)
|
285
285
|
return left;
|
286
286
|
return right;
|
@@ -5104,7 +5104,7 @@
|
|
5104
5104
|
function isBlob(obj) {
|
5105
5105
|
return typeof obj === "object" && typeof obj.arrayBuffer === "function" && typeof obj.type === "string" && typeof obj.stream === "function" && typeof obj.constructor === "function" && typeof obj.constructor.name === "string" && /^(Blob|File)$/.test(obj.constructor.name) && /^(Blob|File)$/.test(obj[Symbol.toStringTag]);
|
5106
5106
|
}
|
5107
|
-
function
|
5107
|
+
function clone3(instance) {
|
5108
5108
|
let p1, p2;
|
5109
5109
|
let body = instance.body;
|
5110
5110
|
if (instance.bodyUsed) {
|
@@ -6038,7 +6038,7 @@
|
|
6038
6038
|
* @return Response
|
6039
6039
|
*/
|
6040
6040
|
clone() {
|
6041
|
-
return new Response2(
|
6041
|
+
return new Response2(clone3(this), {
|
6042
6042
|
url: this.url,
|
6043
6043
|
status: this.status,
|
6044
6044
|
statusText: this.statusText,
|
@@ -6088,7 +6088,7 @@
|
|
6088
6088
|
if ((init.body != null || isRequest(input) && input.body !== null) && (method === "GET" || method === "HEAD")) {
|
6089
6089
|
throw new TypeError("Request with GET/HEAD method cannot have body");
|
6090
6090
|
}
|
6091
|
-
let inputBody = init.body != null ? init.body : isRequest(input) && input.body !== null ?
|
6091
|
+
let inputBody = init.body != null ? init.body : isRequest(input) && input.body !== null ? clone3(input) : null;
|
6092
6092
|
Body.call(this, inputBody, {
|
6093
6093
|
timeout: init.timeout || input.timeout || 0,
|
6094
6094
|
size: init.size || input.size || 0
|
@@ -31914,8 +31914,8 @@ spurious results.`);
|
|
31914
31914
|
// ../versions/dist/index.mjs
|
31915
31915
|
function getBuiltinVersions() {
|
31916
31916
|
return {
|
31917
|
-
FORC: "0.
|
31918
|
-
FUEL_CORE: "0.
|
31917
|
+
FORC: "0.51.1",
|
31918
|
+
FUEL_CORE: "0.24.2",
|
31919
31919
|
FUELS: "0.79.0"
|
31920
31920
|
};
|
31921
31921
|
}
|
@@ -32192,525 +32192,757 @@ This unreleased fuel-core build may include features and updates not yet support
|
|
32192
32192
|
__publicField3(DateTime, "TAI64_NULL", "");
|
32193
32193
|
var chainConfig_default = {
|
32194
32194
|
chain_name: "local_testnet",
|
32195
|
-
|
32196
|
-
|
32197
|
-
|
32198
|
-
|
32199
|
-
|
32200
|
-
|
32201
|
-
|
32202
|
-
|
32203
|
-
|
32204
|
-
|
32205
|
-
|
32206
|
-
|
32207
|
-
|
32208
|
-
|
32209
|
-
|
32210
|
-
|
32211
|
-
|
32212
|
-
|
32213
|
-
|
32214
|
-
|
32215
|
-
|
32216
|
-
|
32217
|
-
|
32218
|
-
|
32219
|
-
|
32220
|
-
|
32221
|
-
|
32222
|
-
|
32223
|
-
|
32224
|
-
|
32225
|
-
|
32226
|
-
|
32227
|
-
|
32228
|
-
|
32229
|
-
|
32230
|
-
|
32231
|
-
|
32232
|
-
|
32233
|
-
{
|
32234
|
-
|
32235
|
-
|
32236
|
-
|
32237
|
-
|
32238
|
-
|
32239
|
-
|
32240
|
-
|
32241
|
-
|
32242
|
-
|
32243
|
-
|
32244
|
-
|
32245
|
-
|
32246
|
-
|
32247
|
-
|
32248
|
-
|
32249
|
-
|
32250
|
-
|
32251
|
-
|
32252
|
-
|
32253
|
-
|
32254
|
-
|
32255
|
-
|
32256
|
-
|
32257
|
-
|
32258
|
-
|
32259
|
-
|
32260
|
-
|
32261
|
-
|
32262
|
-
|
32263
|
-
|
32264
|
-
|
32265
|
-
|
32266
|
-
|
32267
|
-
|
32268
|
-
|
32269
|
-
|
32270
|
-
|
32271
|
-
|
32272
|
-
|
32273
|
-
|
32274
|
-
|
32275
|
-
|
32276
|
-
|
32277
|
-
|
32278
|
-
|
32279
|
-
|
32280
|
-
|
32281
|
-
|
32282
|
-
|
32283
|
-
|
32284
|
-
|
32285
|
-
|
32286
|
-
|
32287
|
-
|
32288
|
-
|
32289
|
-
|
32290
|
-
|
32291
|
-
|
32292
|
-
|
32293
|
-
|
32294
|
-
|
32295
|
-
|
32296
|
-
|
32297
|
-
|
32298
|
-
|
32299
|
-
|
32300
|
-
|
32301
|
-
|
32302
|
-
|
32303
|
-
|
32304
|
-
|
32305
|
-
|
32306
|
-
|
32307
|
-
|
32308
|
-
|
32309
|
-
|
32310
|
-
|
32311
|
-
|
32312
|
-
|
32313
|
-
|
32314
|
-
|
32315
|
-
|
32316
|
-
|
32317
|
-
|
32318
|
-
|
32319
|
-
|
32320
|
-
|
32321
|
-
|
32322
|
-
|
32323
|
-
|
32324
|
-
|
32325
|
-
|
32326
|
-
|
32327
|
-
|
32328
|
-
|
32329
|
-
|
32330
|
-
|
32331
|
-
|
32332
|
-
|
32333
|
-
|
32334
|
-
|
32335
|
-
|
32336
|
-
|
32337
|
-
|
32338
|
-
|
32339
|
-
|
32340
|
-
|
32341
|
-
|
32342
|
-
|
32343
|
-
|
32344
|
-
|
32345
|
-
|
32346
|
-
|
32347
|
-
|
32348
|
-
|
32349
|
-
|
32350
|
-
|
32351
|
-
|
32352
|
-
|
32353
|
-
|
32354
|
-
|
32355
|
-
|
32356
|
-
|
32357
|
-
|
32358
|
-
|
32359
|
-
|
32360
|
-
|
32361
|
-
|
32362
|
-
|
32363
|
-
|
32364
|
-
|
32365
|
-
|
32366
|
-
|
32367
|
-
|
32368
|
-
|
32369
|
-
|
32370
|
-
|
32371
|
-
|
32372
|
-
|
32373
|
-
|
32374
|
-
|
32375
|
-
|
32376
|
-
|
32377
|
-
|
32378
|
-
|
32379
|
-
|
32380
|
-
|
32381
|
-
|
32382
|
-
|
32383
|
-
|
32384
|
-
|
32385
|
-
|
32386
|
-
|
32387
|
-
|
32388
|
-
|
32389
|
-
|
32390
|
-
|
32391
|
-
|
32392
|
-
|
32393
|
-
|
32394
|
-
|
32395
|
-
|
32396
|
-
|
32397
|
-
|
32398
|
-
|
32399
|
-
|
32400
|
-
|
32401
|
-
|
32402
|
-
|
32403
|
-
|
32404
|
-
|
32405
|
-
|
32406
|
-
|
32407
|
-
|
32408
|
-
|
32409
|
-
|
32410
|
-
|
32411
|
-
|
32412
|
-
|
32413
|
-
|
32414
|
-
|
32415
|
-
|
32416
|
-
|
32417
|
-
|
32418
|
-
|
32419
|
-
|
32420
|
-
|
32421
|
-
|
32422
|
-
|
32423
|
-
|
32424
|
-
|
32425
|
-
|
32426
|
-
|
32427
|
-
|
32428
|
-
|
32429
|
-
|
32430
|
-
|
32431
|
-
|
32432
|
-
|
32433
|
-
|
32434
|
-
|
32435
|
-
|
32436
|
-
|
32437
|
-
|
32438
|
-
|
32439
|
-
|
32440
|
-
|
32441
|
-
|
32442
|
-
|
32443
|
-
|
32444
|
-
|
32445
|
-
|
32446
|
-
|
32447
|
-
|
32448
|
-
|
32449
|
-
|
32450
|
-
|
32451
|
-
da_height: "0x00"
|
32195
|
+
consensus_parameters: {
|
32196
|
+
V1: {
|
32197
|
+
tx_params: {
|
32198
|
+
V1: {
|
32199
|
+
max_inputs: 255,
|
32200
|
+
max_outputs: 255,
|
32201
|
+
max_witnesses: 255,
|
32202
|
+
max_gas_per_tx: 3e7,
|
32203
|
+
max_size: 112640
|
32204
|
+
}
|
32205
|
+
},
|
32206
|
+
predicate_params: {
|
32207
|
+
V1: {
|
32208
|
+
max_predicate_length: 102400,
|
32209
|
+
max_predicate_data_length: 102400,
|
32210
|
+
max_message_data_length: 102400,
|
32211
|
+
max_gas_per_predicate: 3e7
|
32212
|
+
}
|
32213
|
+
},
|
32214
|
+
script_params: {
|
32215
|
+
V1: {
|
32216
|
+
max_script_length: 102400,
|
32217
|
+
max_script_data_length: 102400
|
32218
|
+
}
|
32219
|
+
},
|
32220
|
+
contract_params: {
|
32221
|
+
V1: {
|
32222
|
+
contract_max_size: 102400,
|
32223
|
+
max_storage_slots: 1760
|
32224
|
+
}
|
32225
|
+
},
|
32226
|
+
fee_params: {
|
32227
|
+
V1: {
|
32228
|
+
gas_price_factor: 92,
|
32229
|
+
gas_per_byte: 63
|
32230
|
+
}
|
32231
|
+
},
|
32232
|
+
chain_id: 0,
|
32233
|
+
gas_costs: {
|
32234
|
+
V1: {
|
32235
|
+
add: 2,
|
32236
|
+
addi: 2,
|
32237
|
+
aloc: 1,
|
32238
|
+
and: 2,
|
32239
|
+
andi: 2,
|
32240
|
+
bal: 366,
|
32241
|
+
bhei: 2,
|
32242
|
+
bhsh: 2,
|
32243
|
+
burn: 33949,
|
32244
|
+
cb: 2,
|
32245
|
+
cfei: 2,
|
32246
|
+
cfsi: 2,
|
32247
|
+
div: 2,
|
32248
|
+
divi: 2,
|
32249
|
+
eck1: 3347,
|
32250
|
+
ecr1: 46165,
|
32251
|
+
ed19: 4210,
|
32252
|
+
eq: 2,
|
32253
|
+
exp: 2,
|
32254
|
+
expi: 2,
|
32255
|
+
flag: 1,
|
32256
|
+
gm: 2,
|
32257
|
+
gt: 2,
|
32258
|
+
gtf: 16,
|
32259
|
+
ji: 2,
|
32260
|
+
jmp: 2,
|
32261
|
+
jne: 2,
|
32262
|
+
jnei: 2,
|
32263
|
+
jnzi: 2,
|
32264
|
+
jmpf: 2,
|
32265
|
+
jmpb: 2,
|
32266
|
+
jnzf: 2,
|
32267
|
+
jnzb: 2,
|
32268
|
+
jnef: 2,
|
32269
|
+
jneb: 2,
|
32270
|
+
lb: 2,
|
32271
|
+
log: 754,
|
32272
|
+
lt: 2,
|
32273
|
+
lw: 2,
|
32274
|
+
mint: 35718,
|
32275
|
+
mlog: 2,
|
32276
|
+
mod: 2,
|
32277
|
+
modi: 2,
|
32278
|
+
move: 2,
|
32279
|
+
movi: 2,
|
32280
|
+
mroo: 5,
|
32281
|
+
mul: 2,
|
32282
|
+
muli: 2,
|
32283
|
+
mldv: 4,
|
32284
|
+
noop: 1,
|
32285
|
+
not: 2,
|
32286
|
+
or: 2,
|
32287
|
+
ori: 2,
|
32288
|
+
poph: 3,
|
32289
|
+
popl: 3,
|
32290
|
+
pshh: 4,
|
32291
|
+
pshl: 4,
|
32292
|
+
ret_contract: 733,
|
32293
|
+
rvrt_contract: 722,
|
32294
|
+
sb: 2,
|
32295
|
+
sll: 2,
|
32296
|
+
slli: 2,
|
32297
|
+
srl: 2,
|
32298
|
+
srli: 2,
|
32299
|
+
srw: 253,
|
32300
|
+
sub: 2,
|
32301
|
+
subi: 2,
|
32302
|
+
sw: 2,
|
32303
|
+
sww: 29053,
|
32304
|
+
time: 79,
|
32305
|
+
tr: 46242,
|
32306
|
+
tro: 33251,
|
32307
|
+
wdcm: 3,
|
32308
|
+
wqcm: 3,
|
32309
|
+
wdop: 3,
|
32310
|
+
wqop: 3,
|
32311
|
+
wdml: 3,
|
32312
|
+
wqml: 4,
|
32313
|
+
wddv: 5,
|
32314
|
+
wqdv: 7,
|
32315
|
+
wdmd: 11,
|
32316
|
+
wqmd: 18,
|
32317
|
+
wdam: 9,
|
32318
|
+
wqam: 12,
|
32319
|
+
wdmm: 11,
|
32320
|
+
wqmm: 11,
|
32321
|
+
xor: 2,
|
32322
|
+
xori: 2,
|
32323
|
+
call: {
|
32324
|
+
LightOperation: {
|
32325
|
+
base: 21687,
|
32326
|
+
units_per_gas: 4
|
32327
|
+
}
|
32328
|
+
},
|
32329
|
+
ccp: {
|
32330
|
+
LightOperation: {
|
32331
|
+
base: 59,
|
32332
|
+
units_per_gas: 20
|
32333
|
+
}
|
32334
|
+
},
|
32335
|
+
croo: {
|
32336
|
+
LightOperation: {
|
32337
|
+
base: 1,
|
32338
|
+
units_per_gas: 1
|
32339
|
+
}
|
32340
|
+
},
|
32341
|
+
csiz: {
|
32342
|
+
LightOperation: {
|
32343
|
+
base: 59,
|
32344
|
+
units_per_gas: 195
|
32345
|
+
}
|
32346
|
+
},
|
32347
|
+
k256: {
|
32348
|
+
LightOperation: {
|
32349
|
+
base: 282,
|
32350
|
+
units_per_gas: 3
|
32351
|
+
}
|
32352
|
+
},
|
32353
|
+
ldc: {
|
32354
|
+
LightOperation: {
|
32355
|
+
base: 45,
|
32356
|
+
units_per_gas: 65
|
32357
|
+
}
|
32358
|
+
},
|
32359
|
+
logd: {
|
32360
|
+
LightOperation: {
|
32361
|
+
base: 1134,
|
32362
|
+
units_per_gas: 2
|
32363
|
+
}
|
32364
|
+
},
|
32365
|
+
mcl: {
|
32366
|
+
LightOperation: {
|
32367
|
+
base: 3,
|
32368
|
+
units_per_gas: 523
|
32369
|
+
}
|
32370
|
+
},
|
32371
|
+
mcli: {
|
32372
|
+
LightOperation: {
|
32373
|
+
base: 3,
|
32374
|
+
units_per_gas: 526
|
32375
|
+
}
|
32376
|
+
},
|
32377
|
+
mcp: {
|
32378
|
+
LightOperation: {
|
32379
|
+
base: 3,
|
32380
|
+
units_per_gas: 448
|
32381
|
+
}
|
32382
|
+
},
|
32383
|
+
mcpi: {
|
32384
|
+
LightOperation: {
|
32385
|
+
base: 7,
|
32386
|
+
units_per_gas: 585
|
32387
|
+
}
|
32388
|
+
},
|
32389
|
+
meq: {
|
32390
|
+
LightOperation: {
|
32391
|
+
base: 11,
|
32392
|
+
units_per_gas: 1097
|
32393
|
+
}
|
32394
|
+
},
|
32395
|
+
retd_contract: {
|
32396
|
+
LightOperation: {
|
32397
|
+
base: 1086,
|
32398
|
+
units_per_gas: 2
|
32399
|
+
}
|
32400
|
+
},
|
32401
|
+
s256: {
|
32402
|
+
LightOperation: {
|
32403
|
+
base: 45,
|
32404
|
+
units_per_gas: 3
|
32405
|
+
}
|
32406
|
+
},
|
32407
|
+
scwq: {
|
32408
|
+
HeavyOperation: {
|
32409
|
+
base: 30375,
|
32410
|
+
gas_per_unit: 28628
|
32411
|
+
}
|
32412
|
+
},
|
32413
|
+
smo: {
|
32414
|
+
LightOperation: {
|
32415
|
+
base: 64196,
|
32416
|
+
units_per_gas: 1
|
32417
|
+
}
|
32418
|
+
},
|
32419
|
+
srwq: {
|
32420
|
+
HeavyOperation: {
|
32421
|
+
base: 262,
|
32422
|
+
gas_per_unit: 249
|
32423
|
+
}
|
32424
|
+
},
|
32425
|
+
swwq: {
|
32426
|
+
HeavyOperation: {
|
32427
|
+
base: 28484,
|
32428
|
+
gas_per_unit: 26613
|
32429
|
+
}
|
32430
|
+
},
|
32431
|
+
contract_root: {
|
32432
|
+
LightOperation: {
|
32433
|
+
base: 45,
|
32434
|
+
units_per_gas: 1
|
32435
|
+
}
|
32436
|
+
},
|
32437
|
+
state_root: {
|
32438
|
+
HeavyOperation: {
|
32439
|
+
base: 350,
|
32440
|
+
gas_per_unit: 176
|
32441
|
+
}
|
32442
|
+
},
|
32443
|
+
new_storage_per_byte: 63,
|
32444
|
+
vm_initialization: {
|
32445
|
+
LightOperation: {
|
32446
|
+
base: 1645,
|
32447
|
+
units_per_gas: 14
|
32448
|
+
}
|
32449
|
+
}
|
32450
|
+
}
|
32452
32451
|
},
|
32453
|
-
|
32454
|
-
|
32455
|
-
|
32456
|
-
|
32457
|
-
amount: "0xb04f3c08f59b309e",
|
32458
|
-
data: "",
|
32459
|
-
da_height: "0x00"
|
32460
|
-
}
|
32461
|
-
]
|
32452
|
+
base_asset_id: "0000000000000000000000000000000000000000000000000000000000000000",
|
32453
|
+
block_gas_limit: 3e7,
|
32454
|
+
privileged_address: "0000000000000000000000000000000000000000000000000000000000000000"
|
32455
|
+
}
|
32462
32456
|
},
|
32463
|
-
|
32464
|
-
|
32465
|
-
|
32466
|
-
|
32467
|
-
|
32468
|
-
|
32469
|
-
|
32457
|
+
consensus: {
|
32458
|
+
PoA: {
|
32459
|
+
signing_key: "0x94ffcc53b892684acefaebc8a3d4a595e528a8cf664eeb3ef36f1020b0809d0d"
|
32460
|
+
}
|
32461
|
+
}
|
32462
|
+
};
|
32463
|
+
var metadata_default = {
|
32464
|
+
chain_config: "chainConfig.json",
|
32465
|
+
table_encoding: {
|
32466
|
+
Json: {
|
32467
|
+
filepath: "stateConfig.json"
|
32468
|
+
}
|
32469
|
+
}
|
32470
|
+
};
|
32471
|
+
var stateConfig_default = {
|
32472
|
+
coins: [
|
32473
|
+
{
|
32474
|
+
tx_id: "0x260eabfd50937e92939fd92687e9302a72e91c5065f64f853f2ccbe02396fe09d665",
|
32475
|
+
output_index: 0,
|
32476
|
+
tx_pointer_block_height: 0,
|
32477
|
+
tx_pointer_tx_idx: 0,
|
32478
|
+
owner: "0x94ffcc53b892684acefaebc8a3d4a595e528a8cf664eeb3ef36f1020b0809d0d",
|
32479
|
+
amount: 18446744073709552e3,
|
32480
|
+
asset_id: "0x0000000000000000000000000000000000000000000000000000000000000000"
|
32470
32481
|
},
|
32471
|
-
|
32472
|
-
|
32473
|
-
|
32474
|
-
|
32475
|
-
|
32482
|
+
{
|
32483
|
+
tx_id: "0x2a757c2317236f7883ac9bbbf7d402f034e0b725c544ef1c8725b1d2bd960f8c690f",
|
32484
|
+
output_index: 0,
|
32485
|
+
tx_pointer_block_height: 0,
|
32486
|
+
tx_pointer_tx_idx: 0,
|
32487
|
+
owner: "0x09c0b2d1a486c439a87bcba6b46a7a1a23f3897cc83a94521a96da5c23bc58db",
|
32488
|
+
amount: 18446744073709552e3,
|
32489
|
+
asset_id: "0x0000000000000000000000000000000000000000000000000000000000000000"
|
32476
32490
|
},
|
32477
|
-
|
32478
|
-
|
32479
|
-
|
32491
|
+
{
|
32492
|
+
tx_id: "0x634ef6cda00bac63992bbde80c6d694d484d58025a5ca0c9c848f0d35a5a3eee74b2",
|
32493
|
+
output_index: 0,
|
32494
|
+
tx_pointer_block_height: 0,
|
32495
|
+
tx_pointer_tx_idx: 0,
|
32496
|
+
owner: "0x09c0b2d1a486c439a87bcba6b46a7a1a23f3897cc83a94521a96da5c23bc58db",
|
32497
|
+
amount: 18446744073709552e3,
|
32498
|
+
asset_id: "0x0101010101010101010101010101010101010101010101010101010101010101"
|
32480
32499
|
},
|
32481
|
-
|
32482
|
-
|
32483
|
-
|
32500
|
+
{
|
32501
|
+
tx_id: "0xd3543bb1da137a7987a96a1bb71681fdd195ff25318c0d4a923aa30eb27ffa80bc7b",
|
32502
|
+
output_index: 0,
|
32503
|
+
tx_pointer_block_height: 0,
|
32504
|
+
tx_pointer_tx_idx: 0,
|
32505
|
+
owner: "0x09c0b2d1a486c439a87bcba6b46a7a1a23f3897cc83a94521a96da5c23bc58db",
|
32506
|
+
amount: 18446744073709552e3,
|
32507
|
+
asset_id: "0x0202020202020202020202020202020202020202020202020202020202020202"
|
32484
32508
|
},
|
32485
|
-
|
32486
|
-
|
32487
|
-
|
32509
|
+
{
|
32510
|
+
tx_id: "0xa4d42cbb02adb32f5f3a9eab33a0ee7bdab8910ad9f615dfc86a7bb9e49a732bc58c",
|
32511
|
+
output_index: 0,
|
32512
|
+
tx_pointer_block_height: 0,
|
32513
|
+
tx_pointer_tx_idx: 0,
|
32514
|
+
owner: "0x5d99ee966b42cd8fc7bdd1364b389153a9e78b42b7d4a691470674e817888d4e",
|
32515
|
+
amount: 18446744073709552e3,
|
32516
|
+
asset_id: "0x0000000000000000000000000000000000000000000000000000000000000000"
|
32488
32517
|
},
|
32489
|
-
|
32490
|
-
|
32491
|
-
|
32492
|
-
|
32493
|
-
|
32494
|
-
|
32495
|
-
|
32496
|
-
|
32497
|
-
bal: 13,
|
32498
|
-
bhei: 1,
|
32499
|
-
bhsh: 1,
|
32500
|
-
burn: 132,
|
32501
|
-
cb: 1,
|
32502
|
-
cfei: 1,
|
32503
|
-
cfsi: 1,
|
32504
|
-
croo: 16,
|
32505
|
-
div: 1,
|
32506
|
-
divi: 1,
|
32507
|
-
ecr1: 3e3,
|
32508
|
-
eck1: 951,
|
32509
|
-
ed19: 3e3,
|
32510
|
-
eq: 1,
|
32511
|
-
exp: 1,
|
32512
|
-
expi: 1,
|
32513
|
-
flag: 1,
|
32514
|
-
gm: 1,
|
32515
|
-
gt: 1,
|
32516
|
-
gtf: 1,
|
32517
|
-
ji: 1,
|
32518
|
-
jmp: 1,
|
32519
|
-
jne: 1,
|
32520
|
-
jnei: 1,
|
32521
|
-
jnzi: 1,
|
32522
|
-
jmpf: 1,
|
32523
|
-
jmpb: 1,
|
32524
|
-
jnzf: 1,
|
32525
|
-
jnzb: 1,
|
32526
|
-
jnef: 1,
|
32527
|
-
jneb: 1,
|
32528
|
-
lb: 1,
|
32529
|
-
log: 9,
|
32530
|
-
lt: 1,
|
32531
|
-
lw: 1,
|
32532
|
-
mint: 135,
|
32533
|
-
mlog: 1,
|
32534
|
-
modOp: 1,
|
32535
|
-
modi: 1,
|
32536
|
-
moveOp: 1,
|
32537
|
-
movi: 1,
|
32538
|
-
mroo: 2,
|
32539
|
-
mul: 1,
|
32540
|
-
muli: 1,
|
32541
|
-
mldv: 1,
|
32542
|
-
noop: 1,
|
32543
|
-
not: 1,
|
32544
|
-
or: 1,
|
32545
|
-
ori: 1,
|
32546
|
-
poph: 2,
|
32547
|
-
popl: 2,
|
32548
|
-
pshh: 2,
|
32549
|
-
pshl: 2,
|
32550
|
-
ret: 13,
|
32551
|
-
rvrt: 13,
|
32552
|
-
sb: 1,
|
32553
|
-
sll: 1,
|
32554
|
-
slli: 1,
|
32555
|
-
srl: 1,
|
32556
|
-
srli: 1,
|
32557
|
-
srw: 12,
|
32558
|
-
sub: 1,
|
32559
|
-
subi: 1,
|
32560
|
-
sw: 1,
|
32561
|
-
sww: 67,
|
32562
|
-
time: 1,
|
32563
|
-
tr: 105,
|
32564
|
-
tro: 60,
|
32565
|
-
wdcm: 1,
|
32566
|
-
wqcm: 1,
|
32567
|
-
wdop: 1,
|
32568
|
-
wqop: 1,
|
32569
|
-
wdml: 1,
|
32570
|
-
wqml: 1,
|
32571
|
-
wddv: 1,
|
32572
|
-
wqdv: 2,
|
32573
|
-
wdmd: 3,
|
32574
|
-
wqmd: 4,
|
32575
|
-
wdam: 2,
|
32576
|
-
wqam: 3,
|
32577
|
-
wdmm: 3,
|
32578
|
-
wqmm: 3,
|
32579
|
-
xor: 1,
|
32580
|
-
xori: 1,
|
32581
|
-
call: {
|
32582
|
-
LightOperation: {
|
32583
|
-
base: 144,
|
32584
|
-
units_per_gas: 214
|
32585
|
-
}
|
32518
|
+
{
|
32519
|
+
tx_id: "0xc197cb09b1d89a7862b238e9500631bd43f291aadb7ff55c8129335349634e9fde3f",
|
32520
|
+
output_index: 0,
|
32521
|
+
tx_pointer_block_height: 0,
|
32522
|
+
tx_pointer_tx_idx: 0,
|
32523
|
+
owner: "0x5d99ee966b42cd8fc7bdd1364b389153a9e78b42b7d4a691470674e817888d4e",
|
32524
|
+
amount: 18446744073709552e3,
|
32525
|
+
asset_id: "0x0101010101010101010101010101010101010101010101010101010101010101"
|
32586
32526
|
},
|
32587
|
-
|
32588
|
-
|
32589
|
-
|
32590
|
-
|
32591
|
-
|
32527
|
+
{
|
32528
|
+
tx_id: "0x4c4fc2451b9a9b16c520c1b89ec8968ce46823dd0396d84f7e3155861352fdce12c5",
|
32529
|
+
output_index: 0,
|
32530
|
+
tx_pointer_block_height: 0,
|
32531
|
+
tx_pointer_tx_idx: 0,
|
32532
|
+
owner: "0x5d99ee966b42cd8fc7bdd1364b389153a9e78b42b7d4a691470674e817888d4e",
|
32533
|
+
amount: 18446744073709552e3,
|
32534
|
+
asset_id: "0x0202020202020202020202020202020202020202020202020202020202020202"
|
32592
32535
|
},
|
32593
|
-
|
32594
|
-
|
32595
|
-
|
32596
|
-
|
32597
|
-
|
32536
|
+
{
|
32537
|
+
tx_id: "0x68df8f08555086a1ab45591e6fe4bf2f538bcb80dd519108030b7e886d6a230c2531",
|
32538
|
+
output_index: 0,
|
32539
|
+
tx_pointer_block_height: 0,
|
32540
|
+
tx_pointer_tx_idx: 0,
|
32541
|
+
owner: "0xbdaad6a89e073e177895b3e5a9ccd15806749eda134a6438dae32fc5b6601f3f",
|
32542
|
+
amount: 18446744073709552e3,
|
32543
|
+
asset_id: "0x0000000000000000000000000000000000000000000000000000000000000000"
|
32598
32544
|
},
|
32599
|
-
|
32600
|
-
|
32601
|
-
|
32602
|
-
|
32603
|
-
|
32545
|
+
{
|
32546
|
+
tx_id: "0x1b9bdaa290518373eb905e45ce7fcb89acedd24341ca7749ad47a938e4bf3ca9b7ce",
|
32547
|
+
output_index: 0,
|
32548
|
+
tx_pointer_block_height: 0,
|
32549
|
+
tx_pointer_tx_idx: 0,
|
32550
|
+
owner: "0xbdaad6a89e073e177895b3e5a9ccd15806749eda134a6438dae32fc5b6601f3f",
|
32551
|
+
amount: 18446744073709552e3,
|
32552
|
+
asset_id: "0x0101010101010101010101010101010101010101010101010101010101010101"
|
32604
32553
|
},
|
32605
|
-
|
32606
|
-
|
32607
|
-
|
32608
|
-
|
32609
|
-
|
32554
|
+
{
|
32555
|
+
tx_id: "0xa5a2e9db3d1285337fe1183dc1eabe8f9cdcd470daf95cd5c522bbae292f53977f26",
|
32556
|
+
output_index: 0,
|
32557
|
+
tx_pointer_block_height: 0,
|
32558
|
+
tx_pointer_tx_idx: 0,
|
32559
|
+
owner: "0xbdaad6a89e073e177895b3e5a9ccd15806749eda134a6438dae32fc5b6601f3f",
|
32560
|
+
amount: 18446744073709552e3,
|
32561
|
+
asset_id: "0x0202020202020202020202020202020202020202020202020202020202020202"
|
32610
32562
|
},
|
32611
|
-
|
32612
|
-
|
32613
|
-
|
32614
|
-
|
32615
|
-
|
32563
|
+
{
|
32564
|
+
tx_id: "0x13b685a1ea7c56309a92d69dd7e4808987ec90d62a1f9c9f2ec18e54746855c8c93c",
|
32565
|
+
output_index: 0,
|
32566
|
+
tx_pointer_block_height: 0,
|
32567
|
+
tx_pointer_tx_idx: 0,
|
32568
|
+
owner: "0x95a7aa6cc32743f8706c40ef49a7423b47da763bb4bbc055b1f07254dc729036",
|
32569
|
+
amount: 18446744073709552e3,
|
32570
|
+
asset_id: "0x0000000000000000000000000000000000000000000000000000000000000000"
|
32616
32571
|
},
|
32617
|
-
|
32618
|
-
|
32619
|
-
|
32620
|
-
|
32621
|
-
|
32572
|
+
{
|
32573
|
+
tx_id: "0xf8f00a234cf3fbab86befc3fd9346d7fd1ac085233c9cb58c7447f30c75cbf87ed38",
|
32574
|
+
output_index: 0,
|
32575
|
+
tx_pointer_block_height: 0,
|
32576
|
+
tx_pointer_tx_idx: 0,
|
32577
|
+
owner: "0x95a7aa6cc32743f8706c40ef49a7423b47da763bb4bbc055b1f07254dc729036",
|
32578
|
+
amount: 18446744073709552e3,
|
32579
|
+
asset_id: "0x0101010101010101010101010101010101010101010101010101010101010101"
|
32622
32580
|
},
|
32623
|
-
|
32624
|
-
|
32625
|
-
|
32626
|
-
|
32627
|
-
|
32581
|
+
{
|
32582
|
+
tx_id: "0x2a36c870f624b60fbd6f2b71332ca7f704c69296ceae4ddbf3a8ede79408088934be",
|
32583
|
+
output_index: 0,
|
32584
|
+
tx_pointer_block_height: 0,
|
32585
|
+
tx_pointer_tx_idx: 0,
|
32586
|
+
owner: "0x95a7aa6cc32743f8706c40ef49a7423b47da763bb4bbc055b1f07254dc729036",
|
32587
|
+
amount: 18446744073709552e3,
|
32588
|
+
asset_id: "0x0202020202020202020202020202020202020202020202020202020202020202"
|
32628
32589
|
},
|
32629
|
-
|
32630
|
-
|
32631
|
-
|
32632
|
-
|
32633
|
-
|
32590
|
+
{
|
32591
|
+
tx_id: "0x9cd180d41e67a422da8a7683f036b463a7ed7efc0de31c1692adac90decbfebce78c",
|
32592
|
+
output_index: 0,
|
32593
|
+
tx_pointer_block_height: 0,
|
32594
|
+
tx_pointer_tx_idx: 0,
|
32595
|
+
owner: "0xcee104acd38b940c8f1c62c6d7ea00a0ad2241d6dee0509a4bf27297508870d3",
|
32596
|
+
amount: 18446744073709552e3,
|
32597
|
+
asset_id: "0x0000000000000000000000000000000000000000000000000000000000000000"
|
32634
32598
|
},
|
32635
|
-
|
32636
|
-
|
32637
|
-
|
32638
|
-
|
32639
|
-
|
32599
|
+
{
|
32600
|
+
tx_id: "0xfeb4f2388fa22e6613ff85cf4e655f58acdfaa6299eba7f93b812cd1f0d7bbac48f0",
|
32601
|
+
output_index: 0,
|
32602
|
+
tx_pointer_block_height: 0,
|
32603
|
+
tx_pointer_tx_idx: 0,
|
32604
|
+
owner: "0xcee104acd38b940c8f1c62c6d7ea00a0ad2241d6dee0509a4bf27297508870d3",
|
32605
|
+
amount: 18446744073709552e3,
|
32606
|
+
asset_id: "0x0101010101010101010101010101010101010101010101010101010101010101"
|
32640
32607
|
},
|
32641
|
-
|
32642
|
-
|
32643
|
-
|
32644
|
-
|
32645
|
-
|
32608
|
+
{
|
32609
|
+
tx_id: "0xc4d20299f43358dc32ab853f6631340b09278511b6adbaf34597ade6ef37efd018f1",
|
32610
|
+
output_index: 0,
|
32611
|
+
tx_pointer_block_height: 0,
|
32612
|
+
tx_pointer_tx_idx: 0,
|
32613
|
+
owner: "0xcee104acd38b940c8f1c62c6d7ea00a0ad2241d6dee0509a4bf27297508870d3",
|
32614
|
+
amount: 18446744073709552e3,
|
32615
|
+
asset_id: "0x0202020202020202020202020202020202020202020202020202020202020202"
|
32646
32616
|
},
|
32647
|
-
|
32648
|
-
|
32649
|
-
|
32650
|
-
|
32651
|
-
|
32617
|
+
{
|
32618
|
+
tx_id: "0x437291414110b0aebaa8be5c0d9ff1e97d1130a24a6c9e028f2b1f6b0576be6aa961",
|
32619
|
+
output_index: 0,
|
32620
|
+
tx_pointer_block_height: 0,
|
32621
|
+
tx_pointer_tx_idx: 0,
|
32622
|
+
owner: "0x7e3626e306588eba79cafab73f0709e55ab8f4bdfe8c8b75034a430fc56ece89",
|
32623
|
+
amount: 18446744073709552e3,
|
32624
|
+
asset_id: "0x0000000000000000000000000000000000000000000000000000000000000000"
|
32652
32625
|
},
|
32653
|
-
|
32654
|
-
|
32655
|
-
|
32656
|
-
|
32657
|
-
|
32626
|
+
{
|
32627
|
+
tx_id: "0x28131b9acc90c2058ee14f4094a474146ba5b779cb9021867164b3d41abad3d047a7",
|
32628
|
+
output_index: 0,
|
32629
|
+
tx_pointer_block_height: 0,
|
32630
|
+
tx_pointer_tx_idx: 0,
|
32631
|
+
owner: "0x7e3626e306588eba79cafab73f0709e55ab8f4bdfe8c8b75034a430fc56ece89",
|
32632
|
+
amount: 18446744073709552e3,
|
32633
|
+
asset_id: "0x0101010101010101010101010101010101010101010101010101010101010101"
|
32658
32634
|
},
|
32659
|
-
|
32660
|
-
|
32661
|
-
|
32662
|
-
|
32663
|
-
|
32635
|
+
{
|
32636
|
+
tx_id: "0x033bb5f9b0e4f530d50af3a0f12dd510f799af495ef88baea3cf854a37da728d214b",
|
32637
|
+
output_index: 0,
|
32638
|
+
tx_pointer_block_height: 0,
|
32639
|
+
tx_pointer_tx_idx: 0,
|
32640
|
+
owner: "0x7e3626e306588eba79cafab73f0709e55ab8f4bdfe8c8b75034a430fc56ece89",
|
32641
|
+
amount: 18446744073709552e3,
|
32642
|
+
asset_id: "0x0202020202020202020202020202020202020202020202020202020202020202"
|
32664
32643
|
},
|
32665
|
-
|
32666
|
-
|
32667
|
-
|
32668
|
-
|
32669
|
-
|
32644
|
+
{
|
32645
|
+
tx_id: "0x460591398552eca338dd9577f362b91b0f9297f308258734870350004dcc303c67e9",
|
32646
|
+
output_index: 0,
|
32647
|
+
tx_pointer_block_height: 0,
|
32648
|
+
tx_pointer_tx_idx: 0,
|
32649
|
+
owner: "0x1c31df52b6df56407dd95f83082e8beb9cfc9532ac111d5bd8491651d95ba775",
|
32650
|
+
amount: 18446744073709552e3,
|
32651
|
+
asset_id: "0x0000000000000000000000000000000000000000000000000000000000000000"
|
32670
32652
|
},
|
32671
|
-
|
32672
|
-
|
32673
|
-
|
32674
|
-
|
32675
|
-
|
32653
|
+
{
|
32654
|
+
tx_id: "0x447a7c37aee972dcba72f05255c5145dd63125f0fc46ef98c216f775ee0421e23d2b",
|
32655
|
+
output_index: 0,
|
32656
|
+
tx_pointer_block_height: 0,
|
32657
|
+
tx_pointer_tx_idx: 0,
|
32658
|
+
owner: "0x1c31df52b6df56407dd95f83082e8beb9cfc9532ac111d5bd8491651d95ba775",
|
32659
|
+
amount: 18446744073709552e3,
|
32660
|
+
asset_id: "0x0101010101010101010101010101010101010101010101010101010101010101"
|
32676
32661
|
},
|
32677
|
-
|
32678
|
-
|
32679
|
-
|
32680
|
-
|
32681
|
-
|
32662
|
+
{
|
32663
|
+
tx_id: "0xf4a5d727606260c7ac6333fa89e7aef474df8a13326716d4d02f6392ebb7b997d268",
|
32664
|
+
output_index: 0,
|
32665
|
+
tx_pointer_block_height: 0,
|
32666
|
+
tx_pointer_tx_idx: 0,
|
32667
|
+
owner: "0x1c31df52b6df56407dd95f83082e8beb9cfc9532ac111d5bd8491651d95ba775",
|
32668
|
+
amount: 18446744073709552e3,
|
32669
|
+
asset_id: "0x0202020202020202020202020202020202020202020202020202020202020202"
|
32682
32670
|
},
|
32683
|
-
|
32684
|
-
|
32685
|
-
|
32686
|
-
|
32687
|
-
|
32671
|
+
{
|
32672
|
+
tx_id: "0x25a49b0731bf610f6706aa9e9e96e5967f7c50f4302a3c75d7c8141595896551c18d",
|
32673
|
+
output_index: 0,
|
32674
|
+
tx_pointer_block_height: 0,
|
32675
|
+
tx_pointer_tx_idx: 0,
|
32676
|
+
owner: "0x09dd7a49174d6fcc9f4c6f7942c18060a935ddd03ee69b594189b8c3581276ea",
|
32677
|
+
amount: 18446744073709552e3,
|
32678
|
+
asset_id: "0x0000000000000000000000000000000000000000000000000000000000000000"
|
32688
32679
|
},
|
32689
|
-
|
32690
|
-
|
32691
|
-
|
32692
|
-
|
32693
|
-
|
32680
|
+
{
|
32681
|
+
tx_id: "0x0a6e3585881ef2edf3f7727762799089dc0b5923e8b3718b49044dd9ddcb33b68459",
|
32682
|
+
output_index: 0,
|
32683
|
+
tx_pointer_block_height: 0,
|
32684
|
+
tx_pointer_tx_idx: 0,
|
32685
|
+
owner: "0x09dd7a49174d6fcc9f4c6f7942c18060a935ddd03ee69b594189b8c3581276ea",
|
32686
|
+
amount: 18446744073709552e3,
|
32687
|
+
asset_id: "0x0101010101010101010101010101010101010101010101010101010101010101"
|
32694
32688
|
},
|
32695
|
-
|
32696
|
-
|
32697
|
-
|
32698
|
-
|
32699
|
-
|
32689
|
+
{
|
32690
|
+
tx_id: "0xf73bbe0635f7b6d59a090a21d87288b82164d0f6101da830ce64eff64a2d2ff2ac37",
|
32691
|
+
output_index: 0,
|
32692
|
+
tx_pointer_block_height: 0,
|
32693
|
+
tx_pointer_tx_idx: 0,
|
32694
|
+
owner: "0x09dd7a49174d6fcc9f4c6f7942c18060a935ddd03ee69b594189b8c3581276ea",
|
32695
|
+
amount: 18446744073709552e3,
|
32696
|
+
asset_id: "0x0202020202020202020202020202020202020202020202020202020202020202"
|
32700
32697
|
},
|
32701
|
-
|
32702
|
-
|
32703
|
-
|
32704
|
-
|
32705
|
-
|
32698
|
+
{
|
32699
|
+
tx_id: "0x6cc44cb8d2a6462a591a77b6b9917eb6b22ad80d23d3cfd4f94c9da49c14b3cbac6e",
|
32700
|
+
output_index: 0,
|
32701
|
+
tx_pointer_block_height: 0,
|
32702
|
+
tx_pointer_tx_idx: 0,
|
32703
|
+
owner: "0x86604282dc604481b809845be49667607c470644f6822fc01eb0d22f167e08cf",
|
32704
|
+
amount: 18446744073709552e3,
|
32705
|
+
asset_id: "0x0000000000000000000000000000000000000000000000000000000000000000"
|
32706
|
+
},
|
32707
|
+
{
|
32708
|
+
tx_id: "0xbf2305d284ea95227040df4cc727156cccc2ca6aa3b92ed86fea4db1c37e5905f926",
|
32709
|
+
output_index: 0,
|
32710
|
+
tx_pointer_block_height: 0,
|
32711
|
+
tx_pointer_tx_idx: 0,
|
32712
|
+
owner: "0x86604282dc604481b809845be49667607c470644f6822fc01eb0d22f167e08cf",
|
32713
|
+
amount: 18446744073709552e3,
|
32714
|
+
asset_id: "0x0101010101010101010101010101010101010101010101010101010101010101"
|
32715
|
+
},
|
32716
|
+
{
|
32717
|
+
tx_id: "0xf4e1c76c72ecae699696f5e7a62ccf1425f7395080d0ca7b25ab63d1f841f425b807",
|
32718
|
+
output_index: 0,
|
32719
|
+
tx_pointer_block_height: 0,
|
32720
|
+
tx_pointer_tx_idx: 0,
|
32721
|
+
owner: "0x86604282dc604481b809845be49667607c470644f6822fc01eb0d22f167e08cf",
|
32722
|
+
amount: 18446744073709552e3,
|
32723
|
+
asset_id: "0x0202020202020202020202020202020202020202020202020202020202020202"
|
32724
|
+
},
|
32725
|
+
{
|
32726
|
+
tx_id: "0x619c80ee9f4c27c2e134cec6c67bdb268ce7fb1d2ac229ca2a44ec7ac88b2da99669",
|
32727
|
+
output_index: 0,
|
32728
|
+
tx_pointer_block_height: 0,
|
32729
|
+
tx_pointer_tx_idx: 0,
|
32730
|
+
owner: "0xbca334a06d19db5041c78fe2f465b07be5bec828f38b7796b2877e7d1542c950",
|
32731
|
+
amount: 18446744073709552e3,
|
32732
|
+
asset_id: "0x0000000000000000000000000000000000000000000000000000000000000000"
|
32733
|
+
},
|
32734
|
+
{
|
32735
|
+
tx_id: "0x978d5b6be047ffbf1474dc376a6baa33264629b809e4a8210d11aaa805ec6451585d",
|
32736
|
+
output_index: 0,
|
32737
|
+
tx_pointer_block_height: 0,
|
32738
|
+
tx_pointer_tx_idx: 0,
|
32739
|
+
owner: "0xbca334a06d19db5041c78fe2f465b07be5bec828f38b7796b2877e7d1542c950",
|
32740
|
+
amount: 18446744073709552e3,
|
32741
|
+
asset_id: "0x0101010101010101010101010101010101010101010101010101010101010101"
|
32742
|
+
},
|
32743
|
+
{
|
32744
|
+
tx_id: "0x673ba12fca6e52429896096262b8c59b61751976e552649fb1fe7369488fc10aa83c",
|
32745
|
+
output_index: 0,
|
32746
|
+
tx_pointer_block_height: 0,
|
32747
|
+
tx_pointer_tx_idx: 0,
|
32748
|
+
owner: "0xbca334a06d19db5041c78fe2f465b07be5bec828f38b7796b2877e7d1542c950",
|
32749
|
+
amount: 18446744073709552e3,
|
32750
|
+
asset_id: "0x0202020202020202020202020202020202020202020202020202020202020202"
|
32751
|
+
},
|
32752
|
+
{
|
32753
|
+
tx_id: "0xc42a165104b9fcfa4a9ebffc707781ace233f1c0609c24c36a5c4bfcd407480ddb6c",
|
32754
|
+
output_index: 0,
|
32755
|
+
tx_pointer_block_height: 0,
|
32756
|
+
tx_pointer_tx_idx: 0,
|
32757
|
+
owner: "0xbd9a1dc8d3ec3521c43f6c2c01611b4d0204c7610204ff0178488c8738a30bd2",
|
32758
|
+
amount: 18446744073709552e3,
|
32759
|
+
asset_id: "0x0000000000000000000000000000000000000000000000000000000000000000"
|
32760
|
+
},
|
32761
|
+
{
|
32762
|
+
tx_id: "0xb353fbcd94abba347f3ba25e17744e98da26e608ebccbbbd2e9d004997644bdf993c",
|
32763
|
+
output_index: 0,
|
32764
|
+
tx_pointer_block_height: 0,
|
32765
|
+
tx_pointer_tx_idx: 0,
|
32766
|
+
owner: "0xbd9a1dc8d3ec3521c43f6c2c01611b4d0204c7610204ff0178488c8738a30bd2",
|
32767
|
+
amount: 18446744073709552e3,
|
32768
|
+
asset_id: "0x0101010101010101010101010101010101010101010101010101010101010101"
|
32769
|
+
},
|
32770
|
+
{
|
32771
|
+
tx_id: "0xc34a6fcb241dec82f885019caf5e14bb6708b435afebfef0037ac447fbb6d30378a3",
|
32772
|
+
output_index: 0,
|
32773
|
+
tx_pointer_block_height: 0,
|
32774
|
+
tx_pointer_tx_idx: 0,
|
32775
|
+
owner: "0xbd9a1dc8d3ec3521c43f6c2c01611b4d0204c7610204ff0178488c8738a30bd2",
|
32776
|
+
amount: 18446744073709552e3,
|
32777
|
+
asset_id: "0x0202020202020202020202020202020202020202020202020202020202020202"
|
32778
|
+
},
|
32779
|
+
{
|
32780
|
+
tx_id: "0x421dfb5811c905724f2f4c6370cd15eaeb590ddeb966f9a4b9f8d65991dfe5142e12",
|
32781
|
+
output_index: 0,
|
32782
|
+
tx_pointer_block_height: 0,
|
32783
|
+
tx_pointer_tx_idx: 0,
|
32784
|
+
owner: "0xb32197cf75efe05bf453c26178139f09b391582065549c1422bc92555ecffb64",
|
32785
|
+
amount: 18446744073709552e3,
|
32786
|
+
asset_id: "0x0000000000000000000000000000000000000000000000000000000000000000"
|
32787
|
+
},
|
32788
|
+
{
|
32789
|
+
tx_id: "0xa952c0487eefac5dda612011c4c82554c8660834461b9b815c6ae257b56b68005235",
|
32790
|
+
output_index: 0,
|
32791
|
+
tx_pointer_block_height: 0,
|
32792
|
+
tx_pointer_tx_idx: 0,
|
32793
|
+
owner: "0xb32197cf75efe05bf453c26178139f09b391582065549c1422bc92555ecffb64",
|
32794
|
+
amount: 18446744073709552e3,
|
32795
|
+
asset_id: "0x0101010101010101010101010101010101010101010101010101010101010101"
|
32796
|
+
},
|
32797
|
+
{
|
32798
|
+
tx_id: "0xebaccf91b3b213341d047b6e6af214f1f9729b3d6dadf9c1918a9fe412486af871db",
|
32799
|
+
output_index: 0,
|
32800
|
+
tx_pointer_block_height: 0,
|
32801
|
+
tx_pointer_tx_idx: 0,
|
32802
|
+
owner: "0xb32197cf75efe05bf453c26178139f09b391582065549c1422bc92555ecffb64",
|
32803
|
+
amount: 18446744073709552e3,
|
32804
|
+
asset_id: "0x0202020202020202020202020202020202020202020202020202020202020202"
|
32805
|
+
},
|
32806
|
+
{
|
32807
|
+
tx_id: "0xda6d61c153e7d735954408274f4ffe8459c2dbab720ce22a1ae9ffedd33077b5b19d",
|
32808
|
+
output_index: 0,
|
32809
|
+
tx_pointer_block_height: 0,
|
32810
|
+
tx_pointer_tx_idx: 0,
|
32811
|
+
owner: "0x3b24509ed4ab3c7959f5c9391c1445c59290cdb5f13d6f780922f376b7029f30",
|
32812
|
+
amount: 18446744073709552e3,
|
32813
|
+
asset_id: "0x0000000000000000000000000000000000000000000000000000000000000000"
|
32814
|
+
},
|
32815
|
+
{
|
32816
|
+
tx_id: "0x508871600ef68c4f1e021dd0db219c733107151338aa95de530bd10dc61f6a69c144",
|
32817
|
+
output_index: 0,
|
32818
|
+
tx_pointer_block_height: 0,
|
32819
|
+
tx_pointer_tx_idx: 0,
|
32820
|
+
owner: "0x3b24509ed4ab3c7959f5c9391c1445c59290cdb5f13d6f780922f376b7029f30",
|
32821
|
+
amount: 18446744073709552e3,
|
32822
|
+
asset_id: "0x0101010101010101010101010101010101010101010101010101010101010101"
|
32823
|
+
},
|
32824
|
+
{
|
32825
|
+
tx_id: "0x509994738b4973e2dbbff9596b176a89fb07ee95f0ed575a4fe07a735a2a181f3200",
|
32826
|
+
output_index: 0,
|
32827
|
+
tx_pointer_block_height: 0,
|
32828
|
+
tx_pointer_tx_idx: 0,
|
32829
|
+
owner: "0x3b24509ed4ab3c7959f5c9391c1445c59290cdb5f13d6f780922f376b7029f30",
|
32830
|
+
amount: 18446744073709552e3,
|
32831
|
+
asset_id: "0x0202020202020202020202020202020202020202020202020202020202020202"
|
32832
|
+
},
|
32833
|
+
{
|
32834
|
+
tx_id: "0x6cc0cb58df0e0606fc85481aaaf5f47e145a67240b298c184bcb7fd7367c3bbf9453",
|
32835
|
+
output_index: 0,
|
32836
|
+
tx_pointer_block_height: 0,
|
32837
|
+
tx_pointer_tx_idx: 0,
|
32838
|
+
owner: "0x77c6f40b7da70d885f68efaad7c661327482a63ea10dcb4271de819438254ae1",
|
32839
|
+
amount: 18446744073709552e3,
|
32840
|
+
asset_id: "0x0000000000000000000000000000000000000000000000000000000000000000"
|
32841
|
+
},
|
32842
|
+
{
|
32843
|
+
tx_id: "0x9ddea761afc31516307e1553647ac6cc26d4a82fed9a9e6a03b994cdbf2293b3e3b6",
|
32844
|
+
output_index: 0,
|
32845
|
+
tx_pointer_block_height: 0,
|
32846
|
+
tx_pointer_tx_idx: 0,
|
32847
|
+
owner: "0x77c6f40b7da70d885f68efaad7c661327482a63ea10dcb4271de819438254ae1",
|
32848
|
+
amount: 18446744073709552e3,
|
32849
|
+
asset_id: "0x0101010101010101010101010101010101010101010101010101010101010101"
|
32850
|
+
},
|
32851
|
+
{
|
32852
|
+
tx_id: "0x82dbc478ba63abf28b92d9dce0cb8c2e6c02833d436fe812a33cf78417e4a80c1306",
|
32853
|
+
output_index: 0,
|
32854
|
+
tx_pointer_block_height: 0,
|
32855
|
+
tx_pointer_tx_idx: 0,
|
32856
|
+
owner: "0x77c6f40b7da70d885f68efaad7c661327482a63ea10dcb4271de819438254ae1",
|
32857
|
+
amount: 18446744073709552e3,
|
32858
|
+
asset_id: "0x0202020202020202020202020202020202020202020202020202020202020202"
|
32859
|
+
},
|
32860
|
+
{
|
32861
|
+
tx_id: "0xc3b0cb232c74009fd226a6246403f78bcc33d116579f41d9387c0d76c76942749c7c",
|
32862
|
+
output_index: 0,
|
32863
|
+
tx_pointer_block_height: 0,
|
32864
|
+
tx_pointer_tx_idx: 0,
|
32865
|
+
owner: "0x6a2c4691c547c43924650dbd30620b184b5fe3fb6dbe5c4446110b08f6f405bf",
|
32866
|
+
amount: 18446744073709552e3,
|
32867
|
+
asset_id: "0x0000000000000000000000000000000000000000000000000000000000000000"
|
32868
|
+
},
|
32869
|
+
{
|
32870
|
+
tx_id: "0x708ee45d18f94ab06458712745c92c7b9b6049ba345219d6697eae5208ec0328aeaf",
|
32871
|
+
output_index: 0,
|
32872
|
+
tx_pointer_block_height: 0,
|
32873
|
+
tx_pointer_tx_idx: 0,
|
32874
|
+
owner: "0x6a2c4691c547c43924650dbd30620b184b5fe3fb6dbe5c4446110b08f6f405bf",
|
32875
|
+
amount: 18446744073709552e3,
|
32876
|
+
asset_id: "0x0101010101010101010101010101010101010101010101010101010101010101"
|
32877
|
+
},
|
32878
|
+
{
|
32879
|
+
tx_id: "0xfe26968c44ac5becc608ce543075ae9e677b7631f3beb7a11ba20703fdca3c0e3569",
|
32880
|
+
output_index: 0,
|
32881
|
+
tx_pointer_block_height: 0,
|
32882
|
+
tx_pointer_tx_idx: 0,
|
32883
|
+
owner: "0x6a2c4691c547c43924650dbd30620b184b5fe3fb6dbe5c4446110b08f6f405bf",
|
32884
|
+
amount: 18446744073709552e3,
|
32885
|
+
asset_id: "0x0202020202020202020202020202020202020202020202020202020202020202"
|
32886
|
+
},
|
32887
|
+
{
|
32888
|
+
tx_id: "0xe0ec1d2c991feac69be4d0e84ad7c964616de08e16dccc4d2000b1900ba31082b993",
|
32889
|
+
output_index: 0,
|
32890
|
+
tx_pointer_block_height: 0,
|
32891
|
+
tx_pointer_tx_idx: 0,
|
32892
|
+
owner: "0x49075a7538e2c88ebe1926ce4d898198a2a4e790d14512943a9864bc536b3c82",
|
32893
|
+
amount: 18446744073709552e3,
|
32894
|
+
asset_id: "0x0000000000000000000000000000000000000000000000000000000000000000"
|
32895
|
+
},
|
32896
|
+
{
|
32897
|
+
tx_id: "0xfa82dbdd72252d1e6c76ee818bbac0441c3a705aff447f041c8b9fc3cb03f9ccd7e2",
|
32898
|
+
output_index: 0,
|
32899
|
+
tx_pointer_block_height: 0,
|
32900
|
+
tx_pointer_tx_idx: 0,
|
32901
|
+
owner: "0x49075a7538e2c88ebe1926ce4d898198a2a4e790d14512943a9864bc536b3c82",
|
32902
|
+
amount: 18446744073709552e3,
|
32903
|
+
asset_id: "0x0101010101010101010101010101010101010101010101010101010101010101"
|
32904
|
+
},
|
32905
|
+
{
|
32906
|
+
tx_id: "0x324f45e47cef892ac3e0759f3b72207c77046f9938267af4bd4af2ae031b97cb36c8",
|
32907
|
+
output_index: 0,
|
32908
|
+
tx_pointer_block_height: 0,
|
32909
|
+
tx_pointer_tx_idx: 0,
|
32910
|
+
owner: "0x49075a7538e2c88ebe1926ce4d898198a2a4e790d14512943a9864bc536b3c82",
|
32911
|
+
amount: 18446744073709552e3,
|
32912
|
+
asset_id: "0x0202020202020202020202020202020202020202020202020202020202020202"
|
32706
32913
|
}
|
32707
|
-
|
32914
|
+
],
|
32915
|
+
messages: [
|
32916
|
+
{
|
32917
|
+
sender: "0xc43454aa38dd91f88109a4b7aef5efb96ce34e3f24992fe0f81d233ca686f80f",
|
32918
|
+
recipient: "0x69a2b736b60159b43bb8a4f98c0589f6da5fa3a3d101e8e269c499eb942753ba",
|
32919
|
+
nonce: "0101010101010101010101010101010101010101010101010101010101010101",
|
32920
|
+
amount: 18446744073709552e3,
|
32921
|
+
data: "",
|
32922
|
+
da_height: 0
|
32923
|
+
},
|
32924
|
+
{
|
32925
|
+
sender: "0x69a2b736b60159b43bb8a4f98c0589f6da5fa3a3d101e8e269c499eb942753ba",
|
32926
|
+
recipient: "0xc43454aa38dd91f88109a4b7aef5efb96ce34e3f24992fe0f81d233ca686f80f",
|
32927
|
+
nonce: "0e1ef2963832068b0e1ef2963832068b0e1ef2963832068b0e1ef2963832068b",
|
32928
|
+
amount: 12704439083013452e3,
|
32929
|
+
data: "",
|
32930
|
+
da_height: 0
|
32931
|
+
}
|
32932
|
+
],
|
32933
|
+
contracts: [],
|
32934
|
+
block_height: 0,
|
32935
|
+
da_block_height: 0
|
32936
|
+
};
|
32937
|
+
var defaultChainConfigs = {
|
32938
|
+
chainConfigJson: chainConfig_default,
|
32939
|
+
metadataJson: metadata_default,
|
32940
|
+
stateConfigJson: stateConfig_default
|
32708
32941
|
};
|
32709
|
-
var defaultChainConfig = chainConfig_default;
|
32710
32942
|
var defaultConsensusKey = "0xa449b1ffee0e2205fa924c6740cc48b3b473aa28587df6dab12abc245d1f5298";
|
32711
32943
|
|
32712
32944
|
// ../crypto/dist/index.mjs
|
32713
|
-
var
|
32945
|
+
var import_crypto9 = __toESM(__require("crypto"), 1);
|
32714
32946
|
|
32715
32947
|
// ../../node_modules/.pnpm/ethers@6.7.1/node_modules/ethers/lib.esm/_version.js
|
32716
32948
|
var version = "6.7.1";
|
@@ -33782,6 +34014,27 @@ This unreleased fuel-core build may include features and updates not yet support
|
|
33782
34014
|
};
|
33783
34015
|
Object.freeze(pbkdf22);
|
33784
34016
|
|
34017
|
+
// ../../node_modules/.pnpm/ethers@6.7.1/node_modules/ethers/lib.esm/crypto/random.js
|
34018
|
+
var locked5 = false;
|
34019
|
+
var _randomBytes = function(length) {
|
34020
|
+
return new Uint8Array((0, import_crypto2.randomBytes)(length));
|
34021
|
+
};
|
34022
|
+
var __randomBytes = _randomBytes;
|
34023
|
+
function randomBytes3(length) {
|
34024
|
+
return __randomBytes(length);
|
34025
|
+
}
|
34026
|
+
randomBytes3._ = _randomBytes;
|
34027
|
+
randomBytes3.lock = function() {
|
34028
|
+
locked5 = true;
|
34029
|
+
};
|
34030
|
+
randomBytes3.register = function(func) {
|
34031
|
+
if (locked5) {
|
34032
|
+
throw new Error("randomBytes is locked");
|
34033
|
+
}
|
34034
|
+
__randomBytes = func;
|
34035
|
+
};
|
34036
|
+
Object.freeze(randomBytes3);
|
34037
|
+
|
33785
34038
|
// ../../node_modules/.pnpm/ethers@6.7.1/node_modules/ethers/lib.esm/address/address.js
|
33786
34039
|
var BN_03 = BigInt(0);
|
33787
34040
|
var BN_36 = BigInt(36);
|
@@ -34366,8 +34619,8 @@ This unreleased fuel-core build may include features and updates not yet support
|
|
34366
34619
|
}
|
34367
34620
|
|
34368
34621
|
// ../crypto/dist/index.mjs
|
34369
|
-
var import_crypto9 = __toESM(__require("crypto"), 1);
|
34370
34622
|
var import_crypto10 = __toESM(__require("crypto"), 1);
|
34623
|
+
var import_crypto11 = __toESM(__require("crypto"), 1);
|
34371
34624
|
var scrypt3 = (params) => {
|
34372
34625
|
const { password, salt, n, p, r, dklen } = params;
|
34373
34626
|
const derivedKey = scrypt(password, salt, { N: n, r, p, dkLen: dklen });
|
@@ -34376,7 +34629,7 @@ This unreleased fuel-core build may include features and updates not yet support
|
|
34376
34629
|
var keccak2562 = (data) => keccak_256(data);
|
34377
34630
|
var bufferFromString = (string, encoding = "base64") => Uint8Array.from(Buffer.from(string, encoding));
|
34378
34631
|
var randomBytes4 = (length) => {
|
34379
|
-
const randomValues = Uint8Array.from(
|
34632
|
+
const randomValues = Uint8Array.from(import_crypto10.default.randomBytes(length));
|
34380
34633
|
return randomValues;
|
34381
34634
|
};
|
34382
34635
|
var stringFromBuffer = (buffer, encoding = "base64") => Buffer.from(buffer).toString(encoding);
|
@@ -34391,7 +34644,7 @@ This unreleased fuel-core build may include features and updates not yet support
|
|
34391
34644
|
const salt = randomBytes4(32);
|
34392
34645
|
const secret = keyFromPassword(password, salt);
|
34393
34646
|
const dataBuffer = Uint8Array.from(Buffer.from(JSON.stringify(data), "utf-8"));
|
34394
|
-
const cipher = await
|
34647
|
+
const cipher = await import_crypto9.default.createCipheriv(ALGORITHM, secret, iv);
|
34395
34648
|
let cipherData = cipher.update(dataBuffer);
|
34396
34649
|
cipherData = Buffer.concat([cipherData, cipher.final()]);
|
34397
34650
|
return {
|
@@ -34405,7 +34658,7 @@ This unreleased fuel-core build may include features and updates not yet support
|
|
34405
34658
|
const salt = bufferFromString(keystore.salt);
|
34406
34659
|
const secret = keyFromPassword(password, salt);
|
34407
34660
|
const encryptedText = bufferFromString(keystore.data);
|
34408
|
-
const decipher = await
|
34661
|
+
const decipher = await import_crypto9.default.createDecipheriv(ALGORITHM, secret, iv);
|
34409
34662
|
const decrypted = decipher.update(encryptedText);
|
34410
34663
|
const deBuff = Buffer.concat([decrypted, decipher.final()]);
|
34411
34664
|
const decryptedData = Buffer.from(deBuff).toString("utf-8");
|
@@ -34416,12 +34669,12 @@ This unreleased fuel-core build may include features and updates not yet support
|
|
34416
34669
|
}
|
34417
34670
|
};
|
34418
34671
|
async function encryptJsonWalletData(data, key, iv) {
|
34419
|
-
const cipher = await
|
34672
|
+
const cipher = await import_crypto11.default.createCipheriv("aes-128-ctr", key.subarray(0, 16), iv);
|
34420
34673
|
const encrypted = Buffer.concat([cipher.update(data), cipher.final()]);
|
34421
34674
|
return new Uint8Array(encrypted);
|
34422
34675
|
}
|
34423
34676
|
async function decryptJsonWalletData(data, key, iv) {
|
34424
|
-
const decipher =
|
34677
|
+
const decipher = import_crypto11.default.createDecipheriv("aes-128-ctr", key.subarray(0, 16), iv);
|
34425
34678
|
const decrypted = await Buffer.concat([decipher.update(data), decipher.final()]);
|
34426
34679
|
return new Uint8Array(decrypted);
|
34427
34680
|
}
|
@@ -34755,6 +35008,10 @@ This unreleased fuel-core build may include features and updates not yet support
|
|
34755
35008
|
}
|
34756
35009
|
};
|
34757
35010
|
|
35011
|
+
// ../address/dist/configs.mjs
|
35012
|
+
var ZeroBytes32 = "0x0000000000000000000000000000000000000000000000000000000000000000";
|
35013
|
+
var BaseAssetId = ZeroBytes32;
|
35014
|
+
|
34758
35015
|
// ../math/dist/index.mjs
|
34759
35016
|
var import_bn = __toESM(require_bn(), 1);
|
34760
35017
|
var DEFAULT_PRECISION = 9;
|
@@ -34974,32 +35231,182 @@ This unreleased fuel-core build may include features and updates not yet support
|
|
34974
35231
|
function toBytes3(value, bytesPadding) {
|
34975
35232
|
return bn(value).toBytes(bytesPadding);
|
34976
35233
|
}
|
34977
|
-
|
34978
|
-
|
35234
|
+
|
35235
|
+
// ../../node_modules/.pnpm/ramda@0.29.0/node_modules/ramda/es/internal/_isPlaceholder.js
|
35236
|
+
function _isPlaceholder(a) {
|
35237
|
+
return a != null && typeof a === "object" && a["@@functional/placeholder"] === true;
|
35238
|
+
}
|
35239
|
+
|
35240
|
+
// ../../node_modules/.pnpm/ramda@0.29.0/node_modules/ramda/es/internal/_curry1.js
|
35241
|
+
function _curry1(fn) {
|
35242
|
+
return function f1(a) {
|
35243
|
+
if (arguments.length === 0 || _isPlaceholder(a)) {
|
35244
|
+
return f1;
|
35245
|
+
} else {
|
35246
|
+
return fn.apply(this, arguments);
|
35247
|
+
}
|
35248
|
+
};
|
35249
|
+
}
|
35250
|
+
|
35251
|
+
// ../../node_modules/.pnpm/ramda@0.29.0/node_modules/ramda/es/internal/_isArray.js
|
35252
|
+
var isArray_default = Array.isArray || function _isArray(val) {
|
35253
|
+
return val != null && val.length >= 0 && Object.prototype.toString.call(val) === "[object Array]";
|
35254
|
+
};
|
35255
|
+
|
35256
|
+
// ../../node_modules/.pnpm/ramda@0.29.0/node_modules/ramda/es/type.js
|
35257
|
+
var type = /* @__PURE__ */ _curry1(function type2(val) {
|
35258
|
+
return val === null ? "Null" : val === void 0 ? "Undefined" : Object.prototype.toString.call(val).slice(8, -1);
|
35259
|
+
});
|
35260
|
+
var type_default = type;
|
35261
|
+
|
35262
|
+
// ../../node_modules/.pnpm/ramda@0.29.0/node_modules/ramda/es/internal/_toISOString.js
|
35263
|
+
var pad = function pad2(n) {
|
35264
|
+
return (n < 10 ? "0" : "") + n;
|
35265
|
+
};
|
35266
|
+
var _toISOString = typeof Date.prototype.toISOString === "function" ? function _toISOString2(d) {
|
35267
|
+
return d.toISOString();
|
35268
|
+
} : function _toISOString3(d) {
|
35269
|
+
return d.getUTCFullYear() + "-" + pad(d.getUTCMonth() + 1) + "-" + pad(d.getUTCDate()) + "T" + pad(d.getUTCHours()) + ":" + pad(d.getUTCMinutes()) + ":" + pad(d.getUTCSeconds()) + "." + (d.getUTCMilliseconds() / 1e3).toFixed(3).slice(2, 5) + "Z";
|
35270
|
+
};
|
35271
|
+
|
35272
|
+
// ../../node_modules/.pnpm/ramda@0.29.0/node_modules/ramda/es/internal/_isInteger.js
|
35273
|
+
var isInteger_default = Number.isInteger || function _isInteger(n) {
|
35274
|
+
return n << 0 === n;
|
35275
|
+
};
|
35276
|
+
|
35277
|
+
// ../../node_modules/.pnpm/ramda@0.29.0/node_modules/ramda/es/internal/_cloneRegExp.js
|
35278
|
+
function _cloneRegExp(pattern) {
|
35279
|
+
return new RegExp(pattern.source, pattern.flags ? pattern.flags : (pattern.global ? "g" : "") + (pattern.ignoreCase ? "i" : "") + (pattern.multiline ? "m" : "") + (pattern.sticky ? "y" : "") + (pattern.unicode ? "u" : "") + (pattern.dotAll ? "s" : ""));
|
35280
|
+
}
|
35281
|
+
|
35282
|
+
// ../../node_modules/.pnpm/ramda@0.29.0/node_modules/ramda/es/internal/_clone.js
|
35283
|
+
function _clone(value, deep, map) {
|
35284
|
+
map || (map = new _ObjectMap());
|
35285
|
+
if (_isPrimitive(value)) {
|
35286
|
+
return value;
|
35287
|
+
}
|
35288
|
+
var copy = function copy2(copiedValue) {
|
35289
|
+
var cachedCopy = map.get(value);
|
35290
|
+
if (cachedCopy) {
|
35291
|
+
return cachedCopy;
|
35292
|
+
}
|
35293
|
+
map.set(value, copiedValue);
|
35294
|
+
for (var key in value) {
|
35295
|
+
if (Object.prototype.hasOwnProperty.call(value, key)) {
|
35296
|
+
copiedValue[key] = deep ? _clone(value[key], true, map) : value[key];
|
35297
|
+
}
|
35298
|
+
}
|
35299
|
+
return copiedValue;
|
35300
|
+
};
|
35301
|
+
switch (type_default(value)) {
|
35302
|
+
case "Object":
|
35303
|
+
return copy(Object.create(Object.getPrototypeOf(value)));
|
35304
|
+
case "Array":
|
35305
|
+
return copy([]);
|
35306
|
+
case "Date":
|
35307
|
+
return new Date(value.valueOf());
|
35308
|
+
case "RegExp":
|
35309
|
+
return _cloneRegExp(value);
|
35310
|
+
case "Int8Array":
|
35311
|
+
case "Uint8Array":
|
35312
|
+
case "Uint8ClampedArray":
|
35313
|
+
case "Int16Array":
|
35314
|
+
case "Uint16Array":
|
35315
|
+
case "Int32Array":
|
35316
|
+
case "Uint32Array":
|
35317
|
+
case "Float32Array":
|
35318
|
+
case "Float64Array":
|
35319
|
+
case "BigInt64Array":
|
35320
|
+
case "BigUint64Array":
|
35321
|
+
return value.slice();
|
35322
|
+
default:
|
35323
|
+
return value;
|
35324
|
+
}
|
35325
|
+
}
|
35326
|
+
function _isPrimitive(param) {
|
35327
|
+
var type3 = typeof param;
|
35328
|
+
return param == null || type3 != "object" && type3 != "function";
|
34979
35329
|
}
|
35330
|
+
var _ObjectMap = /* @__PURE__ */ function() {
|
35331
|
+
function _ObjectMap2() {
|
35332
|
+
this.map = {};
|
35333
|
+
this.length = 0;
|
35334
|
+
}
|
35335
|
+
_ObjectMap2.prototype.set = function(key, value) {
|
35336
|
+
const hashedKey = this.hash(key);
|
35337
|
+
let bucket = this.map[hashedKey];
|
35338
|
+
if (!bucket) {
|
35339
|
+
this.map[hashedKey] = bucket = [];
|
35340
|
+
}
|
35341
|
+
bucket.push([key, value]);
|
35342
|
+
this.length += 1;
|
35343
|
+
};
|
35344
|
+
_ObjectMap2.prototype.hash = function(key) {
|
35345
|
+
let hashedKey = [];
|
35346
|
+
for (var value in key) {
|
35347
|
+
hashedKey.push(Object.prototype.toString.call(key[value]));
|
35348
|
+
}
|
35349
|
+
return hashedKey.join();
|
35350
|
+
};
|
35351
|
+
_ObjectMap2.prototype.get = function(key) {
|
35352
|
+
if (this.length <= 180) {
|
35353
|
+
for (const p in this.map) {
|
35354
|
+
const bucket2 = this.map[p];
|
35355
|
+
for (let i = 0; i < bucket2.length; i += 1) {
|
35356
|
+
const element = bucket2[i];
|
35357
|
+
if (element[0] === key) {
|
35358
|
+
return element[1];
|
35359
|
+
}
|
35360
|
+
}
|
35361
|
+
}
|
35362
|
+
return;
|
35363
|
+
}
|
35364
|
+
const hashedKey = this.hash(key);
|
35365
|
+
const bucket = this.map[hashedKey];
|
35366
|
+
if (!bucket) {
|
35367
|
+
return;
|
35368
|
+
}
|
35369
|
+
for (let i = 0; i < bucket.length; i += 1) {
|
35370
|
+
const element = bucket[i];
|
35371
|
+
if (element[0] === key) {
|
35372
|
+
return element[1];
|
35373
|
+
}
|
35374
|
+
}
|
35375
|
+
};
|
35376
|
+
return _ObjectMap2;
|
35377
|
+
}();
|
35378
|
+
|
35379
|
+
// ../../node_modules/.pnpm/ramda@0.29.0/node_modules/ramda/es/clone.js
|
35380
|
+
var clone = /* @__PURE__ */ _curry1(function clone2(value) {
|
35381
|
+
return value != null && typeof value.clone === "function" ? value.clone() : _clone(value, true);
|
35382
|
+
});
|
35383
|
+
var clone_default = clone;
|
35384
|
+
|
35385
|
+
// ../../node_modules/.pnpm/ramda@0.29.0/node_modules/ramda/es/trim.js
|
35386
|
+
var hasProtoTrim = typeof String.prototype.trim === "function";
|
34980
35387
|
|
34981
35388
|
// src/providers/coin-quantity.ts
|
34982
35389
|
var coinQuantityfy = (coinQuantityLike) => {
|
34983
35390
|
let assetId;
|
34984
35391
|
let amount;
|
34985
|
-
let
|
35392
|
+
let max;
|
34986
35393
|
if (Array.isArray(coinQuantityLike)) {
|
34987
35394
|
amount = coinQuantityLike[0];
|
34988
|
-
assetId = coinQuantityLike[1];
|
34989
|
-
|
35395
|
+
assetId = coinQuantityLike[1] ?? BaseAssetId;
|
35396
|
+
max = coinQuantityLike[2] ?? void 0;
|
34990
35397
|
} else {
|
34991
35398
|
amount = coinQuantityLike.amount;
|
34992
|
-
assetId = coinQuantityLike.assetId;
|
34993
|
-
|
35399
|
+
assetId = coinQuantityLike.assetId ?? BaseAssetId;
|
35400
|
+
max = coinQuantityLike.max ?? void 0;
|
34994
35401
|
}
|
34995
35402
|
const bnAmount = bn(amount);
|
34996
35403
|
return {
|
34997
35404
|
assetId: hexlify(assetId),
|
34998
35405
|
amount: bnAmount.lt(1) ? bn(1) : bnAmount,
|
34999
|
-
max:
|
35406
|
+
max: max ? bn(max) : void 0
|
35000
35407
|
};
|
35001
35408
|
};
|
35002
|
-
var
|
35409
|
+
var addAmountToCoinQuantities = (params) => {
|
35003
35410
|
const { amount, assetId } = params;
|
35004
35411
|
const coinQuantities = [...params.coinQuantities];
|
35005
35412
|
const assetIdx = coinQuantities.findIndex((coinQuantity) => coinQuantity.assetId === assetId);
|
@@ -35073,9 +35480,9 @@ This unreleased fuel-core build may include features and updates not yet support
|
|
35073
35480
|
var TX_POINTER_LEN = WORD_SIZE * 2;
|
35074
35481
|
var MAX_BYTES = 2 ** 32 - 1;
|
35075
35482
|
var calculateVmTxMemory = ({ maxInputs }) => BYTES_32 + // Tx ID
|
35076
|
-
|
35483
|
+
ASSET_ID_LEN + // Base asset ID
|
35077
35484
|
// Asset ID/Balance coin input pairs
|
35078
|
-
maxInputs * (ASSET_ID_LEN + WORD_SIZE);
|
35485
|
+
maxInputs * (ASSET_ID_LEN + WORD_SIZE) + WORD_SIZE;
|
35079
35486
|
var SCRIPT_FIXED_SIZE = WORD_SIZE + // Identifier
|
35080
35487
|
WORD_SIZE + // Gas limit
|
35081
35488
|
WORD_SIZE + // Script size
|
@@ -35093,7 +35500,6 @@ This unreleased fuel-core build may include features and updates not yet support
|
|
35093
35500
|
ASSET_ID_LEN + // Asset id
|
35094
35501
|
TX_POINTER_LEN + // TxPointer
|
35095
35502
|
WORD_SIZE + // Witnesses index
|
35096
|
-
WORD_SIZE + // Maturity
|
35097
35503
|
WORD_SIZE + // Predicate size
|
35098
35504
|
WORD_SIZE + // Predicate data size
|
35099
35505
|
WORD_SIZE;
|
@@ -35423,7 +35829,7 @@ This unreleased fuel-core build may include features and updates not yet support
|
|
35423
35829
|
constructor(name, coders) {
|
35424
35830
|
const caseIndexCoder = new BigNumberCoder("u64");
|
35425
35831
|
const encodedValueSize = Object.values(coders).reduce(
|
35426
|
-
(
|
35832
|
+
(max, coder) => Math.max(max, coder.encodedLength),
|
35427
35833
|
0
|
35428
35834
|
);
|
35429
35835
|
super(`enum ${name}`, `enum ${name}`, caseIndexCoder.encodedLength + encodedValueSize);
|
@@ -36110,7 +36516,7 @@ This unreleased fuel-core build may include features and updates not yet support
|
|
36110
36516
|
constructor(name, coders) {
|
36111
36517
|
const caseIndexCoder = new BigNumberCoder("u64");
|
36112
36518
|
const encodedValueSize = Object.values(coders).reduce(
|
36113
|
-
(
|
36519
|
+
(max, coder) => Math.max(max, coder.encodedLength),
|
36114
36520
|
0
|
36115
36521
|
);
|
36116
36522
|
super(`enum ${name}`, `enum ${name}`, caseIndexCoder.encodedLength + encodedValueSize);
|
@@ -36833,18 +37239,19 @@ This unreleased fuel-core build may include features and updates not yet support
|
|
36833
37239
|
encode(value) {
|
36834
37240
|
const parts = [];
|
36835
37241
|
parts.push(new B256Coder().encode(value.txID));
|
36836
|
-
parts.push(new NumberCoder("
|
37242
|
+
parts.push(new NumberCoder("u16").encode(value.outputIndex));
|
36837
37243
|
parts.push(new B256Coder().encode(value.owner));
|
36838
37244
|
parts.push(new BigNumberCoder("u64").encode(value.amount));
|
36839
37245
|
parts.push(new B256Coder().encode(value.assetId));
|
36840
37246
|
parts.push(new TxPointerCoder().encode(value.txPointer));
|
36841
|
-
parts.push(new NumberCoder("
|
36842
|
-
parts.push(new NumberCoder("u32").encode(value.maturity));
|
37247
|
+
parts.push(new NumberCoder("u16").encode(value.witnessIndex));
|
36843
37248
|
parts.push(new BigNumberCoder("u64").encode(value.predicateGasUsed));
|
36844
|
-
parts.push(new
|
36845
|
-
parts.push(new
|
36846
|
-
parts.push(new ByteArrayCoder(value.predicateLength).encode(value.predicate));
|
36847
|
-
parts.push(
|
37249
|
+
parts.push(new BigNumberCoder("u64").encode(value.predicateLength));
|
37250
|
+
parts.push(new BigNumberCoder("u64").encode(value.predicateDataLength));
|
37251
|
+
parts.push(new ByteArrayCoder(value.predicateLength.toNumber()).encode(value.predicate));
|
37252
|
+
parts.push(
|
37253
|
+
new ByteArrayCoder(value.predicateDataLength.toNumber()).encode(value.predicateData)
|
37254
|
+
);
|
36848
37255
|
return concat(parts);
|
36849
37256
|
}
|
36850
37257
|
decode(data, offset) {
|
@@ -36852,7 +37259,7 @@ This unreleased fuel-core build may include features and updates not yet support
|
|
36852
37259
|
let o = offset;
|
36853
37260
|
[decoded, o] = new B256Coder().decode(data, o);
|
36854
37261
|
const txID = decoded;
|
36855
|
-
[decoded, o] = new NumberCoder("
|
37262
|
+
[decoded, o] = new NumberCoder("u16").decode(data, o);
|
36856
37263
|
const outputIndex = decoded;
|
36857
37264
|
[decoded, o] = new B256Coder().decode(data, o);
|
36858
37265
|
const owner = decoded;
|
@@ -36862,19 +37269,17 @@ This unreleased fuel-core build may include features and updates not yet support
|
|
36862
37269
|
const assetId = decoded;
|
36863
37270
|
[decoded, o] = new TxPointerCoder().decode(data, o);
|
36864
37271
|
const txPointer = decoded;
|
36865
|
-
[decoded, o] = new NumberCoder("
|
37272
|
+
[decoded, o] = new NumberCoder("u16").decode(data, o);
|
36866
37273
|
const witnessIndex = Number(decoded);
|
36867
|
-
[decoded, o] = new NumberCoder("u32").decode(data, o);
|
36868
|
-
const maturity = decoded;
|
36869
37274
|
[decoded, o] = new BigNumberCoder("u64").decode(data, o);
|
36870
37275
|
const predicateGasUsed = decoded;
|
36871
|
-
[decoded, o] = new
|
37276
|
+
[decoded, o] = new BigNumberCoder("u64").decode(data, o);
|
36872
37277
|
const predicateLength = decoded;
|
36873
|
-
[decoded, o] = new
|
37278
|
+
[decoded, o] = new BigNumberCoder("u64").decode(data, o);
|
36874
37279
|
const predicateDataLength = decoded;
|
36875
|
-
[decoded, o] = new ByteArrayCoder(predicateLength).decode(data, o);
|
37280
|
+
[decoded, o] = new ByteArrayCoder(predicateLength.toNumber()).decode(data, o);
|
36876
37281
|
const predicate = decoded;
|
36877
|
-
[decoded, o] = new ByteArrayCoder(predicateDataLength).decode(data, o);
|
37282
|
+
[decoded, o] = new ByteArrayCoder(predicateDataLength.toNumber()).decode(data, o);
|
36878
37283
|
const predicateData = decoded;
|
36879
37284
|
return [
|
36880
37285
|
{
|
@@ -36886,7 +37291,6 @@ This unreleased fuel-core build may include features and updates not yet support
|
|
36886
37291
|
assetId,
|
36887
37292
|
txPointer,
|
36888
37293
|
witnessIndex,
|
36889
|
-
maturity,
|
36890
37294
|
predicateGasUsed,
|
36891
37295
|
predicateLength,
|
36892
37296
|
predicateDataLength,
|
@@ -36904,7 +37308,7 @@ This unreleased fuel-core build may include features and updates not yet support
|
|
36904
37308
|
encode(value) {
|
36905
37309
|
const parts = [];
|
36906
37310
|
parts.push(new B256Coder().encode(value.txID));
|
36907
|
-
parts.push(new NumberCoder("
|
37311
|
+
parts.push(new NumberCoder("u16").encode(value.outputIndex));
|
36908
37312
|
parts.push(new B256Coder().encode(value.balanceRoot));
|
36909
37313
|
parts.push(new B256Coder().encode(value.stateRoot));
|
36910
37314
|
parts.push(new TxPointerCoder().encode(value.txPointer));
|
@@ -36916,7 +37320,7 @@ This unreleased fuel-core build may include features and updates not yet support
|
|
36916
37320
|
let o = offset;
|
36917
37321
|
[decoded, o] = new B256Coder().decode(data, o);
|
36918
37322
|
const txID = decoded;
|
36919
|
-
[decoded, o] = new NumberCoder("
|
37323
|
+
[decoded, o] = new NumberCoder("u16").decode(data, o);
|
36920
37324
|
const outputIndex = decoded;
|
36921
37325
|
[decoded, o] = new B256Coder().decode(data, o);
|
36922
37326
|
const balanceRoot = decoded;
|
@@ -36965,14 +37369,16 @@ This unreleased fuel-core build may include features and updates not yet support
|
|
36965
37369
|
parts.push(new ByteArrayCoder(32).encode(value.recipient));
|
36966
37370
|
parts.push(new BigNumberCoder("u64").encode(value.amount));
|
36967
37371
|
parts.push(new ByteArrayCoder(32).encode(value.nonce));
|
36968
|
-
parts.push(new NumberCoder("
|
37372
|
+
parts.push(new NumberCoder("u16").encode(value.witnessIndex));
|
36969
37373
|
parts.push(new BigNumberCoder("u64").encode(value.predicateGasUsed));
|
36970
|
-
parts.push(new
|
36971
|
-
parts.push(new
|
36972
|
-
parts.push(new
|
37374
|
+
parts.push(new BigNumberCoder("u64").encode(data.length));
|
37375
|
+
parts.push(new BigNumberCoder("u64").encode(value.predicateLength));
|
37376
|
+
parts.push(new BigNumberCoder("u64").encode(value.predicateDataLength));
|
36973
37377
|
parts.push(new ByteArrayCoder(data.length).encode(data));
|
36974
|
-
parts.push(new ByteArrayCoder(value.predicateLength).encode(value.predicate));
|
36975
|
-
parts.push(
|
37378
|
+
parts.push(new ByteArrayCoder(value.predicateLength.toNumber()).encode(value.predicate));
|
37379
|
+
parts.push(
|
37380
|
+
new ByteArrayCoder(value.predicateDataLength.toNumber()).encode(value.predicateData)
|
37381
|
+
);
|
36976
37382
|
return concat(parts);
|
36977
37383
|
}
|
36978
37384
|
static decodeData(messageData) {
|
@@ -36992,21 +37398,21 @@ This unreleased fuel-core build may include features and updates not yet support
|
|
36992
37398
|
const amount = decoded;
|
36993
37399
|
[decoded, o] = new B256Coder().decode(data, o);
|
36994
37400
|
const nonce = decoded;
|
36995
|
-
[decoded, o] = new NumberCoder("
|
37401
|
+
[decoded, o] = new NumberCoder("u16").decode(data, o);
|
36996
37402
|
const witnessIndex = Number(decoded);
|
36997
37403
|
[decoded, o] = new BigNumberCoder("u64").decode(data, o);
|
36998
37404
|
const predicateGasUsed = decoded;
|
36999
37405
|
[decoded, o] = new NumberCoder("u32").decode(data, o);
|
37000
37406
|
const dataLength2 = decoded;
|
37001
|
-
[decoded, o] = new
|
37407
|
+
[decoded, o] = new BigNumberCoder("u64").decode(data, o);
|
37002
37408
|
const predicateLength = decoded;
|
37003
|
-
[decoded, o] = new
|
37409
|
+
[decoded, o] = new BigNumberCoder("u64").decode(data, o);
|
37004
37410
|
const predicateDataLength = decoded;
|
37005
37411
|
[decoded, o] = new ByteArrayCoder(dataLength2).decode(data, o);
|
37006
37412
|
const messageData = decoded;
|
37007
|
-
[decoded, o] = new ByteArrayCoder(predicateLength).decode(data, o);
|
37413
|
+
[decoded, o] = new ByteArrayCoder(predicateLength.toNumber()).decode(data, o);
|
37008
37414
|
const predicate = decoded;
|
37009
|
-
[decoded, o] = new ByteArrayCoder(predicateDataLength).decode(data, o);
|
37415
|
+
[decoded, o] = new ByteArrayCoder(predicateDataLength.toNumber()).decode(data, o);
|
37010
37416
|
const predicateData = decoded;
|
37011
37417
|
return [
|
37012
37418
|
{
|
@@ -37318,7 +37724,7 @@ This unreleased fuel-core build may include features and updates not yet support
|
|
37318
37724
|
}
|
37319
37725
|
};
|
37320
37726
|
var PolicyType = /* @__PURE__ */ ((PolicyType2) => {
|
37321
|
-
PolicyType2[PolicyType2["
|
37727
|
+
PolicyType2[PolicyType2["Tip"] = 1] = "Tip";
|
37322
37728
|
PolicyType2[PolicyType2["WitnessLimit"] = 2] = "WitnessLimit";
|
37323
37729
|
PolicyType2[PolicyType2["Maturity"] = 4] = "Maturity";
|
37324
37730
|
PolicyType2[PolicyType2["MaxFee"] = 8] = "MaxFee";
|
@@ -37366,9 +37772,9 @@ This unreleased fuel-core build may include features and updates not yet support
|
|
37366
37772
|
let o = offset;
|
37367
37773
|
const policies = [];
|
37368
37774
|
if (policyTypes & 1) {
|
37369
|
-
const [
|
37775
|
+
const [tip, nextOffset] = new BigNumberCoder("u64").decode(data, o);
|
37370
37776
|
o = nextOffset;
|
37371
|
-
policies.push({ type: 1, data:
|
37777
|
+
policies.push({ type: 1, data: tip });
|
37372
37778
|
}
|
37373
37779
|
if (policyTypes & 2) {
|
37374
37780
|
const [witnessLimit, nextOffset] = new BigNumberCoder("u64").decode(data, o);
|
@@ -37600,15 +38006,15 @@ This unreleased fuel-core build may include features and updates not yet support
|
|
37600
38006
|
encode(value) {
|
37601
38007
|
const parts = [];
|
37602
38008
|
parts.push(new BigNumberCoder("u64").encode(value.scriptGasLimit));
|
37603
|
-
parts.push(new NumberCoder("u32").encode(value.scriptLength));
|
37604
|
-
parts.push(new NumberCoder("u32").encode(value.scriptDataLength));
|
37605
|
-
parts.push(new NumberCoder("u32").encode(value.policyTypes));
|
37606
|
-
parts.push(new NumberCoder("u8").encode(value.inputsCount));
|
37607
|
-
parts.push(new NumberCoder("u8").encode(value.outputsCount));
|
37608
|
-
parts.push(new NumberCoder("u8").encode(value.witnessesCount));
|
37609
38009
|
parts.push(new B256Coder().encode(value.receiptsRoot));
|
37610
|
-
parts.push(new
|
37611
|
-
parts.push(new
|
38010
|
+
parts.push(new BigNumberCoder("u64").encode(value.scriptLength));
|
38011
|
+
parts.push(new BigNumberCoder("u64").encode(value.scriptDataLength));
|
38012
|
+
parts.push(new NumberCoder("u32").encode(value.policyTypes));
|
38013
|
+
parts.push(new NumberCoder("u16").encode(value.inputsCount));
|
38014
|
+
parts.push(new NumberCoder("u16").encode(value.outputsCount));
|
38015
|
+
parts.push(new NumberCoder("u16").encode(value.witnessesCount));
|
38016
|
+
parts.push(new ByteArrayCoder(value.scriptLength.toNumber()).encode(value.script));
|
38017
|
+
parts.push(new ByteArrayCoder(value.scriptDataLength.toNumber()).encode(value.scriptData));
|
37612
38018
|
parts.push(new PoliciesCoder().encode(value.policies));
|
37613
38019
|
parts.push(new ArrayCoder(new InputCoder(), value.inputsCount).encode(value.inputs));
|
37614
38020
|
parts.push(new ArrayCoder(new OutputCoder(), value.outputsCount).encode(value.outputs));
|
@@ -37620,23 +38026,23 @@ This unreleased fuel-core build may include features and updates not yet support
|
|
37620
38026
|
let o = offset;
|
37621
38027
|
[decoded, o] = new BigNumberCoder("u64").decode(data, o);
|
37622
38028
|
const scriptGasLimit = decoded;
|
37623
|
-
[decoded, o] = new
|
38029
|
+
[decoded, o] = new B256Coder().decode(data, o);
|
38030
|
+
const receiptsRoot = decoded;
|
38031
|
+
[decoded, o] = new BigNumberCoder("u64").decode(data, o);
|
37624
38032
|
const scriptLength = decoded;
|
37625
|
-
[decoded, o] = new
|
38033
|
+
[decoded, o] = new BigNumberCoder("u64").decode(data, o);
|
37626
38034
|
const scriptDataLength = decoded;
|
37627
38035
|
[decoded, o] = new NumberCoder("u32").decode(data, o);
|
37628
38036
|
const policyTypes = decoded;
|
37629
|
-
[decoded, o] = new NumberCoder("
|
38037
|
+
[decoded, o] = new NumberCoder("u16").decode(data, o);
|
37630
38038
|
const inputsCount = decoded;
|
37631
|
-
[decoded, o] = new NumberCoder("
|
38039
|
+
[decoded, o] = new NumberCoder("u16").decode(data, o);
|
37632
38040
|
const outputsCount = decoded;
|
37633
|
-
[decoded, o] = new NumberCoder("
|
38041
|
+
[decoded, o] = new NumberCoder("u16").decode(data, o);
|
37634
38042
|
const witnessesCount = decoded;
|
37635
|
-
[decoded, o] = new
|
37636
|
-
const receiptsRoot = decoded;
|
37637
|
-
[decoded, o] = new ByteArrayCoder(scriptLength).decode(data, o);
|
38043
|
+
[decoded, o] = new ByteArrayCoder(scriptLength.toNumber()).decode(data, o);
|
37638
38044
|
const script = decoded;
|
37639
|
-
[decoded, o] = new ByteArrayCoder(scriptDataLength).decode(data, o);
|
38045
|
+
[decoded, o] = new ByteArrayCoder(scriptDataLength.toNumber()).decode(data, o);
|
37640
38046
|
const scriptData = decoded;
|
37641
38047
|
[decoded, o] = new PoliciesCoder().decode(data, o, policyTypes);
|
37642
38048
|
const policies = decoded;
|
@@ -37674,18 +38080,19 @@ This unreleased fuel-core build may include features and updates not yet support
|
|
37674
38080
|
}
|
37675
38081
|
encode(value) {
|
37676
38082
|
const parts = [];
|
37677
|
-
parts.push(new NumberCoder("
|
37678
|
-
parts.push(new NumberCoder("u8").encode(value.bytecodeWitnessIndex));
|
37679
|
-
parts.push(new NumberCoder("u32").encode(value.policyTypes));
|
37680
|
-
parts.push(new NumberCoder("u16").encode(value.storageSlotsCount));
|
37681
|
-
parts.push(new NumberCoder("u8").encode(value.inputsCount));
|
37682
|
-
parts.push(new NumberCoder("u8").encode(value.outputsCount));
|
37683
|
-
parts.push(new NumberCoder("u8").encode(value.witnessesCount));
|
38083
|
+
parts.push(new NumberCoder("u16").encode(value.bytecodeWitnessIndex));
|
37684
38084
|
parts.push(new B256Coder().encode(value.salt));
|
37685
|
-
parts.push(new
|
38085
|
+
parts.push(new BigNumberCoder("u64").encode(value.storageSlotsCount));
|
38086
|
+
parts.push(new NumberCoder("u32").encode(value.policyTypes));
|
38087
|
+
parts.push(new NumberCoder("u16").encode(value.inputsCount));
|
38088
|
+
parts.push(new NumberCoder("u16").encode(value.outputsCount));
|
38089
|
+
parts.push(new NumberCoder("u16").encode(value.witnessesCount));
|
37686
38090
|
parts.push(
|
37687
|
-
new ArrayCoder(new StorageSlotCoder(), value.storageSlotsCount).encode(
|
38091
|
+
new ArrayCoder(new StorageSlotCoder(), value.storageSlotsCount.toNumber()).encode(
|
38092
|
+
value.storageSlots
|
38093
|
+
)
|
37688
38094
|
);
|
38095
|
+
parts.push(new PoliciesCoder().encode(value.policies));
|
37689
38096
|
parts.push(new ArrayCoder(new InputCoder(), value.inputsCount).encode(value.inputs));
|
37690
38097
|
parts.push(new ArrayCoder(new OutputCoder(), value.outputsCount).encode(value.outputs));
|
37691
38098
|
parts.push(new ArrayCoder(new WitnessCoder(), value.witnessesCount).encode(value.witnesses));
|
@@ -37694,26 +38101,27 @@ This unreleased fuel-core build may include features and updates not yet support
|
|
37694
38101
|
decode(data, offset) {
|
37695
38102
|
let decoded;
|
37696
38103
|
let o = offset;
|
37697
|
-
[decoded, o] = new NumberCoder("
|
37698
|
-
const bytecodeLength = decoded;
|
37699
|
-
[decoded, o] = new NumberCoder("u8").decode(data, o);
|
38104
|
+
[decoded, o] = new NumberCoder("u16").decode(data, o);
|
37700
38105
|
const bytecodeWitnessIndex = decoded;
|
38106
|
+
[decoded, o] = new B256Coder().decode(data, o);
|
38107
|
+
const salt = decoded;
|
38108
|
+
[decoded, o] = new BigNumberCoder("u64").decode(data, o);
|
38109
|
+
const storageSlotsCount = decoded;
|
37701
38110
|
[decoded, o] = new NumberCoder("u32").decode(data, o);
|
37702
38111
|
const policyTypes = decoded;
|
37703
38112
|
[decoded, o] = new NumberCoder("u16").decode(data, o);
|
37704
|
-
const storageSlotsCount = decoded;
|
37705
|
-
[decoded, o] = new NumberCoder("u8").decode(data, o);
|
37706
38113
|
const inputsCount = decoded;
|
37707
|
-
[decoded, o] = new NumberCoder("
|
38114
|
+
[decoded, o] = new NumberCoder("u16").decode(data, o);
|
37708
38115
|
const outputsCount = decoded;
|
37709
|
-
[decoded, o] = new NumberCoder("
|
38116
|
+
[decoded, o] = new NumberCoder("u16").decode(data, o);
|
37710
38117
|
const witnessesCount = decoded;
|
37711
|
-
[decoded, o] = new
|
37712
|
-
|
38118
|
+
[decoded, o] = new ArrayCoder(new StorageSlotCoder(), storageSlotsCount.toNumber()).decode(
|
38119
|
+
data,
|
38120
|
+
o
|
38121
|
+
);
|
38122
|
+
const storageSlots = decoded;
|
37713
38123
|
[decoded, o] = new PoliciesCoder().decode(data, o, policyTypes);
|
37714
38124
|
const policies = decoded;
|
37715
|
-
[decoded, o] = new ArrayCoder(new StorageSlotCoder(), storageSlotsCount).decode(data, o);
|
37716
|
-
const storageSlots = decoded;
|
37717
38125
|
[decoded, o] = new ArrayCoder(new InputCoder(), inputsCount).decode(data, o);
|
37718
38126
|
const inputs = decoded;
|
37719
38127
|
[decoded, o] = new ArrayCoder(new OutputCoder(), outputsCount).decode(data, o);
|
@@ -37723,7 +38131,6 @@ This unreleased fuel-core build may include features and updates not yet support
|
|
37723
38131
|
return [
|
37724
38132
|
{
|
37725
38133
|
type: 1,
|
37726
|
-
bytecodeLength,
|
37727
38134
|
bytecodeWitnessIndex,
|
37728
38135
|
policyTypes,
|
37729
38136
|
storageSlotsCount,
|
@@ -37752,6 +38159,7 @@ This unreleased fuel-core build may include features and updates not yet support
|
|
37752
38159
|
parts.push(new OutputContractCoder().encode(value.outputContract));
|
37753
38160
|
parts.push(new BigNumberCoder("u64").encode(value.mintAmount));
|
37754
38161
|
parts.push(new B256Coder().encode(value.mintAssetId));
|
38162
|
+
parts.push(new BigNumberCoder("u64").encode(value.gasPrice));
|
37755
38163
|
return concat(parts);
|
37756
38164
|
}
|
37757
38165
|
decode(data, offset) {
|
@@ -37767,6 +38175,8 @@ This unreleased fuel-core build may include features and updates not yet support
|
|
37767
38175
|
const mintAmount = decoded;
|
37768
38176
|
[decoded, o] = new B256Coder().decode(data, o);
|
37769
38177
|
const mintAssetId = decoded;
|
38178
|
+
[decoded, o] = new BigNumberCoder("u64").decode(data, o);
|
38179
|
+
const gasPrice = decoded;
|
37770
38180
|
return [
|
37771
38181
|
{
|
37772
38182
|
type: 2,
|
@@ -37774,7 +38184,8 @@ This unreleased fuel-core build may include features and updates not yet support
|
|
37774
38184
|
inputContract,
|
37775
38185
|
outputContract,
|
37776
38186
|
mintAmount,
|
37777
|
-
mintAssetId
|
38187
|
+
mintAssetId,
|
38188
|
+
gasPrice
|
37778
38189
|
},
|
37779
38190
|
o
|
37780
38191
|
];
|
@@ -38081,159 +38492,6 @@ This unreleased fuel-core build may include features and updates not yet support
|
|
38081
38492
|
// src/providers/provider.ts
|
38082
38493
|
var import_graphql_request = __toESM(require_dist2());
|
38083
38494
|
|
38084
|
-
// ../../node_modules/.pnpm/ramda@0.29.0/node_modules/ramda/es/internal/_isPlaceholder.js
|
38085
|
-
function _isPlaceholder(a) {
|
38086
|
-
return a != null && typeof a === "object" && a["@@functional/placeholder"] === true;
|
38087
|
-
}
|
38088
|
-
|
38089
|
-
// ../../node_modules/.pnpm/ramda@0.29.0/node_modules/ramda/es/internal/_curry1.js
|
38090
|
-
function _curry1(fn) {
|
38091
|
-
return function f1(a) {
|
38092
|
-
if (arguments.length === 0 || _isPlaceholder(a)) {
|
38093
|
-
return f1;
|
38094
|
-
} else {
|
38095
|
-
return fn.apply(this, arguments);
|
38096
|
-
}
|
38097
|
-
};
|
38098
|
-
}
|
38099
|
-
|
38100
|
-
// ../../node_modules/.pnpm/ramda@0.29.0/node_modules/ramda/es/internal/_isArray.js
|
38101
|
-
var isArray_default = Array.isArray || function _isArray(val) {
|
38102
|
-
return val != null && val.length >= 0 && Object.prototype.toString.call(val) === "[object Array]";
|
38103
|
-
};
|
38104
|
-
|
38105
|
-
// ../../node_modules/.pnpm/ramda@0.29.0/node_modules/ramda/es/type.js
|
38106
|
-
var type = /* @__PURE__ */ _curry1(function type2(val) {
|
38107
|
-
return val === null ? "Null" : val === void 0 ? "Undefined" : Object.prototype.toString.call(val).slice(8, -1);
|
38108
|
-
});
|
38109
|
-
var type_default = type;
|
38110
|
-
|
38111
|
-
// ../../node_modules/.pnpm/ramda@0.29.0/node_modules/ramda/es/internal/_toISOString.js
|
38112
|
-
var pad = function pad2(n) {
|
38113
|
-
return (n < 10 ? "0" : "") + n;
|
38114
|
-
};
|
38115
|
-
var _toISOString = typeof Date.prototype.toISOString === "function" ? function _toISOString2(d) {
|
38116
|
-
return d.toISOString();
|
38117
|
-
} : function _toISOString3(d) {
|
38118
|
-
return d.getUTCFullYear() + "-" + pad(d.getUTCMonth() + 1) + "-" + pad(d.getUTCDate()) + "T" + pad(d.getUTCHours()) + ":" + pad(d.getUTCMinutes()) + ":" + pad(d.getUTCSeconds()) + "." + (d.getUTCMilliseconds() / 1e3).toFixed(3).slice(2, 5) + "Z";
|
38119
|
-
};
|
38120
|
-
|
38121
|
-
// ../../node_modules/.pnpm/ramda@0.29.0/node_modules/ramda/es/internal/_isInteger.js
|
38122
|
-
var isInteger_default = Number.isInteger || function _isInteger(n) {
|
38123
|
-
return n << 0 === n;
|
38124
|
-
};
|
38125
|
-
|
38126
|
-
// ../../node_modules/.pnpm/ramda@0.29.0/node_modules/ramda/es/internal/_cloneRegExp.js
|
38127
|
-
function _cloneRegExp(pattern) {
|
38128
|
-
return new RegExp(pattern.source, pattern.flags ? pattern.flags : (pattern.global ? "g" : "") + (pattern.ignoreCase ? "i" : "") + (pattern.multiline ? "m" : "") + (pattern.sticky ? "y" : "") + (pattern.unicode ? "u" : "") + (pattern.dotAll ? "s" : ""));
|
38129
|
-
}
|
38130
|
-
|
38131
|
-
// ../../node_modules/.pnpm/ramda@0.29.0/node_modules/ramda/es/internal/_clone.js
|
38132
|
-
function _clone(value, deep, map) {
|
38133
|
-
map || (map = new _ObjectMap());
|
38134
|
-
if (_isPrimitive(value)) {
|
38135
|
-
return value;
|
38136
|
-
}
|
38137
|
-
var copy = function copy2(copiedValue) {
|
38138
|
-
var cachedCopy = map.get(value);
|
38139
|
-
if (cachedCopy) {
|
38140
|
-
return cachedCopy;
|
38141
|
-
}
|
38142
|
-
map.set(value, copiedValue);
|
38143
|
-
for (var key in value) {
|
38144
|
-
if (Object.prototype.hasOwnProperty.call(value, key)) {
|
38145
|
-
copiedValue[key] = deep ? _clone(value[key], true, map) : value[key];
|
38146
|
-
}
|
38147
|
-
}
|
38148
|
-
return copiedValue;
|
38149
|
-
};
|
38150
|
-
switch (type_default(value)) {
|
38151
|
-
case "Object":
|
38152
|
-
return copy(Object.create(Object.getPrototypeOf(value)));
|
38153
|
-
case "Array":
|
38154
|
-
return copy([]);
|
38155
|
-
case "Date":
|
38156
|
-
return new Date(value.valueOf());
|
38157
|
-
case "RegExp":
|
38158
|
-
return _cloneRegExp(value);
|
38159
|
-
case "Int8Array":
|
38160
|
-
case "Uint8Array":
|
38161
|
-
case "Uint8ClampedArray":
|
38162
|
-
case "Int16Array":
|
38163
|
-
case "Uint16Array":
|
38164
|
-
case "Int32Array":
|
38165
|
-
case "Uint32Array":
|
38166
|
-
case "Float32Array":
|
38167
|
-
case "Float64Array":
|
38168
|
-
case "BigInt64Array":
|
38169
|
-
case "BigUint64Array":
|
38170
|
-
return value.slice();
|
38171
|
-
default:
|
38172
|
-
return value;
|
38173
|
-
}
|
38174
|
-
}
|
38175
|
-
function _isPrimitive(param) {
|
38176
|
-
var type3 = typeof param;
|
38177
|
-
return param == null || type3 != "object" && type3 != "function";
|
38178
|
-
}
|
38179
|
-
var _ObjectMap = /* @__PURE__ */ function() {
|
38180
|
-
function _ObjectMap2() {
|
38181
|
-
this.map = {};
|
38182
|
-
this.length = 0;
|
38183
|
-
}
|
38184
|
-
_ObjectMap2.prototype.set = function(key, value) {
|
38185
|
-
const hashedKey = this.hash(key);
|
38186
|
-
let bucket = this.map[hashedKey];
|
38187
|
-
if (!bucket) {
|
38188
|
-
this.map[hashedKey] = bucket = [];
|
38189
|
-
}
|
38190
|
-
bucket.push([key, value]);
|
38191
|
-
this.length += 1;
|
38192
|
-
};
|
38193
|
-
_ObjectMap2.prototype.hash = function(key) {
|
38194
|
-
let hashedKey = [];
|
38195
|
-
for (var value in key) {
|
38196
|
-
hashedKey.push(Object.prototype.toString.call(key[value]));
|
38197
|
-
}
|
38198
|
-
return hashedKey.join();
|
38199
|
-
};
|
38200
|
-
_ObjectMap2.prototype.get = function(key) {
|
38201
|
-
if (this.length <= 180) {
|
38202
|
-
for (const p in this.map) {
|
38203
|
-
const bucket2 = this.map[p];
|
38204
|
-
for (let i = 0; i < bucket2.length; i += 1) {
|
38205
|
-
const element = bucket2[i];
|
38206
|
-
if (element[0] === key) {
|
38207
|
-
return element[1];
|
38208
|
-
}
|
38209
|
-
}
|
38210
|
-
}
|
38211
|
-
return;
|
38212
|
-
}
|
38213
|
-
const hashedKey = this.hash(key);
|
38214
|
-
const bucket = this.map[hashedKey];
|
38215
|
-
if (!bucket) {
|
38216
|
-
return;
|
38217
|
-
}
|
38218
|
-
for (let i = 0; i < bucket.length; i += 1) {
|
38219
|
-
const element = bucket[i];
|
38220
|
-
if (element[0] === key) {
|
38221
|
-
return element[1];
|
38222
|
-
}
|
38223
|
-
}
|
38224
|
-
};
|
38225
|
-
return _ObjectMap2;
|
38226
|
-
}();
|
38227
|
-
|
38228
|
-
// ../../node_modules/.pnpm/ramda@0.29.0/node_modules/ramda/es/clone.js
|
38229
|
-
var clone2 = /* @__PURE__ */ _curry1(function clone3(value) {
|
38230
|
-
return value != null && typeof value.clone === "function" ? value.clone() : _clone(value, true);
|
38231
|
-
});
|
38232
|
-
var clone_default = clone2;
|
38233
|
-
|
38234
|
-
// ../../node_modules/.pnpm/ramda@0.29.0/node_modules/ramda/es/trim.js
|
38235
|
-
var hasProtoTrim = typeof String.prototype.trim === "function";
|
38236
|
-
|
38237
38495
|
// ../../node_modules/.pnpm/tslib@2.6.0/node_modules/tslib/tslib.es6.mjs
|
38238
38496
|
var __assign = function() {
|
38239
38497
|
__assign = Object.assign || function __assign2(t) {
|
@@ -41401,14 +41659,10 @@ spurious results.`);
|
|
41401
41659
|
// src/providers/__generated__/operations.ts
|
41402
41660
|
var ReceiptFragmentFragmentDoc = lib_default2`
|
41403
41661
|
fragment receiptFragment on Receipt {
|
41404
|
-
|
41405
|
-
id
|
41406
|
-
}
|
41662
|
+
id
|
41407
41663
|
pc
|
41408
41664
|
is
|
41409
|
-
to
|
41410
|
-
id
|
41411
|
-
}
|
41665
|
+
to
|
41412
41666
|
toAddress
|
41413
41667
|
amount
|
41414
41668
|
assetId
|
@@ -41446,10 +41700,16 @@ spurious results.`);
|
|
41446
41700
|
id
|
41447
41701
|
}
|
41448
41702
|
time
|
41703
|
+
receipts {
|
41704
|
+
...receiptFragment
|
41705
|
+
}
|
41449
41706
|
programState {
|
41450
41707
|
returnType
|
41451
41708
|
data
|
41452
41709
|
}
|
41710
|
+
receipts {
|
41711
|
+
...receiptFragment
|
41712
|
+
}
|
41453
41713
|
}
|
41454
41714
|
... on FailureStatus {
|
41455
41715
|
block {
|
@@ -41457,26 +41717,24 @@ spurious results.`);
|
|
41457
41717
|
}
|
41458
41718
|
time
|
41459
41719
|
reason
|
41720
|
+
receipts {
|
41721
|
+
...receiptFragment
|
41722
|
+
}
|
41460
41723
|
}
|
41461
41724
|
... on SqueezedOutStatus {
|
41462
41725
|
reason
|
41463
41726
|
}
|
41464
41727
|
}
|
41465
|
-
`;
|
41728
|
+
${ReceiptFragmentFragmentDoc}`;
|
41466
41729
|
var TransactionFragmentFragmentDoc = lib_default2`
|
41467
41730
|
fragment transactionFragment on Transaction {
|
41468
41731
|
id
|
41469
41732
|
rawPayload
|
41470
|
-
gasPrice
|
41471
|
-
receipts {
|
41472
|
-
...receiptFragment
|
41473
|
-
}
|
41474
41733
|
status {
|
41475
41734
|
...transactionStatusFragment
|
41476
41735
|
}
|
41477
41736
|
}
|
41478
|
-
${
|
41479
|
-
${TransactionStatusFragmentFragmentDoc}`;
|
41737
|
+
${TransactionStatusFragmentFragmentDoc}`;
|
41480
41738
|
var InputEstimatePredicatesFragmentFragmentDoc = lib_default2`
|
41481
41739
|
fragment inputEstimatePredicatesFragment on Input {
|
41482
41740
|
... on InputCoin {
|
@@ -41494,6 +41752,46 @@ ${TransactionStatusFragmentFragmentDoc}`;
|
|
41494
41752
|
}
|
41495
41753
|
}
|
41496
41754
|
${InputEstimatePredicatesFragmentFragmentDoc}`;
|
41755
|
+
var DryRunFailureStatusFragmentFragmentDoc = lib_default2`
|
41756
|
+
fragment dryRunFailureStatusFragment on DryRunFailureStatus {
|
41757
|
+
reason
|
41758
|
+
programState {
|
41759
|
+
returnType
|
41760
|
+
data
|
41761
|
+
}
|
41762
|
+
}
|
41763
|
+
`;
|
41764
|
+
var DryRunSuccessStatusFragmentFragmentDoc = lib_default2`
|
41765
|
+
fragment dryRunSuccessStatusFragment on DryRunSuccessStatus {
|
41766
|
+
programState {
|
41767
|
+
returnType
|
41768
|
+
data
|
41769
|
+
}
|
41770
|
+
}
|
41771
|
+
`;
|
41772
|
+
var DryRunTransactionStatusFragmentFragmentDoc = lib_default2`
|
41773
|
+
fragment dryRunTransactionStatusFragment on DryRunTransactionStatus {
|
41774
|
+
... on DryRunFailureStatus {
|
41775
|
+
...dryRunFailureStatusFragment
|
41776
|
+
}
|
41777
|
+
... on DryRunSuccessStatus {
|
41778
|
+
...dryRunSuccessStatusFragment
|
41779
|
+
}
|
41780
|
+
}
|
41781
|
+
${DryRunFailureStatusFragmentFragmentDoc}
|
41782
|
+
${DryRunSuccessStatusFragmentFragmentDoc}`;
|
41783
|
+
var DryRunTransactionExecutionStatusFragmentFragmentDoc = lib_default2`
|
41784
|
+
fragment dryRunTransactionExecutionStatusFragment on DryRunTransactionExecutionStatus {
|
41785
|
+
id
|
41786
|
+
status {
|
41787
|
+
...dryRunTransactionStatusFragment
|
41788
|
+
}
|
41789
|
+
receipts {
|
41790
|
+
...receiptFragment
|
41791
|
+
}
|
41792
|
+
}
|
41793
|
+
${DryRunTransactionStatusFragmentFragmentDoc}
|
41794
|
+
${ReceiptFragmentFragmentDoc}`;
|
41497
41795
|
var CoinFragmentFragmentDoc = lib_default2`
|
41498
41796
|
fragment coinFragment on Coin {
|
41499
41797
|
__typename
|
@@ -41501,7 +41799,6 @@ ${TransactionStatusFragmentFragmentDoc}`;
|
|
41501
41799
|
owner
|
41502
41800
|
amount
|
41503
41801
|
assetId
|
41504
|
-
maturity
|
41505
41802
|
blockCreated
|
41506
41803
|
txCreatedIdx
|
41507
41804
|
}
|
@@ -41546,7 +41843,6 @@ ${TransactionStatusFragmentFragmentDoc}`;
|
|
41546
41843
|
prevRoot
|
41547
41844
|
time
|
41548
41845
|
applicationHash
|
41549
|
-
messageReceiptRoot
|
41550
41846
|
messageReceiptCount
|
41551
41847
|
}
|
41552
41848
|
commitBlockHeader {
|
@@ -41558,7 +41854,6 @@ ${TransactionStatusFragmentFragmentDoc}`;
|
|
41558
41854
|
prevRoot
|
41559
41855
|
time
|
41560
41856
|
applicationHash
|
41561
|
-
messageReceiptRoot
|
41562
41857
|
messageReceiptCount
|
41563
41858
|
}
|
41564
41859
|
sender
|
@@ -41578,8 +41873,8 @@ ${TransactionStatusFragmentFragmentDoc}`;
|
|
41578
41873
|
var BlockFragmentFragmentDoc = lib_default2`
|
41579
41874
|
fragment blockFragment on Block {
|
41580
41875
|
id
|
41876
|
+
height
|
41581
41877
|
header {
|
41582
|
-
height
|
41583
41878
|
time
|
41584
41879
|
}
|
41585
41880
|
transactions {
|
@@ -41637,6 +41932,11 @@ ${TransactionStatusFragmentFragmentDoc}`;
|
|
41637
41932
|
`;
|
41638
41933
|
var GasCostsFragmentFragmentDoc = lib_default2`
|
41639
41934
|
fragment GasCostsFragment on GasCosts {
|
41935
|
+
version {
|
41936
|
+
... on Version {
|
41937
|
+
value
|
41938
|
+
}
|
41939
|
+
}
|
41640
41940
|
add
|
41641
41941
|
addi
|
41642
41942
|
aloc
|
@@ -41649,7 +41949,6 @@ ${TransactionStatusFragmentFragmentDoc}`;
|
|
41649
41949
|
cb
|
41650
41950
|
cfei
|
41651
41951
|
cfsi
|
41652
|
-
croo
|
41653
41952
|
div
|
41654
41953
|
divi
|
41655
41954
|
ecr1
|
@@ -41732,6 +42031,9 @@ ${TransactionStatusFragmentFragmentDoc}`;
|
|
41732
42031
|
ccp {
|
41733
42032
|
...DependentCostFragment
|
41734
42033
|
}
|
42034
|
+
croo {
|
42035
|
+
...DependentCostFragment
|
42036
|
+
}
|
41735
42037
|
csiz {
|
41736
42038
|
...DependentCostFragment
|
41737
42039
|
}
|
@@ -41791,6 +42093,11 @@ ${TransactionStatusFragmentFragmentDoc}`;
|
|
41791
42093
|
${DependentCostFragmentFragmentDoc}`;
|
41792
42094
|
var ConsensusParametersFragmentFragmentDoc = lib_default2`
|
41793
42095
|
fragment consensusParametersFragment on ConsensusParameters {
|
42096
|
+
version {
|
42097
|
+
... on Version {
|
42098
|
+
value
|
42099
|
+
}
|
42100
|
+
}
|
41794
42101
|
txParams {
|
41795
42102
|
...TxParametersFragment
|
41796
42103
|
}
|
@@ -41850,18 +42157,9 @@ ${ConsensusParametersFragmentFragmentDoc}`;
|
|
41850
42157
|
fragment nodeInfoFragment on NodeInfo {
|
41851
42158
|
utxoValidation
|
41852
42159
|
vmBacktrace
|
41853
|
-
minGasPrice
|
41854
42160
|
maxTx
|
41855
42161
|
maxDepth
|
41856
42162
|
nodeVersion
|
41857
|
-
peers {
|
41858
|
-
id
|
41859
|
-
addresses
|
41860
|
-
clientVersion
|
41861
|
-
blockHeight
|
41862
|
-
lastHeartbeatMs
|
41863
|
-
appScore
|
41864
|
-
}
|
41865
42163
|
}
|
41866
42164
|
`;
|
41867
42165
|
var GetVersionDocument = lib_default2`
|
@@ -41896,13 +42194,9 @@ ${ConsensusParametersFragmentFragmentDoc}`;
|
|
41896
42194
|
query getTransactionWithReceipts($transactionId: TransactionId!) {
|
41897
42195
|
transaction(id: $transactionId) {
|
41898
42196
|
...transactionFragment
|
41899
|
-
receipts {
|
41900
|
-
...receiptFragment
|
41901
|
-
}
|
41902
42197
|
}
|
41903
42198
|
}
|
41904
|
-
${TransactionFragmentFragmentDoc}
|
41905
|
-
${ReceiptFragmentFragmentDoc}`;
|
42199
|
+
${TransactionFragmentFragmentDoc}`;
|
41906
42200
|
var GetTransactionsDocument = lib_default2`
|
41907
42201
|
query getTransactions($after: String, $before: String, $first: Int, $last: Int) {
|
41908
42202
|
transactions(after: $after, before: $before, first: $first, last: $last) {
|
@@ -42030,6 +42324,20 @@ ${MessageCoinFragmentFragmentDoc}`;
|
|
42030
42324
|
}
|
42031
42325
|
}
|
42032
42326
|
${BalanceFragmentFragmentDoc}`;
|
42327
|
+
var GetLatestGasPriceDocument = lib_default2`
|
42328
|
+
query getLatestGasPrice {
|
42329
|
+
latestGasPrice {
|
42330
|
+
gasPrice
|
42331
|
+
}
|
42332
|
+
}
|
42333
|
+
`;
|
42334
|
+
var EstimateGasPriceDocument = lib_default2`
|
42335
|
+
query estimateGasPrice($blockHorizon: U32!) {
|
42336
|
+
estimateGasPrice(blockHorizon: $blockHorizon) {
|
42337
|
+
gasPrice
|
42338
|
+
}
|
42339
|
+
}
|
42340
|
+
`;
|
42033
42341
|
var GetBalancesDocument = lib_default2`
|
42034
42342
|
query getBalances($filter: BalanceFilterInput!, $after: String, $before: String, $first: Int, $last: Int) {
|
42035
42343
|
balances(
|
@@ -42084,12 +42392,12 @@ ${MessageCoinFragmentFragmentDoc}`;
|
|
42084
42392
|
}
|
42085
42393
|
`;
|
42086
42394
|
var DryRunDocument = lib_default2`
|
42087
|
-
mutation dryRun($
|
42088
|
-
dryRun(
|
42089
|
-
...
|
42395
|
+
mutation dryRun($encodedTransactions: [HexString!]!, $utxoValidation: Boolean) {
|
42396
|
+
dryRun(txs: $encodedTransactions, utxoValidation: $utxoValidation) {
|
42397
|
+
...dryRunTransactionExecutionStatusFragment
|
42090
42398
|
}
|
42091
42399
|
}
|
42092
|
-
${
|
42400
|
+
${DryRunTransactionExecutionStatusFragmentFragmentDoc}`;
|
42093
42401
|
var SubmitDocument = lib_default2`
|
42094
42402
|
mutation submit($encodedTransaction: HexString!) {
|
42095
42403
|
submit(tx: $encodedTransaction) {
|
@@ -42172,6 +42480,12 @@ ${MessageCoinFragmentFragmentDoc}`;
|
|
42172
42480
|
getBalance(variables, options) {
|
42173
42481
|
return requester(GetBalanceDocument, variables, options);
|
42174
42482
|
},
|
42483
|
+
getLatestGasPrice(variables, options) {
|
42484
|
+
return requester(GetLatestGasPriceDocument, variables, options);
|
42485
|
+
},
|
42486
|
+
estimateGasPrice(variables, options) {
|
42487
|
+
return requester(EstimateGasPriceDocument, variables, options);
|
42488
|
+
},
|
42175
42489
|
getBalances(variables, options) {
|
42176
42490
|
return requester(GetBalancesDocument, variables, options);
|
42177
42491
|
},
|
@@ -42239,11 +42553,14 @@ ${MessageCoinFragmentFragmentDoc}`;
|
|
42239
42553
|
let data;
|
42240
42554
|
let errors;
|
42241
42555
|
try {
|
42242
|
-
|
42556
|
+
const sanitizedText = text.replace(/\s/g, "");
|
42557
|
+
({ data, errors } = JSON.parse(sanitizedText.replace(/^data:/, "")));
|
42243
42558
|
} catch (e) {
|
42244
42559
|
throw new FuelError(
|
42245
42560
|
ErrorCode.STREAM_PARSING_ERROR,
|
42246
|
-
`Error while parsing stream data response: ${text}
|
42561
|
+
`Error while parsing stream data response: ${text}
|
42562
|
+
|
42563
|
+
Thrown error: ${e}`
|
42247
42564
|
);
|
42248
42565
|
}
|
42249
42566
|
if (Array.isArray(errors)) {
|
@@ -42327,9 +42644,6 @@ ${MessageCoinFragmentFragmentDoc}`;
|
|
42327
42644
|
}
|
42328
42645
|
};
|
42329
42646
|
|
42330
|
-
// ../address/dist/configs.mjs
|
42331
|
-
var ZeroBytes32 = "0x0000000000000000000000000000000000000000000000000000000000000000";
|
42332
|
-
|
42333
42647
|
// src/providers/transaction-request/input.ts
|
42334
42648
|
var inputify = (value) => {
|
42335
42649
|
const { type: type3 } = value;
|
@@ -42340,7 +42654,7 @@ ${MessageCoinFragmentFragmentDoc}`;
|
|
42340
42654
|
return {
|
42341
42655
|
type: InputType.Coin,
|
42342
42656
|
txID: hexlify(arrayify(value.id).slice(0, 32)),
|
42343
|
-
outputIndex: arrayify(value.id)
|
42657
|
+
outputIndex: toNumber2(arrayify(value.id).slice(32, 34)),
|
42344
42658
|
owner: hexlify(value.owner),
|
42345
42659
|
amount: bn(value.amount),
|
42346
42660
|
assetId: hexlify(value.assetId),
|
@@ -42349,10 +42663,9 @@ ${MessageCoinFragmentFragmentDoc}`;
|
|
42349
42663
|
txIndex: toNumber2(arrayify(value.txPointer).slice(8, 16))
|
42350
42664
|
},
|
42351
42665
|
witnessIndex: value.witnessIndex,
|
42352
|
-
maturity: value.maturity ?? 0,
|
42353
42666
|
predicateGasUsed: bn(value.predicateGasUsed),
|
42354
|
-
predicateLength: predicate.length,
|
42355
|
-
predicateDataLength: predicateData.length,
|
42667
|
+
predicateLength: bn(predicate.length),
|
42668
|
+
predicateDataLength: bn(predicateData.length),
|
42356
42669
|
predicate: hexlify(predicate),
|
42357
42670
|
predicateData: hexlify(predicateData)
|
42358
42671
|
};
|
@@ -42383,8 +42696,8 @@ ${MessageCoinFragmentFragmentDoc}`;
|
|
42383
42696
|
nonce: hexlify(value.nonce),
|
42384
42697
|
witnessIndex: value.witnessIndex,
|
42385
42698
|
predicateGasUsed: bn(value.predicateGasUsed),
|
42386
|
-
predicateLength: predicate.length,
|
42387
|
-
predicateDataLength: predicateData.length,
|
42699
|
+
predicateLength: bn(predicate.length),
|
42700
|
+
predicateDataLength: bn(predicateData.length),
|
42388
42701
|
predicate: hexlify(predicate),
|
42389
42702
|
predicateData: hexlify(predicateData),
|
42390
42703
|
data: hexlify(data),
|
@@ -42541,8 +42854,8 @@ ${MessageCoinFragmentFragmentDoc}`;
|
|
42541
42854
|
case "CALL" /* Call */: {
|
42542
42855
|
const callReceipt = {
|
42543
42856
|
type: ReceiptType.Call,
|
42544
|
-
from: hexOrZero(receipt.
|
42545
|
-
to: hexOrZero(receipt?.to
|
42857
|
+
from: hexOrZero(receipt.id || receipt.contractId),
|
42858
|
+
to: hexOrZero(receipt?.to),
|
42546
42859
|
amount: bn(receipt.amount),
|
42547
42860
|
assetId: hexOrZero(receipt.assetId),
|
42548
42861
|
gas: bn(receipt.gas),
|
@@ -42556,7 +42869,7 @@ ${MessageCoinFragmentFragmentDoc}`;
|
|
42556
42869
|
case "RETURN" /* Return */: {
|
42557
42870
|
const returnReceipt = {
|
42558
42871
|
type: ReceiptType.Return,
|
42559
|
-
id: hexOrZero(receipt.
|
42872
|
+
id: hexOrZero(receipt.id || receipt.contractId),
|
42560
42873
|
val: bn(receipt.val),
|
42561
42874
|
pc: bn(receipt.pc),
|
42562
42875
|
is: bn(receipt.is)
|
@@ -42566,7 +42879,7 @@ ${MessageCoinFragmentFragmentDoc}`;
|
|
42566
42879
|
case "RETURN_DATA" /* ReturnData */: {
|
42567
42880
|
const returnDataReceipt = {
|
42568
42881
|
type: ReceiptType.ReturnData,
|
42569
|
-
id: hexOrZero(receipt.
|
42882
|
+
id: hexOrZero(receipt.id || receipt.contractId),
|
42570
42883
|
ptr: bn(receipt.ptr),
|
42571
42884
|
len: bn(receipt.len),
|
42572
42885
|
digest: hexOrZero(receipt.digest),
|
@@ -42578,7 +42891,7 @@ ${MessageCoinFragmentFragmentDoc}`;
|
|
42578
42891
|
case "PANIC" /* Panic */: {
|
42579
42892
|
const panicReceipt = {
|
42580
42893
|
type: ReceiptType.Panic,
|
42581
|
-
id: hexOrZero(receipt.
|
42894
|
+
id: hexOrZero(receipt.id),
|
42582
42895
|
reason: bn(receipt.reason),
|
42583
42896
|
pc: bn(receipt.pc),
|
42584
42897
|
is: bn(receipt.is),
|
@@ -42589,7 +42902,7 @@ ${MessageCoinFragmentFragmentDoc}`;
|
|
42589
42902
|
case "REVERT" /* Revert */: {
|
42590
42903
|
const revertReceipt = {
|
42591
42904
|
type: ReceiptType.Revert,
|
42592
|
-
id: hexOrZero(receipt.
|
42905
|
+
id: hexOrZero(receipt.id || receipt.contractId),
|
42593
42906
|
val: bn(receipt.ra),
|
42594
42907
|
pc: bn(receipt.pc),
|
42595
42908
|
is: bn(receipt.is)
|
@@ -42599,7 +42912,7 @@ ${MessageCoinFragmentFragmentDoc}`;
|
|
42599
42912
|
case "LOG" /* Log */: {
|
42600
42913
|
const logReceipt = {
|
42601
42914
|
type: ReceiptType.Log,
|
42602
|
-
id: hexOrZero(receipt.
|
42915
|
+
id: hexOrZero(receipt.id || receipt.contractId),
|
42603
42916
|
val0: bn(receipt.ra),
|
42604
42917
|
val1: bn(receipt.rb),
|
42605
42918
|
val2: bn(receipt.rc),
|
@@ -42612,7 +42925,7 @@ ${MessageCoinFragmentFragmentDoc}`;
|
|
42612
42925
|
case "LOG_DATA" /* LogData */: {
|
42613
42926
|
const logDataReceipt = {
|
42614
42927
|
type: ReceiptType.LogData,
|
42615
|
-
id: hexOrZero(receipt.
|
42928
|
+
id: hexOrZero(receipt.id || receipt.contractId),
|
42616
42929
|
val0: bn(receipt.ra),
|
42617
42930
|
val1: bn(receipt.rb),
|
42618
42931
|
ptr: bn(receipt.ptr),
|
@@ -42626,8 +42939,8 @@ ${MessageCoinFragmentFragmentDoc}`;
|
|
42626
42939
|
case "TRANSFER" /* Transfer */: {
|
42627
42940
|
const transferReceipt = {
|
42628
42941
|
type: ReceiptType.Transfer,
|
42629
|
-
from: hexOrZero(receipt.
|
42630
|
-
to: hexOrZero(receipt.toAddress || receipt?.to
|
42942
|
+
from: hexOrZero(receipt.id || receipt.contractId),
|
42943
|
+
to: hexOrZero(receipt.toAddress || receipt?.to),
|
42631
42944
|
amount: bn(receipt.amount),
|
42632
42945
|
assetId: hexOrZero(receipt.assetId),
|
42633
42946
|
pc: bn(receipt.pc),
|
@@ -42638,8 +42951,8 @@ ${MessageCoinFragmentFragmentDoc}`;
|
|
42638
42951
|
case "TRANSFER_OUT" /* TransferOut */: {
|
42639
42952
|
const transferOutReceipt = {
|
42640
42953
|
type: ReceiptType.TransferOut,
|
42641
|
-
from: hexOrZero(receipt.
|
42642
|
-
to: hexOrZero(receipt.toAddress || receipt.to
|
42954
|
+
from: hexOrZero(receipt.id || receipt.contractId),
|
42955
|
+
to: hexOrZero(receipt.toAddress || receipt.to),
|
42643
42956
|
amount: bn(receipt.amount),
|
42644
42957
|
assetId: hexOrZero(receipt.assetId),
|
42645
42958
|
pc: bn(receipt.pc),
|
@@ -42682,7 +42995,7 @@ ${MessageCoinFragmentFragmentDoc}`;
|
|
42682
42995
|
return receiptMessageOut;
|
42683
42996
|
}
|
42684
42997
|
case "MINT" /* Mint */: {
|
42685
|
-
const contractId = hexOrZero(receipt.
|
42998
|
+
const contractId = hexOrZero(receipt.id || receipt.contractId);
|
42686
42999
|
const subId = hexOrZero(receipt.subId);
|
42687
43000
|
const assetId = ReceiptMintCoder.getAssetId(contractId, subId);
|
42688
43001
|
const mintReceipt = {
|
@@ -42697,7 +43010,7 @@ ${MessageCoinFragmentFragmentDoc}`;
|
|
42697
43010
|
return mintReceipt;
|
42698
43011
|
}
|
42699
43012
|
case "BURN" /* Burn */: {
|
42700
|
-
const contractId = hexOrZero(receipt.
|
43013
|
+
const contractId = hexOrZero(receipt.id || receipt.contractId);
|
42701
43014
|
const subId = hexOrZero(receipt.subId);
|
42702
43015
|
const assetId = ReceiptBurnCoder.getAssetId(contractId, subId);
|
42703
43016
|
const burnReceipt = {
|
@@ -42717,7 +43030,6 @@ ${MessageCoinFragmentFragmentDoc}`;
|
|
42717
43030
|
}
|
42718
43031
|
|
42719
43032
|
// src/providers/utils/gas.ts
|
42720
|
-
var calculatePriceWithFactor = (gas, gasPrice, priceFactor) => bn(Math.ceil(gas.mul(gasPrice).toNumber() / priceFactor.toNumber()));
|
42721
43033
|
var getGasUsedFromReceipts = (receipts) => {
|
42722
43034
|
const scriptResult = receipts.filter(
|
42723
43035
|
(receipt) => receipt.type === ReceiptType.ScriptResult
|
@@ -42738,18 +43050,28 @@ ${MessageCoinFragmentFragmentDoc}`;
|
|
42738
43050
|
}
|
42739
43051
|
function gasUsedByInputs(inputs, txBytesSize, gasCosts) {
|
42740
43052
|
const witnessCache = [];
|
42741
|
-
const
|
43053
|
+
const chargeableInputs = inputs.filter((input) => {
|
43054
|
+
const isCoinOrMessage = "owner" in input || "sender" in input;
|
43055
|
+
if (isCoinOrMessage) {
|
43056
|
+
if ("predicate" in input && input.predicate && input.predicate !== "0x") {
|
43057
|
+
return true;
|
43058
|
+
}
|
43059
|
+
if (!witnessCache.includes(input.witnessIndex)) {
|
43060
|
+
witnessCache.push(input.witnessIndex);
|
43061
|
+
return true;
|
43062
|
+
}
|
43063
|
+
}
|
43064
|
+
return false;
|
43065
|
+
});
|
43066
|
+
const vmInitializationCost = resolveGasDependentCosts(txBytesSize, gasCosts.vmInitialization);
|
43067
|
+
const totalGas = chargeableInputs.reduce((total, input) => {
|
42742
43068
|
if ("predicate" in input && input.predicate && input.predicate !== "0x") {
|
42743
43069
|
return total.add(
|
42744
|
-
|
43070
|
+
vmInitializationCost.add(resolveGasDependentCosts(arrayify(input.predicate).length, gasCosts.contractRoot)).add(bn(input.predicateGasUsed))
|
42745
43071
|
);
|
42746
43072
|
}
|
42747
|
-
|
42748
|
-
|
42749
|
-
return total.add(gasCosts.ecr1);
|
42750
|
-
}
|
42751
|
-
return total;
|
42752
|
-
}, bn());
|
43073
|
+
return total.add(gasCosts.ecr1);
|
43074
|
+
}, bn(0));
|
42753
43075
|
return totalGas;
|
42754
43076
|
}
|
42755
43077
|
function getMinGas(params) {
|
@@ -42761,12 +43083,20 @@ ${MessageCoinFragmentFragmentDoc}`;
|
|
42761
43083
|
return minGas;
|
42762
43084
|
}
|
42763
43085
|
function getMaxGas(params) {
|
42764
|
-
const {
|
43086
|
+
const {
|
43087
|
+
gasPerByte,
|
43088
|
+
witnessesLength,
|
43089
|
+
witnessLimit,
|
43090
|
+
minGas,
|
43091
|
+
gasLimit = bn(0),
|
43092
|
+
maxGasPerTx
|
43093
|
+
} = params;
|
42765
43094
|
let remainingAllowedWitnessGas = bn(0);
|
42766
43095
|
if (witnessLimit?.gt(0) && witnessLimit.gte(witnessesLength)) {
|
42767
43096
|
remainingAllowedWitnessGas = bn(witnessLimit).sub(witnessesLength).mul(gasPerByte);
|
42768
43097
|
}
|
42769
|
-
|
43098
|
+
const maxGas = remainingAllowedWitnessGas.add(minGas).add(gasLimit);
|
43099
|
+
return maxGas.gte(maxGasPerTx) ? maxGasPerTx : maxGas;
|
42770
43100
|
}
|
42771
43101
|
function calculateMetadataGasForTxCreate({
|
42772
43102
|
gasCosts,
|
@@ -42788,6 +43118,10 @@ ${MessageCoinFragmentFragmentDoc}`;
|
|
42788
43118
|
}) {
|
42789
43119
|
return resolveGasDependentCosts(txBytesSize, gasCosts.s256);
|
42790
43120
|
}
|
43121
|
+
var calculateGasFee = (params) => {
|
43122
|
+
const { gas, gasPrice, priceFactor, tip } = params;
|
43123
|
+
return gas.mul(gasPrice).div(priceFactor).add(tip);
|
43124
|
+
};
|
42791
43125
|
|
42792
43126
|
// src/providers/utils/json.ts
|
42793
43127
|
function normalize2(object) {
|
@@ -42917,7 +43251,7 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
42917
43251
|
// src/providers/transaction-request/transaction-request.ts
|
42918
43252
|
var BaseTransactionRequest = class {
|
42919
43253
|
/** Gas price for transaction */
|
42920
|
-
|
43254
|
+
tip;
|
42921
43255
|
/** Block until which tx cannot be included */
|
42922
43256
|
maturity;
|
42923
43257
|
/** The maximum fee payable by this transaction using BASE_ASSET. */
|
@@ -42930,38 +43264,34 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
42930
43264
|
outputs = [];
|
42931
43265
|
/** List of witnesses */
|
42932
43266
|
witnesses = [];
|
42933
|
-
/** Base asset ID - should be fetched from the chain */
|
42934
|
-
baseAssetId = ZeroBytes32;
|
42935
43267
|
/**
|
42936
43268
|
* Constructor for initializing a base transaction request.
|
42937
43269
|
*
|
42938
43270
|
* @param baseTransactionRequest - Optional object containing properties to initialize the transaction request.
|
42939
43271
|
*/
|
42940
43272
|
constructor({
|
42941
|
-
|
43273
|
+
tip,
|
42942
43274
|
maturity,
|
42943
43275
|
maxFee,
|
42944
43276
|
witnessLimit,
|
42945
43277
|
inputs,
|
42946
43278
|
outputs,
|
42947
|
-
witnesses
|
42948
|
-
baseAssetId
|
43279
|
+
witnesses
|
42949
43280
|
} = {}) {
|
42950
|
-
this.
|
43281
|
+
this.tip = bn(tip);
|
42951
43282
|
this.maturity = maturity ?? 0;
|
42952
43283
|
this.witnessLimit = witnessLimit ? bn(witnessLimit) : void 0;
|
42953
43284
|
this.maxFee = maxFee ? bn(maxFee) : void 0;
|
42954
43285
|
this.inputs = inputs ?? [];
|
42955
43286
|
this.outputs = outputs ?? [];
|
42956
43287
|
this.witnesses = witnesses ?? [];
|
42957
|
-
this.baseAssetId = baseAssetId ?? ZeroBytes32;
|
42958
43288
|
}
|
42959
43289
|
static getPolicyMeta(req) {
|
42960
43290
|
let policyTypes = 0;
|
42961
43291
|
const policies = [];
|
42962
|
-
if (req.
|
42963
|
-
policyTypes += PolicyType.
|
42964
|
-
policies.push({ data: req.
|
43292
|
+
if (req.tip) {
|
43293
|
+
policyTypes += PolicyType.Tip;
|
43294
|
+
policies.push({ data: req.tip, type: PolicyType.Tip });
|
42965
43295
|
}
|
42966
43296
|
if (req.witnessLimit) {
|
42967
43297
|
policyTypes += PolicyType.WitnessLimit;
|
@@ -43148,10 +43478,10 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
43148
43478
|
* @param predicate - Predicate bytes.
|
43149
43479
|
* @param predicateData - Predicate data bytes.
|
43150
43480
|
*/
|
43151
|
-
addCoinInput(coin
|
43481
|
+
addCoinInput(coin) {
|
43152
43482
|
const { assetId, owner, amount } = coin;
|
43153
43483
|
let witnessIndex;
|
43154
|
-
if (predicate) {
|
43484
|
+
if (coin.predicate) {
|
43155
43485
|
witnessIndex = 0;
|
43156
43486
|
} else {
|
43157
43487
|
witnessIndex = this.getCoinInputWitnessIndexByOwner(owner);
|
@@ -43166,9 +43496,7 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
43166
43496
|
amount,
|
43167
43497
|
assetId,
|
43168
43498
|
txPointer: "0x00000000000000000000000000000000",
|
43169
|
-
witnessIndex
|
43170
|
-
predicate: predicate?.bytes,
|
43171
|
-
predicateData: predicate?.predicateDataBytes
|
43499
|
+
witnessIndex
|
43172
43500
|
};
|
43173
43501
|
this.pushInput(input);
|
43174
43502
|
this.addChangeOutput(owner, assetId);
|
@@ -43179,11 +43507,13 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
43179
43507
|
*
|
43180
43508
|
* @param message - Message resource.
|
43181
43509
|
* @param predicate - Predicate bytes.
|
43510
|
+
* @param predicateData - Predicate data bytes.
|
43182
43511
|
*/
|
43183
|
-
addMessageInput(message
|
43512
|
+
addMessageInput(message) {
|
43184
43513
|
const { recipient, sender, amount } = message;
|
43514
|
+
const assetId = BaseAssetId;
|
43185
43515
|
let witnessIndex;
|
43186
|
-
if (predicate) {
|
43516
|
+
if (message.predicate) {
|
43187
43517
|
witnessIndex = 0;
|
43188
43518
|
} else {
|
43189
43519
|
witnessIndex = this.getCoinInputWitnessIndexByOwner(recipient);
|
@@ -43197,12 +43527,10 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
43197
43527
|
sender: sender.toB256(),
|
43198
43528
|
recipient: recipient.toB256(),
|
43199
43529
|
amount,
|
43200
|
-
witnessIndex
|
43201
|
-
predicate: predicate?.bytes,
|
43202
|
-
predicateData: predicate?.predicateDataBytes
|
43530
|
+
witnessIndex
|
43203
43531
|
};
|
43204
43532
|
this.pushInput(input);
|
43205
|
-
this.addChangeOutput(recipient,
|
43533
|
+
this.addChangeOutput(recipient, assetId);
|
43206
43534
|
}
|
43207
43535
|
/**
|
43208
43536
|
* Adds a single resource to the transaction by adding a coin/message input and a
|
@@ -43230,32 +43558,6 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
43230
43558
|
resources.forEach((resource) => this.addResource(resource));
|
43231
43559
|
return this;
|
43232
43560
|
}
|
43233
|
-
/**
|
43234
|
-
* Adds multiple resources to the transaction by adding coin/message inputs and change
|
43235
|
-
* outputs from the related assetIds.
|
43236
|
-
*
|
43237
|
-
* @param resources - The resources to add.
|
43238
|
-
* @returns This transaction.
|
43239
|
-
*/
|
43240
|
-
addPredicateResource(resource, predicate) {
|
43241
|
-
if (isCoin(resource)) {
|
43242
|
-
this.addCoinInput(resource, predicate);
|
43243
|
-
} else {
|
43244
|
-
this.addMessageInput(resource, predicate);
|
43245
|
-
}
|
43246
|
-
return this;
|
43247
|
-
}
|
43248
|
-
/**
|
43249
|
-
* Adds multiple predicate coin/message inputs to the transaction and change outputs
|
43250
|
-
* from the related assetIds.
|
43251
|
-
*
|
43252
|
-
* @param resources - The resources to add.
|
43253
|
-
* @returns This transaction.
|
43254
|
-
*/
|
43255
|
-
addPredicateResources(resources, predicate) {
|
43256
|
-
resources.forEach((resource) => this.addPredicateResource(resource, predicate));
|
43257
|
-
return this;
|
43258
|
-
}
|
43259
43561
|
/**
|
43260
43562
|
* Adds a coin output to the transaction.
|
43261
43563
|
*
|
@@ -43263,12 +43565,12 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
43263
43565
|
* @param amount - Amount of coin.
|
43264
43566
|
* @param assetId - Asset ID of coin.
|
43265
43567
|
*/
|
43266
|
-
addCoinOutput(to, amount, assetId) {
|
43568
|
+
addCoinOutput(to, amount, assetId = BaseAssetId) {
|
43267
43569
|
this.pushOutput({
|
43268
43570
|
type: OutputType.Coin,
|
43269
43571
|
to: addressify(to).toB256(),
|
43270
43572
|
amount,
|
43271
|
-
assetId
|
43573
|
+
assetId
|
43272
43574
|
});
|
43273
43575
|
return this;
|
43274
43576
|
}
|
@@ -43295,7 +43597,7 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
43295
43597
|
* @param to - Address of the owner.
|
43296
43598
|
* @param assetId - Asset ID of coin.
|
43297
43599
|
*/
|
43298
|
-
addChangeOutput(to, assetId) {
|
43600
|
+
addChangeOutput(to, assetId = BaseAssetId) {
|
43299
43601
|
const changeOutput = this.getChangeOutputs().find(
|
43300
43602
|
(output3) => hexlify(output3.assetId) === assetId
|
43301
43603
|
);
|
@@ -43303,7 +43605,7 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
43303
43605
|
this.pushOutput({
|
43304
43606
|
type: OutputType.Change,
|
43305
43607
|
to: addressify(to).toB256(),
|
43306
|
-
assetId
|
43608
|
+
assetId
|
43307
43609
|
});
|
43308
43610
|
}
|
43309
43611
|
}
|
@@ -43335,7 +43637,7 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
43335
43637
|
}
|
43336
43638
|
calculateMaxGas(chainInfo, minGas) {
|
43337
43639
|
const { consensusParameters } = chainInfo;
|
43338
|
-
const { gasPerByte } = consensusParameters;
|
43640
|
+
const { gasPerByte, maxGasPerTx } = consensusParameters;
|
43339
43641
|
const witnessesLength = this.toTransaction().witnesses.reduce(
|
43340
43642
|
(acc, wit) => acc + wit.dataLength,
|
43341
43643
|
0
|
@@ -43344,7 +43646,8 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
43344
43646
|
gasPerByte,
|
43345
43647
|
minGas,
|
43346
43648
|
witnessesLength,
|
43347
|
-
witnessLimit: this.witnessLimit
|
43649
|
+
witnessLimit: this.witnessLimit,
|
43650
|
+
maxGasPerTx
|
43348
43651
|
});
|
43349
43652
|
}
|
43350
43653
|
/**
|
@@ -43354,12 +43657,6 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
43354
43657
|
* @param quantities - CoinQuantity Array.
|
43355
43658
|
*/
|
43356
43659
|
fundWithFakeUtxos(quantities, resourcesOwner) {
|
43357
|
-
let idCounter = 0;
|
43358
|
-
const generateId = () => {
|
43359
|
-
const counterString = String(idCounter++);
|
43360
|
-
const id = ZeroBytes32.slice(0, -counterString.length).concat(counterString);
|
43361
|
-
return id;
|
43362
|
-
};
|
43363
43660
|
const findAssetInput = (assetId) => this.inputs.find((input) => {
|
43364
43661
|
if ("assetId" in input) {
|
43365
43662
|
return input.assetId === assetId;
|
@@ -43368,24 +43665,27 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
43368
43665
|
});
|
43369
43666
|
const updateAssetInput = (assetId, quantity) => {
|
43370
43667
|
const assetInput = findAssetInput(assetId);
|
43668
|
+
let usedQuantity = quantity;
|
43669
|
+
if (assetId === BaseAssetId) {
|
43670
|
+
usedQuantity = bn("1000000000000000000");
|
43671
|
+
}
|
43371
43672
|
if (assetInput && "assetId" in assetInput) {
|
43372
|
-
assetInput.id =
|
43373
|
-
assetInput.amount =
|
43673
|
+
assetInput.id = hexlify(randomBytes3(34));
|
43674
|
+
assetInput.amount = usedQuantity;
|
43374
43675
|
} else {
|
43375
43676
|
this.addResources([
|
43376
43677
|
{
|
43377
|
-
id:
|
43378
|
-
amount:
|
43678
|
+
id: hexlify(randomBytes3(34)),
|
43679
|
+
amount: usedQuantity,
|
43379
43680
|
assetId,
|
43380
43681
|
owner: resourcesOwner || Address.fromRandom(),
|
43381
|
-
maturity: 0,
|
43382
43682
|
blockCreated: bn(1),
|
43383
43683
|
txCreatedIdx: bn(1)
|
43384
43684
|
}
|
43385
43685
|
]);
|
43386
43686
|
}
|
43387
43687
|
};
|
43388
|
-
updateAssetInput(
|
43688
|
+
updateAssetInput(BaseAssetId, bn(1e11));
|
43389
43689
|
quantities.forEach((q) => updateAssetInput(q.assetId, q.amount));
|
43390
43690
|
}
|
43391
43691
|
/**
|
@@ -43410,7 +43710,7 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
43410
43710
|
toJSON() {
|
43411
43711
|
return normalizeJSON(this);
|
43412
43712
|
}
|
43413
|
-
|
43713
|
+
updatePredicateGasUsed(inputs) {
|
43414
43714
|
this.inputs.forEach((i) => {
|
43415
43715
|
let correspondingInput;
|
43416
43716
|
switch (i.type) {
|
@@ -43432,6 +43732,15 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
43432
43732
|
}
|
43433
43733
|
});
|
43434
43734
|
}
|
43735
|
+
shiftPredicateData() {
|
43736
|
+
this.inputs.forEach((input) => {
|
43737
|
+
if ("predicateData" in input && "paddPredicateData" in input && typeof input.paddPredicateData === "function") {
|
43738
|
+
input.predicateData = input.paddPredicateData(
|
43739
|
+
BaseTransactionRequest.getPolicyMeta(this).policies.length
|
43740
|
+
);
|
43741
|
+
}
|
43742
|
+
});
|
43743
|
+
}
|
43435
43744
|
};
|
43436
43745
|
|
43437
43746
|
// src/providers/transaction-request/hash-transaction.ts
|
@@ -43565,9 +43874,8 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
43565
43874
|
return {
|
43566
43875
|
type: TransactionType.Create,
|
43567
43876
|
...baseTransaction,
|
43568
|
-
bytecodeLength: baseTransaction.witnesses[bytecodeWitnessIndex].dataLength / 4,
|
43569
43877
|
bytecodeWitnessIndex,
|
43570
|
-
storageSlotsCount: storageSlots.length,
|
43878
|
+
storageSlotsCount: bn(storageSlots.length),
|
43571
43879
|
salt: this.salt ? hexlify(this.salt) : ZeroBytes32,
|
43572
43880
|
storageSlots
|
43573
43881
|
};
|
@@ -43681,8 +43989,8 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
43681
43989
|
type: TransactionType.Script,
|
43682
43990
|
scriptGasLimit: this.gasLimit,
|
43683
43991
|
...super.getBaseTransaction(),
|
43684
|
-
scriptLength: script.length,
|
43685
|
-
scriptDataLength: scriptData.length,
|
43992
|
+
scriptLength: bn(script.length),
|
43993
|
+
scriptDataLength: bn(scriptData.length),
|
43686
43994
|
receiptsRoot: ZeroBytes32,
|
43687
43995
|
script: hexlify(script),
|
43688
43996
|
scriptData: hexlify(scriptData)
|
@@ -43746,7 +44054,7 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
43746
44054
|
}
|
43747
44055
|
calculateMaxGas(chainInfo, minGas) {
|
43748
44056
|
const { consensusParameters } = chainInfo;
|
43749
|
-
const { gasPerByte } = consensusParameters;
|
44057
|
+
const { gasPerByte, maxGasPerTx } = consensusParameters;
|
43750
44058
|
const witnessesLength = this.toTransaction().witnesses.reduce(
|
43751
44059
|
(acc, wit) => acc + wit.dataLength,
|
43752
44060
|
0
|
@@ -43756,7 +44064,8 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
43756
44064
|
minGas,
|
43757
44065
|
witnessesLength,
|
43758
44066
|
witnessLimit: this.witnessLimit,
|
43759
|
-
gasLimit: this.gasLimit
|
44067
|
+
gasLimit: this.gasLimit,
|
44068
|
+
maxGasPerTx
|
43760
44069
|
});
|
43761
44070
|
}
|
43762
44071
|
/**
|
@@ -43829,13 +44138,29 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
43829
44138
|
}
|
43830
44139
|
}
|
43831
44140
|
};
|
44141
|
+
var cacheTxInputsFromOwner = (inputs, owner) => inputs.reduce(
|
44142
|
+
(acc, input) => {
|
44143
|
+
if (input.type === InputType.Coin && input.owner === owner) {
|
44144
|
+
acc.utxos.push(input.id);
|
44145
|
+
}
|
44146
|
+
if (input.type === InputType.Message && input.recipient === owner) {
|
44147
|
+
acc.messages.push(input.nonce);
|
44148
|
+
}
|
44149
|
+
return acc;
|
44150
|
+
},
|
44151
|
+
{
|
44152
|
+
utxos: [],
|
44153
|
+
messages: []
|
44154
|
+
}
|
44155
|
+
);
|
43832
44156
|
|
43833
44157
|
// src/providers/transaction-summary/calculate-transaction-fee.ts
|
43834
44158
|
var calculateTransactionFee = (params) => {
|
43835
44159
|
const {
|
43836
|
-
|
44160
|
+
gasPrice,
|
43837
44161
|
rawPayload,
|
43838
|
-
|
44162
|
+
tip,
|
44163
|
+
consensusParameters: { gasCosts, feeParams, maxGasPerTx }
|
43839
44164
|
} = params;
|
43840
44165
|
const gasPerByte = bn(feeParams.gasPerByte);
|
43841
44166
|
const gasPriceFactor = bn(feeParams.gasPriceFactor);
|
@@ -43845,8 +44170,7 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
43845
44170
|
return {
|
43846
44171
|
fee: bn(0),
|
43847
44172
|
minFee: bn(0),
|
43848
|
-
maxFee: bn(0)
|
43849
|
-
feeFromGasUsed: bn(0)
|
44173
|
+
maxFee: bn(0)
|
43850
44174
|
};
|
43851
44175
|
}
|
43852
44176
|
const { type: type3, witnesses, inputs, policies } = transaction;
|
@@ -43878,7 +44202,6 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
43878
44202
|
metadataGas,
|
43879
44203
|
txBytesSize: transactionBytes.length
|
43880
44204
|
});
|
43881
|
-
const gasPrice = bn(policies.find((policy) => policy.type === PolicyType.GasPrice)?.data);
|
43882
44205
|
const witnessLimit = policies.find((policy) => policy.type === PolicyType.WitnessLimit)?.data;
|
43883
44206
|
const witnessesLength = witnesses.reduce((acc, wit) => acc + wit.dataLength, 0);
|
43884
44207
|
const maxGas = getMaxGas({
|
@@ -43886,17 +44209,25 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
43886
44209
|
minGas,
|
43887
44210
|
witnessesLength,
|
43888
44211
|
gasLimit,
|
43889
|
-
witnessLimit
|
44212
|
+
witnessLimit,
|
44213
|
+
maxGasPerTx
|
44214
|
+
});
|
44215
|
+
const minFee = calculateGasFee({
|
44216
|
+
gasPrice,
|
44217
|
+
gas: minGas,
|
44218
|
+
priceFactor: gasPriceFactor,
|
44219
|
+
tip
|
44220
|
+
});
|
44221
|
+
const maxFee = calculateGasFee({
|
44222
|
+
gasPrice,
|
44223
|
+
gas: maxGas,
|
44224
|
+
priceFactor: gasPriceFactor,
|
44225
|
+
tip
|
43890
44226
|
});
|
43891
|
-
const feeFromGasUsed = calculatePriceWithFactor(gasUsed, gasPrice, gasPriceFactor);
|
43892
|
-
const minFee = calculatePriceWithFactor(minGas, gasPrice, gasPriceFactor);
|
43893
|
-
const maxFee = calculatePriceWithFactor(maxGas, gasPrice, gasPriceFactor);
|
43894
|
-
const fee = minFee.add(feeFromGasUsed);
|
43895
44227
|
return {
|
43896
|
-
fee,
|
43897
44228
|
minFee,
|
43898
44229
|
maxFee,
|
43899
|
-
|
44230
|
+
fee: maxFee
|
43900
44231
|
};
|
43901
44232
|
};
|
43902
44233
|
|
@@ -44450,7 +44781,9 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
44450
44781
|
gqlTransactionStatus,
|
44451
44782
|
abiMap = {},
|
44452
44783
|
maxInputs,
|
44453
|
-
gasCosts
|
44784
|
+
gasCosts,
|
44785
|
+
maxGasPerTx,
|
44786
|
+
gasPrice
|
44454
44787
|
} = params;
|
44455
44788
|
const gasUsed = getGasUsedFromReceipts(receipts);
|
44456
44789
|
const rawPayload = hexlify(transactionBytes);
|
@@ -44464,11 +44797,14 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
44464
44797
|
maxInputs
|
44465
44798
|
});
|
44466
44799
|
const typeName = getTransactionTypeName(transaction.type);
|
44800
|
+
const tip = bn(transaction.policies?.find((policy) => policy.type === PolicyType.Tip)?.data);
|
44467
44801
|
const { fee } = calculateTransactionFee({
|
44468
|
-
|
44802
|
+
gasPrice,
|
44469
44803
|
rawPayload,
|
44804
|
+
tip,
|
44470
44805
|
consensusParameters: {
|
44471
44806
|
gasCosts,
|
44807
|
+
maxGasPerTx,
|
44472
44808
|
feeParams: {
|
44473
44809
|
gasPerByte,
|
44474
44810
|
gasPriceFactor
|
@@ -44604,8 +44940,13 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
44604
44940
|
const decodedTransaction = this.decodeTransaction(
|
44605
44941
|
transaction
|
44606
44942
|
);
|
44607
|
-
|
44608
|
-
|
44943
|
+
let txReceipts = [];
|
44944
|
+
if (transaction?.status && "receipts" in transaction.status) {
|
44945
|
+
txReceipts = transaction.status.receipts;
|
44946
|
+
}
|
44947
|
+
const receipts = txReceipts.map(processGqlReceipt) || [];
|
44948
|
+
const { gasPerByte, gasPriceFactor, gasCosts, maxGasPerTx } = this.provider.getGasConfig();
|
44949
|
+
const gasPrice = await this.provider.getLatestGasPrice();
|
44609
44950
|
const maxInputs = this.provider.getChain().consensusParameters.maxInputs;
|
44610
44951
|
const transactionSummary = assembleTransactionSummary({
|
44611
44952
|
id: this.id,
|
@@ -44617,7 +44958,9 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
44617
44958
|
gasPriceFactor,
|
44618
44959
|
abiMap: contractsAbiMap,
|
44619
44960
|
maxInputs,
|
44620
|
-
gasCosts
|
44961
|
+
gasCosts,
|
44962
|
+
maxGasPerTx,
|
44963
|
+
gasPrice
|
44621
44964
|
});
|
44622
44965
|
return transactionSummary;
|
44623
44966
|
}
|
@@ -44761,13 +45104,12 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
44761
45104
|
gasPerByte: bn(feeParams.gasPerByte),
|
44762
45105
|
maxMessageDataLength: bn(predicateParams.maxMessageDataLength),
|
44763
45106
|
chainId: bn(consensusParameters.chainId),
|
44764
|
-
baseAssetId: consensusParameters.baseAssetId,
|
44765
45107
|
gasCosts
|
44766
45108
|
},
|
44767
45109
|
gasCosts,
|
44768
45110
|
latestBlock: {
|
44769
45111
|
id: latestBlock.id,
|
44770
|
-
height: bn(latestBlock.
|
45112
|
+
height: bn(latestBlock.height),
|
44771
45113
|
time: latestBlock.header.time,
|
44772
45114
|
transactions: latestBlock.transactions.map((i) => ({
|
44773
45115
|
id: i.id
|
@@ -44861,10 +45203,8 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
44861
45203
|
* Returns some helpful parameters related to gas fees.
|
44862
45204
|
*/
|
44863
45205
|
getGasConfig() {
|
44864
|
-
const { minGasPrice } = this.getNode();
|
44865
45206
|
const { maxGasPerTx, maxGasPerPredicate, gasPriceFactor, gasPerByte, gasCosts } = this.getChain().consensusParameters;
|
44866
45207
|
return {
|
44867
|
-
minGasPrice,
|
44868
45208
|
maxGasPerTx,
|
44869
45209
|
maxGasPerPredicate,
|
44870
45210
|
gasPriceFactor,
|
@@ -44962,7 +45302,7 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
44962
45302
|
*/
|
44963
45303
|
async getBlockNumber() {
|
44964
45304
|
const { chain } = await this.operations.getChain();
|
44965
|
-
return bn(chain.latestBlock.
|
45305
|
+
return bn(chain.latestBlock.height, 10);
|
44966
45306
|
}
|
44967
45307
|
/**
|
44968
45308
|
* Returns the chain information.
|
@@ -44974,11 +45314,9 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
44974
45314
|
const processedNodeInfo = {
|
44975
45315
|
maxDepth: bn(nodeInfo.maxDepth),
|
44976
45316
|
maxTx: bn(nodeInfo.maxTx),
|
44977
|
-
minGasPrice: bn(nodeInfo.minGasPrice),
|
44978
45317
|
nodeVersion: nodeInfo.nodeVersion,
|
44979
45318
|
utxoValidation: nodeInfo.utxoValidation,
|
44980
|
-
vmBacktrace: nodeInfo.vmBacktrace
|
44981
|
-
peers: nodeInfo.peers
|
45319
|
+
vmBacktrace: nodeInfo.vmBacktrace
|
44982
45320
|
};
|
44983
45321
|
_Provider.nodeInfoCache[this.url] = processedNodeInfo;
|
44984
45322
|
return processedNodeInfo;
|
@@ -45004,17 +45342,6 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
45004
45342
|
} = this.getChain();
|
45005
45343
|
return chainId.toNumber();
|
45006
45344
|
}
|
45007
|
-
/**
|
45008
|
-
* Returns the base asset ID
|
45009
|
-
*
|
45010
|
-
* @returns A promise that resolves to the base asset ID
|
45011
|
-
*/
|
45012
|
-
getBaseAssetId() {
|
45013
|
-
const {
|
45014
|
-
consensusParameters: { baseAssetId }
|
45015
|
-
} = this.getChain();
|
45016
|
-
return baseAssetId;
|
45017
|
-
}
|
45018
45345
|
/**
|
45019
45346
|
* Submits a transaction to the chain to be executed.
|
45020
45347
|
*
|
@@ -45075,14 +45402,13 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
45075
45402
|
return this.estimateTxDependencies(transactionRequest);
|
45076
45403
|
}
|
45077
45404
|
const encodedTransaction = hexlify(transactionRequest.toTransactionBytes());
|
45078
|
-
const { dryRun:
|
45079
|
-
encodedTransaction,
|
45405
|
+
const { dryRun: dryRunStatuses } = await this.operations.dryRun({
|
45406
|
+
encodedTransactions: encodedTransaction,
|
45080
45407
|
utxoValidation: utxoValidation || false
|
45081
45408
|
});
|
45082
|
-
const receipts =
|
45083
|
-
|
45084
|
-
|
45085
|
-
};
|
45409
|
+
const [{ receipts: rawReceipts, status }] = dryRunStatuses;
|
45410
|
+
const receipts = rawReceipts.map(processGqlReceipt);
|
45411
|
+
return { receipts, dryrunStatus: status };
|
45086
45412
|
}
|
45087
45413
|
/**
|
45088
45414
|
* Verifies whether enough gas is available to complete transaction.
|
@@ -45121,9 +45447,6 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
45121
45447
|
* If there are missing variable outputs,
|
45122
45448
|
* `addVariableOutputs` is called on the transaction.
|
45123
45449
|
*
|
45124
|
-
* @privateRemarks
|
45125
|
-
* TODO: Investigate support for missing contract IDs
|
45126
|
-
* TODO: Add support for missing output messages
|
45127
45450
|
*
|
45128
45451
|
* @param transactionRequest - The transaction request object.
|
45129
45452
|
* @returns A promise.
|
@@ -45136,16 +45459,19 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
45136
45459
|
missingContractIds: []
|
45137
45460
|
};
|
45138
45461
|
}
|
45139
|
-
await this.estimatePredicates(transactionRequest);
|
45140
45462
|
let receipts = [];
|
45141
45463
|
const missingContractIds = [];
|
45142
45464
|
let outputVariables = 0;
|
45465
|
+
let dryrunStatus;
|
45143
45466
|
for (let attempt = 0; attempt < MAX_RETRIES; attempt++) {
|
45144
|
-
const {
|
45145
|
-
|
45467
|
+
const {
|
45468
|
+
dryRun: [{ receipts: rawReceipts, status }]
|
45469
|
+
} = await this.operations.dryRun({
|
45470
|
+
encodedTransactions: [hexlify(transactionRequest.toTransactionBytes())],
|
45146
45471
|
utxoValidation: false
|
45147
45472
|
});
|
45148
|
-
receipts =
|
45473
|
+
receipts = rawReceipts.map(processGqlReceipt);
|
45474
|
+
dryrunStatus = status;
|
45149
45475
|
const { missingOutputVariables, missingOutputContractIds } = getReceiptsWithMissingData(receipts);
|
45150
45476
|
const hasMissingOutputs = missingOutputVariables.length !== 0 || missingOutputContractIds.length !== 0;
|
45151
45477
|
if (hasMissingOutputs) {
|
@@ -45155,6 +45481,11 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
45155
45481
|
transactionRequest.addContractInputAndOutput(Address.fromString(contractId));
|
45156
45482
|
missingContractIds.push(contractId);
|
45157
45483
|
});
|
45484
|
+
const { maxFee } = await this.estimateTxGasAndFee({
|
45485
|
+
transactionRequest,
|
45486
|
+
optimizeGas: false
|
45487
|
+
});
|
45488
|
+
transactionRequest.maxFee = maxFee;
|
45158
45489
|
} else {
|
45159
45490
|
break;
|
45160
45491
|
}
|
@@ -45162,7 +45493,133 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
45162
45493
|
return {
|
45163
45494
|
receipts,
|
45164
45495
|
outputVariables,
|
45165
|
-
missingContractIds
|
45496
|
+
missingContractIds,
|
45497
|
+
dryrunStatus
|
45498
|
+
};
|
45499
|
+
}
|
45500
|
+
/**
|
45501
|
+
* Dry runs multiple transactions and checks for missing dependencies in batches.
|
45502
|
+
*
|
45503
|
+
* Transactions are dry run in batches. After each dry run, transactions requiring
|
45504
|
+
* further modifications are identified. The method iteratively updates these transactions
|
45505
|
+
* and performs subsequent dry runs until all dependencies for each transaction are satisfied.
|
45506
|
+
*
|
45507
|
+
* @param transactionRequests - Array of transaction request objects.
|
45508
|
+
* @returns A promise that resolves to an array of results for each transaction.
|
45509
|
+
*/
|
45510
|
+
async estimateMultipleTxDependencies(transactionRequests) {
|
45511
|
+
const results = transactionRequests.map(() => ({
|
45512
|
+
receipts: [],
|
45513
|
+
outputVariables: 0,
|
45514
|
+
missingContractIds: [],
|
45515
|
+
dryrunStatus: void 0
|
45516
|
+
}));
|
45517
|
+
const allRequests = clone_default(transactionRequests);
|
45518
|
+
const serializedTransactionsMap = /* @__PURE__ */ new Map();
|
45519
|
+
allRequests.forEach((req, index) => {
|
45520
|
+
if (req.type === TransactionType.Script) {
|
45521
|
+
serializedTransactionsMap.set(index, hexlify(req.toTransactionBytes()));
|
45522
|
+
}
|
45523
|
+
});
|
45524
|
+
let transactionsToProcess = Array.from(serializedTransactionsMap.keys());
|
45525
|
+
let attempt = 0;
|
45526
|
+
while (transactionsToProcess.length > 0 && attempt < MAX_RETRIES) {
|
45527
|
+
const encodedTransactions = transactionsToProcess.map(
|
45528
|
+
(index) => serializedTransactionsMap.get(index)
|
45529
|
+
);
|
45530
|
+
const dryRunResults = await this.operations.dryRun({
|
45531
|
+
encodedTransactions,
|
45532
|
+
utxoValidation: false
|
45533
|
+
});
|
45534
|
+
const nextRoundTransactions = [];
|
45535
|
+
for (let i = 0; i < dryRunResults.dryRun.length; i++) {
|
45536
|
+
const currentResultIndex = transactionsToProcess[i];
|
45537
|
+
const { receipts: rawReceipts, status } = dryRunResults.dryRun[i];
|
45538
|
+
results[currentResultIndex].receipts = rawReceipts.map(processGqlReceipt);
|
45539
|
+
results[currentResultIndex].dryrunStatus = status;
|
45540
|
+
const { missingOutputVariables, missingOutputContractIds } = getReceiptsWithMissingData(
|
45541
|
+
results[currentResultIndex].receipts
|
45542
|
+
);
|
45543
|
+
const hasMissingOutputs = missingOutputVariables.length > 0 || missingOutputContractIds.length > 0;
|
45544
|
+
const requestToProcess = allRequests[currentResultIndex];
|
45545
|
+
if (hasMissingOutputs && requestToProcess?.type === TransactionType.Script) {
|
45546
|
+
results[currentResultIndex].outputVariables += missingOutputVariables.length;
|
45547
|
+
requestToProcess.addVariableOutputs(missingOutputVariables.length);
|
45548
|
+
missingOutputContractIds.forEach(({ contractId }) => {
|
45549
|
+
requestToProcess.addContractInputAndOutput(Address.fromString(contractId));
|
45550
|
+
results[currentResultIndex].missingContractIds.push(contractId);
|
45551
|
+
});
|
45552
|
+
const { maxFee } = await this.estimateTxGasAndFee({
|
45553
|
+
transactionRequest: requestToProcess,
|
45554
|
+
optimizeGas: false
|
45555
|
+
});
|
45556
|
+
requestToProcess.maxFee = maxFee;
|
45557
|
+
serializedTransactionsMap.set(
|
45558
|
+
currentResultIndex,
|
45559
|
+
hexlify(requestToProcess.toTransactionBytes())
|
45560
|
+
);
|
45561
|
+
nextRoundTransactions.push(currentResultIndex);
|
45562
|
+
allRequests[currentResultIndex] = requestToProcess;
|
45563
|
+
}
|
45564
|
+
}
|
45565
|
+
transactionsToProcess = nextRoundTransactions;
|
45566
|
+
attempt += 1;
|
45567
|
+
}
|
45568
|
+
return results;
|
45569
|
+
}
|
45570
|
+
async dryRunMultipleTransactions(transactionRequests, { utxoValidation, estimateTxDependencies = true } = {}) {
|
45571
|
+
if (estimateTxDependencies) {
|
45572
|
+
return this.estimateMultipleTxDependencies(transactionRequests);
|
45573
|
+
}
|
45574
|
+
const encodedTransactions = transactionRequests.map((tx) => hexlify(tx.toTransactionBytes()));
|
45575
|
+
const { dryRun: dryRunStatuses } = await this.operations.dryRun({
|
45576
|
+
encodedTransactions,
|
45577
|
+
utxoValidation: utxoValidation || false
|
45578
|
+
});
|
45579
|
+
const results = dryRunStatuses.map(({ receipts: rawReceipts, status }) => {
|
45580
|
+
const receipts = rawReceipts.map(processGqlReceipt);
|
45581
|
+
return { receipts, dryrunStatus: status };
|
45582
|
+
});
|
45583
|
+
return results;
|
45584
|
+
}
|
45585
|
+
async estimateTxGasAndFee(params) {
|
45586
|
+
const { transactionRequest, optimizeGas = true } = params;
|
45587
|
+
let { gasPrice } = params;
|
45588
|
+
const chainInfo = this.getChain();
|
45589
|
+
const { gasPriceFactor } = this.getGasConfig();
|
45590
|
+
const minGas = transactionRequest.calculateMinGas(chainInfo);
|
45591
|
+
if (!gasPrice) {
|
45592
|
+
gasPrice = await this.estimateGasPrice(10);
|
45593
|
+
}
|
45594
|
+
const minFee = calculateGasFee({
|
45595
|
+
gasPrice: bn(gasPrice),
|
45596
|
+
gas: minGas,
|
45597
|
+
priceFactor: gasPriceFactor,
|
45598
|
+
tip: transactionRequest.tip
|
45599
|
+
}).add(1);
|
45600
|
+
let gasLimit = bn(0);
|
45601
|
+
if (transactionRequest.type === TransactionType.Script) {
|
45602
|
+
gasLimit = transactionRequest.gasLimit;
|
45603
|
+
if (!optimizeGas) {
|
45604
|
+
transactionRequest.gasLimit = minGas;
|
45605
|
+
gasLimit = transactionRequest.calculateMaxGas(chainInfo, minGas);
|
45606
|
+
transactionRequest.gasLimit = gasLimit;
|
45607
|
+
}
|
45608
|
+
}
|
45609
|
+
const maxGas = transactionRequest.calculateMaxGas(chainInfo, minGas);
|
45610
|
+
const maxFee = calculateGasFee({
|
45611
|
+
gasPrice: bn(gasPrice),
|
45612
|
+
gas: maxGas,
|
45613
|
+
priceFactor: gasPriceFactor,
|
45614
|
+
tip: transactionRequest.tip
|
45615
|
+
}).add(1);
|
45616
|
+
return {
|
45617
|
+
minGas,
|
45618
|
+
minFee,
|
45619
|
+
maxGas,
|
45620
|
+
maxFee,
|
45621
|
+
gasPrice,
|
45622
|
+
gasLimit
|
45166
45623
|
};
|
45167
45624
|
}
|
45168
45625
|
/**
|
@@ -45180,15 +45637,17 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
45180
45637
|
if (estimateTxDependencies) {
|
45181
45638
|
return this.estimateTxDependencies(transactionRequest);
|
45182
45639
|
}
|
45183
|
-
const
|
45184
|
-
const { dryRun:
|
45185
|
-
|
45640
|
+
const encodedTransactions = [hexlify(transactionRequest.toTransactionBytes())];
|
45641
|
+
const { dryRun: dryRunStatuses } = await this.operations.dryRun({
|
45642
|
+
encodedTransactions,
|
45186
45643
|
utxoValidation: true
|
45187
45644
|
});
|
45188
|
-
const
|
45189
|
-
|
45190
|
-
receipts
|
45191
|
-
|
45645
|
+
const callResult = dryRunStatuses.map((dryRunStatus) => {
|
45646
|
+
const { id, receipts, status } = dryRunStatus;
|
45647
|
+
const processedReceipts = receipts.map(processGqlReceipt);
|
45648
|
+
return { id, receipts: processedReceipts, status };
|
45649
|
+
});
|
45650
|
+
return { receipts: callResult[0].receipts };
|
45192
45651
|
}
|
45193
45652
|
/**
|
45194
45653
|
* Returns a transaction cost to enable user
|
@@ -45205,80 +45664,80 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
45205
45664
|
* @param tolerance - The tolerance to add on top of the gasUsed.
|
45206
45665
|
* @returns A promise that resolves to the transaction cost object.
|
45207
45666
|
*/
|
45208
|
-
async getTransactionCost(transactionRequestLike,
|
45209
|
-
estimateTxDependencies = true,
|
45210
|
-
estimatePredicates = true,
|
45211
|
-
resourcesOwner,
|
45212
|
-
signatureCallback
|
45213
|
-
} = {}) {
|
45667
|
+
async getTransactionCost(transactionRequestLike, { resourcesOwner, signatureCallback, quantitiesToContract = [] } = {}) {
|
45214
45668
|
const txRequestClone = clone_default(transactionRequestify(transactionRequestLike));
|
45215
|
-
const chainInfo = this.getChain();
|
45216
|
-
const { gasPriceFactor, minGasPrice, maxGasPerTx } = this.getGasConfig();
|
45217
|
-
const gasPrice = max(txRequestClone.gasPrice, minGasPrice);
|
45218
45669
|
const isScriptTransaction = txRequestClone.type === TransactionType.Script;
|
45219
45670
|
const coinOutputsQuantities = txRequestClone.getCoinOutputsQuantities();
|
45220
|
-
const allQuantities = mergeQuantities(coinOutputsQuantities,
|
45671
|
+
const allQuantities = mergeQuantities(coinOutputsQuantities, quantitiesToContract);
|
45221
45672
|
txRequestClone.fundWithFakeUtxos(allQuantities, resourcesOwner?.address);
|
45222
|
-
|
45223
|
-
|
45224
|
-
|
45225
|
-
}
|
45226
|
-
if (resourcesOwner && "populateTransactionPredicateData" in resourcesOwner) {
|
45227
|
-
resourcesOwner.populateTransactionPredicateData(txRequestClone);
|
45228
|
-
}
|
45229
|
-
await this.estimatePredicates(txRequestClone);
|
45673
|
+
txRequestClone.maxFee = bn(0);
|
45674
|
+
if (isScriptTransaction) {
|
45675
|
+
txRequestClone.gasLimit = bn(0);
|
45230
45676
|
}
|
45231
|
-
if (
|
45232
|
-
|
45677
|
+
if (resourcesOwner && "populateTransactionPredicateData" in resourcesOwner) {
|
45678
|
+
resourcesOwner.populateTransactionPredicateData(txRequestClone);
|
45233
45679
|
}
|
45234
|
-
const
|
45235
|
-
|
45680
|
+
const signedRequest = clone_default(txRequestClone);
|
45681
|
+
let addedSignatures = 0;
|
45682
|
+
if (signatureCallback && isScriptTransaction) {
|
45683
|
+
const lengthBefore = signedRequest.witnesses.length;
|
45684
|
+
await signatureCallback(signedRequest);
|
45685
|
+
addedSignatures = signedRequest.witnesses.length - lengthBefore;
|
45686
|
+
}
|
45687
|
+
await this.estimatePredicates(signedRequest);
|
45688
|
+
let { maxFee, maxGas, minFee, minGas, gasPrice, gasLimit } = await this.estimateTxGasAndFee({
|
45689
|
+
transactionRequest: signedRequest,
|
45690
|
+
optimizeGas: false
|
45691
|
+
});
|
45692
|
+
txRequestClone.maxFee = maxFee;
|
45236
45693
|
let receipts = [];
|
45237
45694
|
let missingContractIds = [];
|
45238
45695
|
let outputVariables = 0;
|
45239
|
-
|
45240
|
-
|
45241
|
-
|
45696
|
+
let gasUsed = bn(0);
|
45697
|
+
txRequestClone.updatePredicateGasUsed(signedRequest.inputs);
|
45698
|
+
if (isScriptTransaction) {
|
45699
|
+
if (signatureCallback) {
|
45700
|
+
await signatureCallback(txRequestClone);
|
45701
|
+
}
|
45702
|
+
txRequestClone.gasLimit = gasLimit;
|
45242
45703
|
const result = await this.estimateTxDependencies(txRequestClone);
|
45243
45704
|
receipts = result.receipts;
|
45244
45705
|
outputVariables = result.outputVariables;
|
45245
45706
|
missingContractIds = result.missingContractIds;
|
45707
|
+
gasUsed = getGasUsedFromReceipts(receipts);
|
45708
|
+
txRequestClone.gasLimit = gasUsed;
|
45709
|
+
({ maxFee, maxGas, minFee, minGas, gasPrice } = await this.estimateTxGasAndFee({
|
45710
|
+
transactionRequest: txRequestClone,
|
45711
|
+
gasPrice
|
45712
|
+
}));
|
45246
45713
|
}
|
45247
|
-
const gasUsed = isScriptTransaction ? getGasUsedFromReceipts(receipts) : minGas;
|
45248
|
-
const usedFee = calculatePriceWithFactor(
|
45249
|
-
gasUsed,
|
45250
|
-
gasPrice,
|
45251
|
-
gasPriceFactor
|
45252
|
-
).normalizeZeroToOne();
|
45253
|
-
const minFee = calculatePriceWithFactor(minGas, gasPrice, gasPriceFactor).normalizeZeroToOne();
|
45254
|
-
const maxFee = calculatePriceWithFactor(maxGas, gasPrice, gasPriceFactor).normalizeZeroToOne();
|
45255
45714
|
return {
|
45256
45715
|
requiredQuantities: allQuantities,
|
45257
45716
|
receipts,
|
45258
45717
|
gasUsed,
|
45259
|
-
minGasPrice,
|
45260
45718
|
gasPrice,
|
45261
45719
|
minGas,
|
45262
45720
|
maxGas,
|
45263
|
-
usedFee,
|
45264
45721
|
minFee,
|
45265
45722
|
maxFee,
|
45266
|
-
estimatedInputs: txRequestClone.inputs,
|
45267
45723
|
outputVariables,
|
45268
|
-
missingContractIds
|
45724
|
+
missingContractIds,
|
45725
|
+
addedSignatures,
|
45726
|
+
estimatedPredicates: txRequestClone.inputs
|
45269
45727
|
};
|
45270
45728
|
}
|
45271
|
-
async getResourcesForTransaction(owner, transactionRequestLike,
|
45729
|
+
async getResourcesForTransaction(owner, transactionRequestLike, quantitiesToContract = []) {
|
45272
45730
|
const ownerAddress = Address.fromAddressOrString(owner);
|
45273
45731
|
const transactionRequest = transactionRequestify(clone_default(transactionRequestLike));
|
45274
|
-
const transactionCost = await this.getTransactionCost(transactionRequest,
|
45732
|
+
const transactionCost = await this.getTransactionCost(transactionRequest, {
|
45733
|
+
quantitiesToContract
|
45734
|
+
});
|
45275
45735
|
transactionRequest.addResources(
|
45276
45736
|
await this.getResourcesToSpend(ownerAddress, transactionCost.requiredQuantities)
|
45277
45737
|
);
|
45278
|
-
const { requiredQuantities, ...txCost } = await this.getTransactionCost(
|
45279
|
-
|
45280
|
-
|
45281
|
-
);
|
45738
|
+
const { requiredQuantities, ...txCost } = await this.getTransactionCost(transactionRequest, {
|
45739
|
+
quantitiesToContract
|
45740
|
+
});
|
45282
45741
|
const resources = await this.getResourcesToSpend(ownerAddress, requiredQuantities);
|
45283
45742
|
return {
|
45284
45743
|
resources,
|
@@ -45302,7 +45761,6 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
45302
45761
|
assetId: coin.assetId,
|
45303
45762
|
amount: bn(coin.amount),
|
45304
45763
|
owner: Address.fromAddressOrString(coin.owner),
|
45305
|
-
maturity: bn(coin.maturity).toNumber(),
|
45306
45764
|
blockCreated: bn(coin.blockCreated),
|
45307
45765
|
txCreatedIdx: bn(coin.txCreatedIdx)
|
45308
45766
|
}));
|
@@ -45354,7 +45812,6 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
45354
45812
|
amount: bn(coin.amount),
|
45355
45813
|
assetId: coin.assetId,
|
45356
45814
|
owner: Address.fromAddressOrString(coin.owner),
|
45357
|
-
maturity: bn(coin.maturity).toNumber(),
|
45358
45815
|
blockCreated: bn(coin.blockCreated),
|
45359
45816
|
txCreatedIdx: bn(coin.txCreatedIdx)
|
45360
45817
|
};
|
@@ -45387,7 +45844,7 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
45387
45844
|
}
|
45388
45845
|
return {
|
45389
45846
|
id: block2.id,
|
45390
|
-
height: bn(block2.
|
45847
|
+
height: bn(block2.height),
|
45391
45848
|
time: block2.header.time,
|
45392
45849
|
transactionIds: block2.transactions.map((tx) => tx.id)
|
45393
45850
|
};
|
@@ -45402,7 +45859,7 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
45402
45859
|
const { blocks: fetchedData } = await this.operations.getBlocks(params);
|
45403
45860
|
const blocks = fetchedData.edges.map(({ node: block2 }) => ({
|
45404
45861
|
id: block2.id,
|
45405
|
-
height: bn(block2.
|
45862
|
+
height: bn(block2.height),
|
45406
45863
|
time: block2.header.time,
|
45407
45864
|
transactionIds: block2.transactions.map((tx) => tx.id)
|
45408
45865
|
}));
|
@@ -45429,7 +45886,7 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
45429
45886
|
}
|
45430
45887
|
return {
|
45431
45888
|
id: block2.id,
|
45432
|
-
height: bn(block2.
|
45889
|
+
height: bn(block2.height, 10),
|
45433
45890
|
time: block2.header.time,
|
45434
45891
|
transactionIds: block2.transactions.map((tx) => tx.id),
|
45435
45892
|
transactions: block2.transactions.map(
|
@@ -45609,7 +46066,6 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
45609
46066
|
prevRoot: messageBlockHeader.prevRoot,
|
45610
46067
|
time: messageBlockHeader.time,
|
45611
46068
|
applicationHash: messageBlockHeader.applicationHash,
|
45612
|
-
messageReceiptRoot: messageBlockHeader.messageReceiptRoot,
|
45613
46069
|
messageReceiptCount: bn(messageBlockHeader.messageReceiptCount)
|
45614
46070
|
},
|
45615
46071
|
commitBlockHeader: {
|
@@ -45621,7 +46077,6 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
45621
46077
|
prevRoot: commitBlockHeader.prevRoot,
|
45622
46078
|
time: commitBlockHeader.time,
|
45623
46079
|
applicationHash: commitBlockHeader.applicationHash,
|
45624
|
-
messageReceiptRoot: commitBlockHeader.messageReceiptRoot,
|
45625
46080
|
messageReceiptCount: bn(commitBlockHeader.messageReceiptCount)
|
45626
46081
|
},
|
45627
46082
|
sender: Address.fromAddressOrString(sender),
|
@@ -45631,6 +46086,16 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
45631
46086
|
data
|
45632
46087
|
};
|
45633
46088
|
}
|
46089
|
+
async getLatestGasPrice() {
|
46090
|
+
const { latestGasPrice } = await this.operations.getLatestGasPrice();
|
46091
|
+
return bn(latestGasPrice.gasPrice);
|
46092
|
+
}
|
46093
|
+
async estimateGasPrice(blockHorizon) {
|
46094
|
+
const { estimateGasPrice } = await this.operations.estimateGasPrice({
|
46095
|
+
blockHorizon: String(blockHorizon)
|
46096
|
+
});
|
46097
|
+
return bn(estimateGasPrice.gasPrice);
|
46098
|
+
}
|
45634
46099
|
/**
|
45635
46100
|
* Returns Message Proof for given transaction id and the message id from MessageOut receipt.
|
45636
46101
|
*
|
@@ -45876,9 +46341,8 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
45876
46341
|
* @param assetId - The asset ID to check the balance for.
|
45877
46342
|
* @returns A promise that resolves to the balance amount.
|
45878
46343
|
*/
|
45879
|
-
async getBalance(assetId) {
|
45880
|
-
const
|
45881
|
-
const amount = await this.provider.getBalance(this.address, assetIdToFetch);
|
46344
|
+
async getBalance(assetId = BaseAssetId) {
|
46345
|
+
const amount = await this.provider.getBalance(this.address, assetId);
|
45882
46346
|
return amount;
|
45883
46347
|
}
|
45884
46348
|
/**
|
@@ -45915,37 +46379,33 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
45915
46379
|
* @param fee - The estimated transaction fee.
|
45916
46380
|
* @returns A promise that resolves when the resources are added to the transaction.
|
45917
46381
|
*/
|
45918
|
-
async fund(request,
|
45919
|
-
const
|
45920
|
-
const
|
46382
|
+
async fund(request, params) {
|
46383
|
+
const { addedSignatures, estimatedPredicates, maxFee: fee, requiredQuantities } = params;
|
46384
|
+
const txRequest = request;
|
46385
|
+
const requiredQuantitiesWithFee = addAmountToCoinQuantities({
|
45921
46386
|
amount: bn(fee),
|
45922
|
-
assetId:
|
45923
|
-
coinQuantities
|
46387
|
+
assetId: BaseAssetId,
|
46388
|
+
coinQuantities: requiredQuantities
|
45924
46389
|
});
|
45925
46390
|
const quantitiesDict = {};
|
45926
|
-
|
46391
|
+
requiredQuantitiesWithFee.forEach(({ amount, assetId }) => {
|
45927
46392
|
quantitiesDict[assetId] = {
|
45928
46393
|
required: amount,
|
45929
46394
|
owned: bn(0)
|
45930
46395
|
};
|
45931
46396
|
});
|
45932
|
-
|
45933
|
-
const cachedMessages = [];
|
45934
|
-
const owner = this.address.toB256();
|
45935
|
-
request.inputs.forEach((input) => {
|
46397
|
+
txRequest.inputs.forEach((input) => {
|
45936
46398
|
const isResource = "amount" in input;
|
45937
46399
|
if (isResource) {
|
45938
46400
|
const isCoin2 = "owner" in input;
|
45939
46401
|
if (isCoin2) {
|
45940
46402
|
const assetId = String(input.assetId);
|
45941
|
-
if (
|
46403
|
+
if (quantitiesDict[assetId]) {
|
45942
46404
|
const amount = bn(input.amount);
|
45943
46405
|
quantitiesDict[assetId].owned = quantitiesDict[assetId].owned.add(amount);
|
45944
|
-
cachedUtxos.push(input.id);
|
45945
46406
|
}
|
45946
|
-
} else if (input.
|
45947
|
-
quantitiesDict[
|
45948
|
-
cachedMessages.push(input.nonce);
|
46407
|
+
} else if (input.amount && quantitiesDict[BaseAssetId]) {
|
46408
|
+
quantitiesDict[BaseAssetId].owned = quantitiesDict[BaseAssetId].owned.add(input.amount);
|
45949
46409
|
}
|
45950
46410
|
}
|
45951
46411
|
});
|
@@ -45960,12 +46420,23 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
45960
46420
|
});
|
45961
46421
|
const needsToBeFunded = missingQuantities.length;
|
45962
46422
|
if (needsToBeFunded) {
|
45963
|
-
const
|
45964
|
-
|
45965
|
-
|
45966
|
-
|
45967
|
-
|
46423
|
+
const excludedIds = cacheTxInputsFromOwner(txRequest.inputs, this.address.toB256());
|
46424
|
+
const resources = await this.getResourcesToSpend(missingQuantities, excludedIds);
|
46425
|
+
txRequest.addResources(resources);
|
46426
|
+
}
|
46427
|
+
txRequest.shiftPredicateData();
|
46428
|
+
txRequest.updatePredicateGasUsed(estimatedPredicates);
|
46429
|
+
const requestToBeReEstimate = clone_default(txRequest);
|
46430
|
+
if (addedSignatures) {
|
46431
|
+
Array.from({ length: addedSignatures }).forEach(
|
46432
|
+
() => requestToBeReEstimate.addEmptyWitness()
|
46433
|
+
);
|
45968
46434
|
}
|
46435
|
+
const { maxFee } = await this.provider.estimateTxGasAndFee({
|
46436
|
+
transactionRequest: requestToBeReEstimate
|
46437
|
+
});
|
46438
|
+
txRequest.maxFee = maxFee;
|
46439
|
+
return txRequest;
|
45969
46440
|
}
|
45970
46441
|
/**
|
45971
46442
|
* A helper that creates a transfer transaction request and returns it.
|
@@ -45973,29 +46444,25 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
45973
46444
|
* @param destination - The address of the destination.
|
45974
46445
|
* @param amount - The amount of coins to transfer.
|
45975
46446
|
* @param assetId - The asset ID of the coins to transfer.
|
45976
|
-
* @param txParams - The transaction parameters (gasLimit,
|
46447
|
+
* @param txParams - The transaction parameters (gasLimit, tip, maturity, maxFee, witnessLimit).
|
45977
46448
|
* @returns A promise that resolves to the prepared transaction request.
|
45978
46449
|
*/
|
45979
|
-
async createTransfer(destination, amount, assetId, txParams = {}) {
|
45980
|
-
const
|
45981
|
-
|
45982
|
-
const
|
45983
|
-
const request = new ScriptTransactionRequest(params);
|
45984
|
-
request.addCoinOutput(Address.fromAddressOrString(destination), amount, assetIdToTransfer);
|
45985
|
-
const { maxFee, requiredQuantities, gasUsed, estimatedInputs } = await this.provider.getTransactionCost(request, [], {
|
46450
|
+
async createTransfer(destination, amount, assetId = BaseAssetId, txParams = {}) {
|
46451
|
+
const request = new ScriptTransactionRequest(txParams);
|
46452
|
+
request.addCoinOutput(Address.fromAddressOrString(destination), amount, assetId);
|
46453
|
+
const txCost = await this.provider.getTransactionCost(request, {
|
45986
46454
|
estimateTxDependencies: true,
|
45987
46455
|
resourcesOwner: this
|
45988
46456
|
});
|
45989
|
-
|
45990
|
-
|
45991
|
-
|
45992
|
-
|
45993
|
-
|
45994
|
-
|
45995
|
-
|
45996
|
-
|
45997
|
-
await this.fund(request,
|
45998
|
-
request.updatePredicateInputs(estimatedInputs);
|
46457
|
+
if ("gasLimit" in txParams) {
|
46458
|
+
this.validateGas({
|
46459
|
+
gasUsed: txCost.gasUsed,
|
46460
|
+
gasLimit: request.gasLimit
|
46461
|
+
});
|
46462
|
+
}
|
46463
|
+
request.gasLimit = txCost.gasUsed;
|
46464
|
+
request.maxFee = txCost.maxFee;
|
46465
|
+
await this.fund(request, txCost);
|
45999
46466
|
return request;
|
46000
46467
|
}
|
46001
46468
|
/**
|
@@ -46007,15 +46474,14 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
46007
46474
|
* @param txParams - The transaction parameters (gasLimit, gasPrice, maturity).
|
46008
46475
|
* @returns A promise that resolves to the transaction response.
|
46009
46476
|
*/
|
46010
|
-
async transfer(destination, amount, assetId, txParams = {}) {
|
46477
|
+
async transfer(destination, amount, assetId = BaseAssetId, txParams = {}) {
|
46011
46478
|
if (bn(amount).lte(0)) {
|
46012
46479
|
throw new FuelError(
|
46013
46480
|
ErrorCode.INVALID_TRANSFER_AMOUNT,
|
46014
46481
|
"Transfer amount must be a positive number."
|
46015
46482
|
);
|
46016
46483
|
}
|
46017
|
-
const
|
46018
|
-
const request = await this.createTransfer(destination, amount, assetIdToTransfer, txParams);
|
46484
|
+
const request = await this.createTransfer(destination, amount, assetId, txParams);
|
46019
46485
|
return this.sendTransaction(request, { estimateTxDependencies: false });
|
46020
46486
|
}
|
46021
46487
|
/**
|
@@ -46027,7 +46493,7 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
46027
46493
|
* @param txParams - The optional transaction parameters.
|
46028
46494
|
* @returns A promise that resolves to the transaction response.
|
46029
46495
|
*/
|
46030
|
-
async transferToContract(contractId, amount, assetId, txParams = {}) {
|
46496
|
+
async transferToContract(contractId, amount, assetId = BaseAssetId, txParams = {}) {
|
46031
46497
|
if (bn(amount).lte(0)) {
|
46032
46498
|
throw new FuelError(
|
46033
46499
|
ErrorCode.INVALID_TRANSFER_AMOUNT,
|
@@ -46035,32 +46501,30 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
46035
46501
|
);
|
46036
46502
|
}
|
46037
46503
|
const contractAddress = Address.fromAddressOrString(contractId);
|
46038
|
-
const { minGasPrice } = this.provider.getGasConfig();
|
46039
|
-
const assetIdToTransfer = assetId ?? this.provider.getBaseAssetId();
|
46040
|
-
const params = { gasPrice: minGasPrice, ...txParams };
|
46041
46504
|
const { script, scriptData } = await assembleTransferToContractScript({
|
46042
46505
|
hexlifiedContractId: contractAddress.toB256(),
|
46043
46506
|
amountToTransfer: bn(amount),
|
46044
|
-
assetId
|
46507
|
+
assetId
|
46045
46508
|
});
|
46046
46509
|
const request = new ScriptTransactionRequest({
|
46047
|
-
...
|
46510
|
+
...txParams,
|
46048
46511
|
script,
|
46049
46512
|
scriptData
|
46050
46513
|
});
|
46051
46514
|
request.addContractInputAndOutput(contractAddress);
|
46052
|
-
const
|
46053
|
-
|
46054
|
-
[{ amount: bn(amount), assetId: String(
|
46055
|
-
);
|
46056
|
-
request.gasLimit = bn(params.gasLimit ?? gasUsed);
|
46057
|
-
this.validateGas({
|
46058
|
-
gasUsed,
|
46059
|
-
gasPrice: request.gasPrice,
|
46060
|
-
gasLimit: request.gasLimit,
|
46061
|
-
minGasPrice
|
46515
|
+
const txCost = await this.provider.getTransactionCost(request, {
|
46516
|
+
resourcesOwner: this,
|
46517
|
+
quantitiesToContract: [{ amount: bn(amount), assetId: String(assetId) }]
|
46062
46518
|
});
|
46063
|
-
|
46519
|
+
if (txParams.gasLimit) {
|
46520
|
+
this.validateGas({
|
46521
|
+
gasUsed: txCost.gasUsed,
|
46522
|
+
gasLimit: request.gasLimit
|
46523
|
+
});
|
46524
|
+
}
|
46525
|
+
request.gasLimit = txCost.gasUsed;
|
46526
|
+
request.maxFee = txCost.maxFee;
|
46527
|
+
await this.fund(request, txCost);
|
46064
46528
|
return this.sendTransaction(request);
|
46065
46529
|
}
|
46066
46530
|
/**
|
@@ -46072,8 +46536,6 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
46072
46536
|
* @returns A promise that resolves to the transaction response.
|
46073
46537
|
*/
|
46074
46538
|
async withdrawToBaseLayer(recipient, amount, txParams = {}) {
|
46075
|
-
const { minGasPrice } = this.provider.getGasConfig();
|
46076
|
-
const baseAssetId = this.provider.getBaseAssetId();
|
46077
46539
|
const recipientAddress = Address.fromAddressOrString(recipient);
|
46078
46540
|
const recipientDataArray = arrayify(
|
46079
46541
|
"0x".concat(recipientAddress.toHexString().substring(2).padStart(64, "0"))
|
@@ -46086,21 +46548,19 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
46086
46548
|
...recipientDataArray,
|
46087
46549
|
...amountDataArray
|
46088
46550
|
]);
|
46089
|
-
const params = { script,
|
46551
|
+
const params = { script, ...txParams };
|
46090
46552
|
const request = new ScriptTransactionRequest(params);
|
46091
|
-
const
|
46092
|
-
const
|
46093
|
-
|
46094
|
-
|
46095
|
-
|
46096
|
-
|
46097
|
-
|
46098
|
-
|
46099
|
-
|
46100
|
-
|
46101
|
-
|
46102
|
-
});
|
46103
|
-
await this.fund(request, requiredQuantities, maxFee);
|
46553
|
+
const quantitiesToContract = [{ amount: bn(amount), assetId: BaseAssetId }];
|
46554
|
+
const txCost = await this.provider.getTransactionCost(request, { quantitiesToContract });
|
46555
|
+
if (txParams.gasLimit) {
|
46556
|
+
this.validateGas({
|
46557
|
+
gasUsed: txCost.gasUsed,
|
46558
|
+
gasLimit: request.gasLimit
|
46559
|
+
});
|
46560
|
+
}
|
46561
|
+
request.maxFee = txCost.maxFee;
|
46562
|
+
request.gasLimit = txCost.gasUsed;
|
46563
|
+
await this.fund(request, txCost);
|
46104
46564
|
return this.sendTransaction(request);
|
46105
46565
|
}
|
46106
46566
|
async signMessage(message) {
|
@@ -46158,18 +46618,7 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
46158
46618
|
}
|
46159
46619
|
return this.provider.simulate(transactionRequest, { estimateTxDependencies: false });
|
46160
46620
|
}
|
46161
|
-
validateGas({
|
46162
|
-
gasUsed,
|
46163
|
-
gasPrice,
|
46164
|
-
gasLimit,
|
46165
|
-
minGasPrice
|
46166
|
-
}) {
|
46167
|
-
if (minGasPrice.gt(gasPrice)) {
|
46168
|
-
throw new FuelError(
|
46169
|
-
ErrorCode.GAS_PRICE_TOO_LOW,
|
46170
|
-
`Gas price '${gasPrice}' is lower than the required: '${minGasPrice}'.`
|
46171
|
-
);
|
46172
|
-
}
|
46621
|
+
validateGas({ gasUsed, gasLimit }) {
|
46173
46622
|
if (gasUsed.gt(gasLimit)) {
|
46174
46623
|
throw new FuelError(
|
46175
46624
|
ErrorCode.GAS_LIMIT_TOO_LOW,
|
@@ -47552,12 +48001,12 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
47552
48001
|
};
|
47553
48002
|
|
47554
48003
|
// ../../node_modules/.pnpm/uuid@9.0.0/node_modules/uuid/dist/esm-node/rng.js
|
47555
|
-
var
|
48004
|
+
var import_crypto16 = __toESM(__require("crypto"));
|
47556
48005
|
var rnds8Pool = new Uint8Array(256);
|
47557
48006
|
var poolPtr = rnds8Pool.length;
|
47558
48007
|
function rng() {
|
47559
48008
|
if (poolPtr > rnds8Pool.length - 16) {
|
47560
|
-
|
48009
|
+
import_crypto16.default.randomFillSync(rnds8Pool);
|
47561
48010
|
poolPtr = 0;
|
47562
48011
|
}
|
47563
48012
|
return rnds8Pool.slice(poolPtr, poolPtr += 16);
|
@@ -47573,9 +48022,9 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
47573
48022
|
}
|
47574
48023
|
|
47575
48024
|
// ../../node_modules/.pnpm/uuid@9.0.0/node_modules/uuid/dist/esm-node/native.js
|
47576
|
-
var
|
48025
|
+
var import_crypto17 = __toESM(__require("crypto"));
|
47577
48026
|
var native_default = {
|
47578
|
-
randomUUID:
|
48027
|
+
randomUUID: import_crypto17.default.randomUUID
|
47579
48028
|
};
|
47580
48029
|
|
47581
48030
|
// ../../node_modules/.pnpm/uuid@9.0.0/node_modules/uuid/dist/esm-node/v4.js
|
@@ -47758,7 +48207,7 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
47758
48207
|
* @param transactionRequestLike - The transaction request to send.
|
47759
48208
|
* @returns A promise that resolves to the TransactionResponse object.
|
47760
48209
|
*/
|
47761
|
-
async sendTransaction(transactionRequestLike, { estimateTxDependencies =
|
48210
|
+
async sendTransaction(transactionRequestLike, { estimateTxDependencies = false, awaitExecution } = {}) {
|
47762
48211
|
const transactionRequest = transactionRequestify(transactionRequestLike);
|
47763
48212
|
if (estimateTxDependencies) {
|
47764
48213
|
await this.provider.estimateTxDependencies(transactionRequest);
|
@@ -50518,14 +50967,15 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
50518
50967
|
process.env.GENESIS_SECRET || randomBytes22(32),
|
50519
50968
|
wallet.provider
|
50520
50969
|
);
|
50521
|
-
const
|
50522
|
-
|
50523
|
-
|
50524
|
-
|
50525
|
-
gasPrice: minGasPrice
|
50970
|
+
const request = new ScriptTransactionRequest();
|
50971
|
+
quantities.forEach((quantity) => {
|
50972
|
+
const { amount, assetId } = coinQuantityfy(quantity);
|
50973
|
+
request.addCoinOutput(wallet.address, amount, assetId);
|
50526
50974
|
});
|
50527
|
-
|
50528
|
-
|
50975
|
+
const txCost = await genesisWallet.provider.getTransactionCost(request);
|
50976
|
+
request.gasLimit = txCost.gasUsed;
|
50977
|
+
request.maxFee = txCost.maxFee;
|
50978
|
+
await genesisWallet.fund(request, txCost);
|
50529
50979
|
await genesisWallet.sendTransaction(request, { awaitExecution: true });
|
50530
50980
|
};
|
50531
50981
|
|
@@ -50555,7 +51005,7 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
50555
51005
|
|
50556
51006
|
// src/test-utils/launchNode.ts
|
50557
51007
|
var import_child_process = __require("child_process");
|
50558
|
-
var
|
51008
|
+
var import_crypto21 = __require("crypto");
|
50559
51009
|
var import_fs2 = __require("fs");
|
50560
51010
|
var import_os = __toESM(__require("os"));
|
50561
51011
|
var import_path8 = __toESM(__require("path"));
|
@@ -50604,12 +51054,12 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
50604
51054
|
// eslint-disable-next-line no-async-promise-executor
|
50605
51055
|
new Promise(async (resolve, reject) => {
|
50606
51056
|
const remainingArgs = extractRemainingArgs(args, [
|
50607
|
-
"--
|
51057
|
+
"--snapshot",
|
50608
51058
|
"--consensus-key",
|
50609
51059
|
"--db-type",
|
50610
51060
|
"--poa-instant"
|
50611
51061
|
]);
|
50612
|
-
const chainConfigPath = getFlagValueFromArgs(args, "--
|
51062
|
+
const chainConfigPath = getFlagValueFromArgs(args, "--snapshot");
|
50613
51063
|
const consensusKey = getFlagValueFromArgs(args, "--consensus-key") || defaultConsensusKey;
|
50614
51064
|
const dbTypeFlagValue = getFlagValueFromArgs(args, "--db-type");
|
50615
51065
|
const useInMemoryDb = dbTypeFlagValue === "in-memory" || dbTypeFlagValue === void 0;
|
@@ -50627,37 +51077,55 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
50627
51077
|
})).toString();
|
50628
51078
|
let chainConfigPathToUse;
|
50629
51079
|
const prefix = basePath || import_os.default.tmpdir();
|
50630
|
-
const suffix = basePath ? "" : (0,
|
50631
|
-
const tempDirPath = import_path8.default.join(prefix, ".fuels", suffix);
|
51080
|
+
const suffix = basePath ? "" : (0, import_crypto21.randomUUID)();
|
51081
|
+
const tempDirPath = import_path8.default.join(prefix, ".fuels", suffix, "chainConfigs");
|
50632
51082
|
if (chainConfigPath) {
|
50633
51083
|
chainConfigPathToUse = chainConfigPath;
|
50634
51084
|
} else {
|
50635
51085
|
if (!(0, import_fs2.existsSync)(tempDirPath)) {
|
50636
51086
|
(0, import_fs2.mkdirSync)(tempDirPath, { recursive: true });
|
50637
51087
|
}
|
50638
|
-
|
50639
|
-
|
51088
|
+
let { stateConfigJson } = defaultChainConfigs;
|
51089
|
+
const { chainConfigJson, metadataJson } = defaultChainConfigs;
|
51090
|
+
stateConfigJson = {
|
51091
|
+
...stateConfigJson,
|
51092
|
+
coins: [
|
51093
|
+
...stateConfigJson.coins.map((coin) => ({
|
51094
|
+
...coin,
|
51095
|
+
amount: "18446744073709551615"
|
51096
|
+
}))
|
51097
|
+
],
|
51098
|
+
messages: stateConfigJson.messages.map((message) => ({
|
51099
|
+
...message,
|
51100
|
+
amount: "18446744073709551615"
|
51101
|
+
}))
|
51102
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
51103
|
+
};
|
50640
51104
|
if (!process.env.GENESIS_SECRET) {
|
50641
51105
|
const pk = Signer.generatePrivateKey();
|
50642
51106
|
const signer = new Signer(pk);
|
50643
51107
|
process.env.GENESIS_SECRET = hexlify(pk);
|
50644
|
-
|
50645
|
-
|
50646
|
-
|
50647
|
-
|
50648
|
-
|
50649
|
-
|
50650
|
-
|
50651
|
-
|
50652
|
-
|
50653
|
-
|
50654
|
-
}
|
50655
|
-
]
|
50656
|
-
}
|
50657
|
-
};
|
51108
|
+
stateConfigJson.coins.push({
|
51109
|
+
tx_id: hexlify(randomBytes3(34)),
|
51110
|
+
owner: signer.address.toHexString(),
|
51111
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
51112
|
+
amount: "18446744073709551615",
|
51113
|
+
asset_id: BaseAssetId,
|
51114
|
+
output_index: 0,
|
51115
|
+
tx_pointer_block_height: 0,
|
51116
|
+
tx_pointer_tx_idx: 0
|
51117
|
+
});
|
50658
51118
|
}
|
50659
|
-
|
50660
|
-
|
51119
|
+
let fixedStateConfigJSON = JSON.stringify(stateConfigJson);
|
51120
|
+
const regexMakeNumber = /("amount":)"(\d+)"/gm;
|
51121
|
+
fixedStateConfigJSON = fixedStateConfigJSON.replace(regexMakeNumber, "$1$2");
|
51122
|
+
const chainConfigWritePath = import_path8.default.join(tempDirPath, "chainConfig.json");
|
51123
|
+
const stateConfigWritePath = import_path8.default.join(tempDirPath, "stateConfig.json");
|
51124
|
+
const metadataWritePath = import_path8.default.join(tempDirPath, "metadata.json");
|
51125
|
+
(0, import_fs2.writeFileSync)(chainConfigWritePath, JSON.stringify(chainConfigJson), "utf8");
|
51126
|
+
(0, import_fs2.writeFileSync)(stateConfigWritePath, fixedStateConfigJSON, "utf8");
|
51127
|
+
(0, import_fs2.writeFileSync)(metadataWritePath, JSON.stringify(metadataJson), "utf8");
|
51128
|
+
chainConfigPathToUse = tempDirPath;
|
50661
51129
|
}
|
50662
51130
|
const child = (0, import_child_process.spawn)(
|
50663
51131
|
command,
|
@@ -50666,10 +51134,10 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
50666
51134
|
["--ip", ipToUse],
|
50667
51135
|
["--port", portToUse],
|
50668
51136
|
useInMemoryDb ? ["--db-type", "in-memory"] : ["--db-path", tempDirPath],
|
50669
|
-
["--min-gas-price", "
|
51137
|
+
["--min-gas-price", "1"],
|
50670
51138
|
poaInstant ? ["--poa-instant", "true"] : [],
|
50671
51139
|
["--consensus-key", consensusKey],
|
50672
|
-
["--
|
51140
|
+
["--snapshot", chainConfigPathToUse],
|
50673
51141
|
"--vm-backtrace",
|
50674
51142
|
"--utxo-validation",
|
50675
51143
|
"--debug",
|
@@ -50716,10 +51184,9 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
50716
51184
|
})
|
50717
51185
|
);
|
50718
51186
|
var generateWallets = async (count, provider) => {
|
50719
|
-
const baseAssetId = provider.getBaseAssetId();
|
50720
51187
|
const wallets = [];
|
50721
51188
|
for (let i = 0; i < count; i += 1) {
|
50722
|
-
const wallet = await generateTestWallet(provider, [[1e3,
|
51189
|
+
const wallet = await generateTestWallet(provider, [[1e3, BaseAssetId]]);
|
50723
51190
|
wallets.push(wallet);
|
50724
51191
|
}
|
50725
51192
|
return wallets;
|
@@ -50729,7 +51196,7 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
50729
51196
|
walletCount = 10
|
50730
51197
|
} = {}) => {
|
50731
51198
|
const { cleanup: closeNode, ip, port } = await launchNode(launchNodeOptions || {});
|
50732
|
-
const provider = await Provider.create(`http://${ip}:${port}/graphql`);
|
51199
|
+
const provider = await Provider.create(`http://${ip}:${port}/v1/graphql`);
|
50733
51200
|
const wallets = await generateWallets(walletCount, provider);
|
50734
51201
|
const cleanup = () => {
|
50735
51202
|
closeNode();
|