@fuel-ts/account 0.0.0-rc-1976-20240406124842 → 0.0.0-rc-2021-20240408141516
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 +865 -615
- package/dist/index.global.js.map +1 -1
- package/dist/index.js +845 -609
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +687 -452
- 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 +1580 -1116
- package/dist/test-utils.global.js.map +1 -1
- package/dist/test-utils.js +821 -606
- package/dist/test-utils.js.map +1 -1
- package/dist/test-utils.mjs +679 -464
- 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
|
},
|
@@ -42327,9 +42641,6 @@ ${MessageCoinFragmentFragmentDoc}`;
|
|
42327
42641
|
}
|
42328
42642
|
};
|
42329
42643
|
|
42330
|
-
// ../address/dist/configs.mjs
|
42331
|
-
var ZeroBytes32 = "0x0000000000000000000000000000000000000000000000000000000000000000";
|
42332
|
-
|
42333
42644
|
// src/providers/transaction-request/input.ts
|
42334
42645
|
var inputify = (value) => {
|
42335
42646
|
const { type: type3 } = value;
|
@@ -42340,7 +42651,7 @@ ${MessageCoinFragmentFragmentDoc}`;
|
|
42340
42651
|
return {
|
42341
42652
|
type: InputType.Coin,
|
42342
42653
|
txID: hexlify(arrayify(value.id).slice(0, 32)),
|
42343
|
-
outputIndex: arrayify(value.id)
|
42654
|
+
outputIndex: toNumber2(arrayify(value.id).slice(32, 34)),
|
42344
42655
|
owner: hexlify(value.owner),
|
42345
42656
|
amount: bn(value.amount),
|
42346
42657
|
assetId: hexlify(value.assetId),
|
@@ -42349,10 +42660,9 @@ ${MessageCoinFragmentFragmentDoc}`;
|
|
42349
42660
|
txIndex: toNumber2(arrayify(value.txPointer).slice(8, 16))
|
42350
42661
|
},
|
42351
42662
|
witnessIndex: value.witnessIndex,
|
42352
|
-
maturity: value.maturity ?? 0,
|
42353
42663
|
predicateGasUsed: bn(value.predicateGasUsed),
|
42354
|
-
predicateLength: predicate.length,
|
42355
|
-
predicateDataLength: predicateData.length,
|
42664
|
+
predicateLength: bn(predicate.length),
|
42665
|
+
predicateDataLength: bn(predicateData.length),
|
42356
42666
|
predicate: hexlify(predicate),
|
42357
42667
|
predicateData: hexlify(predicateData)
|
42358
42668
|
};
|
@@ -42383,8 +42693,8 @@ ${MessageCoinFragmentFragmentDoc}`;
|
|
42383
42693
|
nonce: hexlify(value.nonce),
|
42384
42694
|
witnessIndex: value.witnessIndex,
|
42385
42695
|
predicateGasUsed: bn(value.predicateGasUsed),
|
42386
|
-
predicateLength: predicate.length,
|
42387
|
-
predicateDataLength: predicateData.length,
|
42696
|
+
predicateLength: bn(predicate.length),
|
42697
|
+
predicateDataLength: bn(predicateData.length),
|
42388
42698
|
predicate: hexlify(predicate),
|
42389
42699
|
predicateData: hexlify(predicateData),
|
42390
42700
|
data: hexlify(data),
|
@@ -42541,8 +42851,8 @@ ${MessageCoinFragmentFragmentDoc}`;
|
|
42541
42851
|
case "CALL" /* Call */: {
|
42542
42852
|
const callReceipt = {
|
42543
42853
|
type: ReceiptType.Call,
|
42544
|
-
from: hexOrZero(receipt.
|
42545
|
-
to: hexOrZero(receipt?.to
|
42854
|
+
from: hexOrZero(receipt.id || receipt.contractId),
|
42855
|
+
to: hexOrZero(receipt?.to),
|
42546
42856
|
amount: bn(receipt.amount),
|
42547
42857
|
assetId: hexOrZero(receipt.assetId),
|
42548
42858
|
gas: bn(receipt.gas),
|
@@ -42556,7 +42866,7 @@ ${MessageCoinFragmentFragmentDoc}`;
|
|
42556
42866
|
case "RETURN" /* Return */: {
|
42557
42867
|
const returnReceipt = {
|
42558
42868
|
type: ReceiptType.Return,
|
42559
|
-
id: hexOrZero(receipt.
|
42869
|
+
id: hexOrZero(receipt.id || receipt.contractId),
|
42560
42870
|
val: bn(receipt.val),
|
42561
42871
|
pc: bn(receipt.pc),
|
42562
42872
|
is: bn(receipt.is)
|
@@ -42566,7 +42876,7 @@ ${MessageCoinFragmentFragmentDoc}`;
|
|
42566
42876
|
case "RETURN_DATA" /* ReturnData */: {
|
42567
42877
|
const returnDataReceipt = {
|
42568
42878
|
type: ReceiptType.ReturnData,
|
42569
|
-
id: hexOrZero(receipt.
|
42879
|
+
id: hexOrZero(receipt.id || receipt.contractId),
|
42570
42880
|
ptr: bn(receipt.ptr),
|
42571
42881
|
len: bn(receipt.len),
|
42572
42882
|
digest: hexOrZero(receipt.digest),
|
@@ -42578,7 +42888,7 @@ ${MessageCoinFragmentFragmentDoc}`;
|
|
42578
42888
|
case "PANIC" /* Panic */: {
|
42579
42889
|
const panicReceipt = {
|
42580
42890
|
type: ReceiptType.Panic,
|
42581
|
-
id: hexOrZero(receipt.
|
42891
|
+
id: hexOrZero(receipt.id),
|
42582
42892
|
reason: bn(receipt.reason),
|
42583
42893
|
pc: bn(receipt.pc),
|
42584
42894
|
is: bn(receipt.is),
|
@@ -42589,7 +42899,7 @@ ${MessageCoinFragmentFragmentDoc}`;
|
|
42589
42899
|
case "REVERT" /* Revert */: {
|
42590
42900
|
const revertReceipt = {
|
42591
42901
|
type: ReceiptType.Revert,
|
42592
|
-
id: hexOrZero(receipt.
|
42902
|
+
id: hexOrZero(receipt.id || receipt.contractId),
|
42593
42903
|
val: bn(receipt.ra),
|
42594
42904
|
pc: bn(receipt.pc),
|
42595
42905
|
is: bn(receipt.is)
|
@@ -42599,7 +42909,7 @@ ${MessageCoinFragmentFragmentDoc}`;
|
|
42599
42909
|
case "LOG" /* Log */: {
|
42600
42910
|
const logReceipt = {
|
42601
42911
|
type: ReceiptType.Log,
|
42602
|
-
id: hexOrZero(receipt.
|
42912
|
+
id: hexOrZero(receipt.id || receipt.contractId),
|
42603
42913
|
val0: bn(receipt.ra),
|
42604
42914
|
val1: bn(receipt.rb),
|
42605
42915
|
val2: bn(receipt.rc),
|
@@ -42612,7 +42922,7 @@ ${MessageCoinFragmentFragmentDoc}`;
|
|
42612
42922
|
case "LOG_DATA" /* LogData */: {
|
42613
42923
|
const logDataReceipt = {
|
42614
42924
|
type: ReceiptType.LogData,
|
42615
|
-
id: hexOrZero(receipt.
|
42925
|
+
id: hexOrZero(receipt.id || receipt.contractId),
|
42616
42926
|
val0: bn(receipt.ra),
|
42617
42927
|
val1: bn(receipt.rb),
|
42618
42928
|
ptr: bn(receipt.ptr),
|
@@ -42626,8 +42936,8 @@ ${MessageCoinFragmentFragmentDoc}`;
|
|
42626
42936
|
case "TRANSFER" /* Transfer */: {
|
42627
42937
|
const transferReceipt = {
|
42628
42938
|
type: ReceiptType.Transfer,
|
42629
|
-
from: hexOrZero(receipt.
|
42630
|
-
to: hexOrZero(receipt.toAddress || receipt?.to
|
42939
|
+
from: hexOrZero(receipt.id || receipt.contractId),
|
42940
|
+
to: hexOrZero(receipt.toAddress || receipt?.to),
|
42631
42941
|
amount: bn(receipt.amount),
|
42632
42942
|
assetId: hexOrZero(receipt.assetId),
|
42633
42943
|
pc: bn(receipt.pc),
|
@@ -42638,8 +42948,8 @@ ${MessageCoinFragmentFragmentDoc}`;
|
|
42638
42948
|
case "TRANSFER_OUT" /* TransferOut */: {
|
42639
42949
|
const transferOutReceipt = {
|
42640
42950
|
type: ReceiptType.TransferOut,
|
42641
|
-
from: hexOrZero(receipt.
|
42642
|
-
to: hexOrZero(receipt.toAddress || receipt.to
|
42951
|
+
from: hexOrZero(receipt.id || receipt.contractId),
|
42952
|
+
to: hexOrZero(receipt.toAddress || receipt.to),
|
42643
42953
|
amount: bn(receipt.amount),
|
42644
42954
|
assetId: hexOrZero(receipt.assetId),
|
42645
42955
|
pc: bn(receipt.pc),
|
@@ -42682,7 +42992,7 @@ ${MessageCoinFragmentFragmentDoc}`;
|
|
42682
42992
|
return receiptMessageOut;
|
42683
42993
|
}
|
42684
42994
|
case "MINT" /* Mint */: {
|
42685
|
-
const contractId = hexOrZero(receipt.
|
42995
|
+
const contractId = hexOrZero(receipt.id || receipt.contractId);
|
42686
42996
|
const subId = hexOrZero(receipt.subId);
|
42687
42997
|
const assetId = ReceiptMintCoder.getAssetId(contractId, subId);
|
42688
42998
|
const mintReceipt = {
|
@@ -42697,7 +43007,7 @@ ${MessageCoinFragmentFragmentDoc}`;
|
|
42697
43007
|
return mintReceipt;
|
42698
43008
|
}
|
42699
43009
|
case "BURN" /* Burn */: {
|
42700
|
-
const contractId = hexOrZero(receipt.
|
43010
|
+
const contractId = hexOrZero(receipt.id || receipt.contractId);
|
42701
43011
|
const subId = hexOrZero(receipt.subId);
|
42702
43012
|
const assetId = ReceiptBurnCoder.getAssetId(contractId, subId);
|
42703
43013
|
const burnReceipt = {
|
@@ -42717,7 +43027,6 @@ ${MessageCoinFragmentFragmentDoc}`;
|
|
42717
43027
|
}
|
42718
43028
|
|
42719
43029
|
// src/providers/utils/gas.ts
|
42720
|
-
var calculatePriceWithFactor = (gas, gasPrice, priceFactor) => bn(Math.ceil(gas.mul(gasPrice).toNumber() / priceFactor.toNumber()));
|
42721
43030
|
var getGasUsedFromReceipts = (receipts) => {
|
42722
43031
|
const scriptResult = receipts.filter(
|
42723
43032
|
(receipt) => receipt.type === ReceiptType.ScriptResult
|
@@ -42738,18 +43047,28 @@ ${MessageCoinFragmentFragmentDoc}`;
|
|
42738
43047
|
}
|
42739
43048
|
function gasUsedByInputs(inputs, txBytesSize, gasCosts) {
|
42740
43049
|
const witnessCache = [];
|
42741
|
-
const
|
43050
|
+
const chargeableInputs = inputs.filter((input) => {
|
43051
|
+
const isCoinOrMessage = "owner" in input || "sender" in input;
|
43052
|
+
if (isCoinOrMessage) {
|
43053
|
+
if ("predicate" in input && input.predicate && input.predicate !== "0x") {
|
43054
|
+
return true;
|
43055
|
+
}
|
43056
|
+
if (!witnessCache.includes(input.witnessIndex)) {
|
43057
|
+
witnessCache.push(input.witnessIndex);
|
43058
|
+
return true;
|
43059
|
+
}
|
43060
|
+
}
|
43061
|
+
return false;
|
43062
|
+
});
|
43063
|
+
const vmInitializationCost = resolveGasDependentCosts(txBytesSize, gasCosts.vmInitialization);
|
43064
|
+
const totalGas = chargeableInputs.reduce((total, input) => {
|
42742
43065
|
if ("predicate" in input && input.predicate && input.predicate !== "0x") {
|
42743
43066
|
return total.add(
|
42744
|
-
|
43067
|
+
vmInitializationCost.add(resolveGasDependentCosts(arrayify(input.predicate).length, gasCosts.contractRoot)).add(bn(input.predicateGasUsed))
|
42745
43068
|
);
|
42746
43069
|
}
|
42747
|
-
|
42748
|
-
|
42749
|
-
return total.add(gasCosts.ecr1);
|
42750
|
-
}
|
42751
|
-
return total;
|
42752
|
-
}, bn());
|
43070
|
+
return total.add(gasCosts.ecr1);
|
43071
|
+
}, bn(0));
|
42753
43072
|
return totalGas;
|
42754
43073
|
}
|
42755
43074
|
function getMinGas(params) {
|
@@ -42761,12 +43080,20 @@ ${MessageCoinFragmentFragmentDoc}`;
|
|
42761
43080
|
return minGas;
|
42762
43081
|
}
|
42763
43082
|
function getMaxGas(params) {
|
42764
|
-
const {
|
43083
|
+
const {
|
43084
|
+
gasPerByte,
|
43085
|
+
witnessesLength,
|
43086
|
+
witnessLimit,
|
43087
|
+
minGas,
|
43088
|
+
gasLimit = bn(0),
|
43089
|
+
maxGasPerTx
|
43090
|
+
} = params;
|
42765
43091
|
let remainingAllowedWitnessGas = bn(0);
|
42766
43092
|
if (witnessLimit?.gt(0) && witnessLimit.gte(witnessesLength)) {
|
42767
43093
|
remainingAllowedWitnessGas = bn(witnessLimit).sub(witnessesLength).mul(gasPerByte);
|
42768
43094
|
}
|
42769
|
-
|
43095
|
+
const maxGas = remainingAllowedWitnessGas.add(minGas).add(gasLimit);
|
43096
|
+
return maxGas.gte(maxGasPerTx) ? maxGasPerTx : maxGas;
|
42770
43097
|
}
|
42771
43098
|
function calculateMetadataGasForTxCreate({
|
42772
43099
|
gasCosts,
|
@@ -42788,6 +43115,10 @@ ${MessageCoinFragmentFragmentDoc}`;
|
|
42788
43115
|
}) {
|
42789
43116
|
return resolveGasDependentCosts(txBytesSize, gasCosts.s256);
|
42790
43117
|
}
|
43118
|
+
var calculateGasFee = (params) => {
|
43119
|
+
const { gas, gasPrice, priceFactor, tip } = params;
|
43120
|
+
return gas.mul(gasPrice).div(priceFactor).add(tip);
|
43121
|
+
};
|
42791
43122
|
|
42792
43123
|
// src/providers/utils/json.ts
|
42793
43124
|
function normalize2(object) {
|
@@ -42917,7 +43248,7 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
42917
43248
|
// src/providers/transaction-request/transaction-request.ts
|
42918
43249
|
var BaseTransactionRequest = class {
|
42919
43250
|
/** Gas price for transaction */
|
42920
|
-
|
43251
|
+
tip;
|
42921
43252
|
/** Block until which tx cannot be included */
|
42922
43253
|
maturity;
|
42923
43254
|
/** The maximum fee payable by this transaction using BASE_ASSET. */
|
@@ -42930,38 +43261,34 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
42930
43261
|
outputs = [];
|
42931
43262
|
/** List of witnesses */
|
42932
43263
|
witnesses = [];
|
42933
|
-
/** Base asset ID - should be fetched from the chain */
|
42934
|
-
baseAssetId = ZeroBytes32;
|
42935
43264
|
/**
|
42936
43265
|
* Constructor for initializing a base transaction request.
|
42937
43266
|
*
|
42938
43267
|
* @param baseTransactionRequest - Optional object containing properties to initialize the transaction request.
|
42939
43268
|
*/
|
42940
43269
|
constructor({
|
42941
|
-
|
43270
|
+
tip,
|
42942
43271
|
maturity,
|
42943
43272
|
maxFee,
|
42944
43273
|
witnessLimit,
|
42945
43274
|
inputs,
|
42946
43275
|
outputs,
|
42947
|
-
witnesses
|
42948
|
-
baseAssetId
|
43276
|
+
witnesses
|
42949
43277
|
} = {}) {
|
42950
|
-
this.
|
43278
|
+
this.tip = bn(tip);
|
42951
43279
|
this.maturity = maturity ?? 0;
|
42952
43280
|
this.witnessLimit = witnessLimit ? bn(witnessLimit) : void 0;
|
42953
43281
|
this.maxFee = maxFee ? bn(maxFee) : void 0;
|
42954
43282
|
this.inputs = inputs ?? [];
|
42955
43283
|
this.outputs = outputs ?? [];
|
42956
43284
|
this.witnesses = witnesses ?? [];
|
42957
|
-
this.baseAssetId = baseAssetId ?? ZeroBytes32;
|
42958
43285
|
}
|
42959
43286
|
static getPolicyMeta(req) {
|
42960
43287
|
let policyTypes = 0;
|
42961
43288
|
const policies = [];
|
42962
|
-
if (req.
|
42963
|
-
policyTypes += PolicyType.
|
42964
|
-
policies.push({ data: req.
|
43289
|
+
if (req.tip) {
|
43290
|
+
policyTypes += PolicyType.Tip;
|
43291
|
+
policies.push({ data: req.tip, type: PolicyType.Tip });
|
42965
43292
|
}
|
42966
43293
|
if (req.witnessLimit) {
|
42967
43294
|
policyTypes += PolicyType.WitnessLimit;
|
@@ -43148,10 +43475,10 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
43148
43475
|
* @param predicate - Predicate bytes.
|
43149
43476
|
* @param predicateData - Predicate data bytes.
|
43150
43477
|
*/
|
43151
|
-
addCoinInput(coin
|
43478
|
+
addCoinInput(coin) {
|
43152
43479
|
const { assetId, owner, amount } = coin;
|
43153
43480
|
let witnessIndex;
|
43154
|
-
if (predicate) {
|
43481
|
+
if (coin.predicate) {
|
43155
43482
|
witnessIndex = 0;
|
43156
43483
|
} else {
|
43157
43484
|
witnessIndex = this.getCoinInputWitnessIndexByOwner(owner);
|
@@ -43166,9 +43493,7 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
43166
43493
|
amount,
|
43167
43494
|
assetId,
|
43168
43495
|
txPointer: "0x00000000000000000000000000000000",
|
43169
|
-
witnessIndex
|
43170
|
-
predicate: predicate?.bytes,
|
43171
|
-
predicateData: predicate?.predicateDataBytes
|
43496
|
+
witnessIndex
|
43172
43497
|
};
|
43173
43498
|
this.pushInput(input);
|
43174
43499
|
this.addChangeOutput(owner, assetId);
|
@@ -43179,11 +43504,13 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
43179
43504
|
*
|
43180
43505
|
* @param message - Message resource.
|
43181
43506
|
* @param predicate - Predicate bytes.
|
43507
|
+
* @param predicateData - Predicate data bytes.
|
43182
43508
|
*/
|
43183
|
-
addMessageInput(message
|
43509
|
+
addMessageInput(message) {
|
43184
43510
|
const { recipient, sender, amount } = message;
|
43511
|
+
const assetId = BaseAssetId;
|
43185
43512
|
let witnessIndex;
|
43186
|
-
if (predicate) {
|
43513
|
+
if (message.predicate) {
|
43187
43514
|
witnessIndex = 0;
|
43188
43515
|
} else {
|
43189
43516
|
witnessIndex = this.getCoinInputWitnessIndexByOwner(recipient);
|
@@ -43197,12 +43524,10 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
43197
43524
|
sender: sender.toB256(),
|
43198
43525
|
recipient: recipient.toB256(),
|
43199
43526
|
amount,
|
43200
|
-
witnessIndex
|
43201
|
-
predicate: predicate?.bytes,
|
43202
|
-
predicateData: predicate?.predicateDataBytes
|
43527
|
+
witnessIndex
|
43203
43528
|
};
|
43204
43529
|
this.pushInput(input);
|
43205
|
-
this.addChangeOutput(recipient,
|
43530
|
+
this.addChangeOutput(recipient, assetId);
|
43206
43531
|
}
|
43207
43532
|
/**
|
43208
43533
|
* Adds a single resource to the transaction by adding a coin/message input and a
|
@@ -43230,32 +43555,6 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
43230
43555
|
resources.forEach((resource) => this.addResource(resource));
|
43231
43556
|
return this;
|
43232
43557
|
}
|
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
43558
|
/**
|
43260
43559
|
* Adds a coin output to the transaction.
|
43261
43560
|
*
|
@@ -43263,12 +43562,12 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
43263
43562
|
* @param amount - Amount of coin.
|
43264
43563
|
* @param assetId - Asset ID of coin.
|
43265
43564
|
*/
|
43266
|
-
addCoinOutput(to, amount, assetId) {
|
43565
|
+
addCoinOutput(to, amount, assetId = BaseAssetId) {
|
43267
43566
|
this.pushOutput({
|
43268
43567
|
type: OutputType.Coin,
|
43269
43568
|
to: addressify(to).toB256(),
|
43270
43569
|
amount,
|
43271
|
-
assetId
|
43570
|
+
assetId
|
43272
43571
|
});
|
43273
43572
|
return this;
|
43274
43573
|
}
|
@@ -43295,7 +43594,7 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
43295
43594
|
* @param to - Address of the owner.
|
43296
43595
|
* @param assetId - Asset ID of coin.
|
43297
43596
|
*/
|
43298
|
-
addChangeOutput(to, assetId) {
|
43597
|
+
addChangeOutput(to, assetId = BaseAssetId) {
|
43299
43598
|
const changeOutput = this.getChangeOutputs().find(
|
43300
43599
|
(output3) => hexlify(output3.assetId) === assetId
|
43301
43600
|
);
|
@@ -43303,7 +43602,7 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
43303
43602
|
this.pushOutput({
|
43304
43603
|
type: OutputType.Change,
|
43305
43604
|
to: addressify(to).toB256(),
|
43306
|
-
assetId
|
43605
|
+
assetId
|
43307
43606
|
});
|
43308
43607
|
}
|
43309
43608
|
}
|
@@ -43335,7 +43634,7 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
43335
43634
|
}
|
43336
43635
|
calculateMaxGas(chainInfo, minGas) {
|
43337
43636
|
const { consensusParameters } = chainInfo;
|
43338
|
-
const { gasPerByte } = consensusParameters;
|
43637
|
+
const { gasPerByte, maxGasPerTx } = consensusParameters;
|
43339
43638
|
const witnessesLength = this.toTransaction().witnesses.reduce(
|
43340
43639
|
(acc, wit) => acc + wit.dataLength,
|
43341
43640
|
0
|
@@ -43344,7 +43643,8 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
43344
43643
|
gasPerByte,
|
43345
43644
|
minGas,
|
43346
43645
|
witnessesLength,
|
43347
|
-
witnessLimit: this.witnessLimit
|
43646
|
+
witnessLimit: this.witnessLimit,
|
43647
|
+
maxGasPerTx
|
43348
43648
|
});
|
43349
43649
|
}
|
43350
43650
|
/**
|
@@ -43354,12 +43654,6 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
43354
43654
|
* @param quantities - CoinQuantity Array.
|
43355
43655
|
*/
|
43356
43656
|
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
43657
|
const findAssetInput = (assetId) => this.inputs.find((input) => {
|
43364
43658
|
if ("assetId" in input) {
|
43365
43659
|
return input.assetId === assetId;
|
@@ -43368,24 +43662,27 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
43368
43662
|
});
|
43369
43663
|
const updateAssetInput = (assetId, quantity) => {
|
43370
43664
|
const assetInput = findAssetInput(assetId);
|
43665
|
+
let usedQuantity = quantity;
|
43666
|
+
if (assetId === BaseAssetId) {
|
43667
|
+
usedQuantity = bn("1000000000000000000");
|
43668
|
+
}
|
43371
43669
|
if (assetInput && "assetId" in assetInput) {
|
43372
|
-
assetInput.id =
|
43373
|
-
assetInput.amount =
|
43670
|
+
assetInput.id = hexlify(randomBytes3(34));
|
43671
|
+
assetInput.amount = usedQuantity;
|
43374
43672
|
} else {
|
43375
43673
|
this.addResources([
|
43376
43674
|
{
|
43377
|
-
id:
|
43378
|
-
amount:
|
43675
|
+
id: hexlify(randomBytes3(34)),
|
43676
|
+
amount: usedQuantity,
|
43379
43677
|
assetId,
|
43380
43678
|
owner: resourcesOwner || Address.fromRandom(),
|
43381
|
-
maturity: 0,
|
43382
43679
|
blockCreated: bn(1),
|
43383
43680
|
txCreatedIdx: bn(1)
|
43384
43681
|
}
|
43385
43682
|
]);
|
43386
43683
|
}
|
43387
43684
|
};
|
43388
|
-
updateAssetInput(
|
43685
|
+
updateAssetInput(BaseAssetId, bn(1e11));
|
43389
43686
|
quantities.forEach((q) => updateAssetInput(q.assetId, q.amount));
|
43390
43687
|
}
|
43391
43688
|
/**
|
@@ -43410,7 +43707,7 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
43410
43707
|
toJSON() {
|
43411
43708
|
return normalizeJSON(this);
|
43412
43709
|
}
|
43413
|
-
|
43710
|
+
updatePredicateGasUsed(inputs) {
|
43414
43711
|
this.inputs.forEach((i) => {
|
43415
43712
|
let correspondingInput;
|
43416
43713
|
switch (i.type) {
|
@@ -43432,6 +43729,15 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
43432
43729
|
}
|
43433
43730
|
});
|
43434
43731
|
}
|
43732
|
+
shiftPredicateData() {
|
43733
|
+
this.inputs.forEach((input) => {
|
43734
|
+
if ("predicateData" in input && "paddPredicateData" in input && typeof input.paddPredicateData === "function") {
|
43735
|
+
input.predicateData = input.paddPredicateData(
|
43736
|
+
BaseTransactionRequest.getPolicyMeta(this).policies.length
|
43737
|
+
);
|
43738
|
+
}
|
43739
|
+
});
|
43740
|
+
}
|
43435
43741
|
};
|
43436
43742
|
|
43437
43743
|
// src/providers/transaction-request/hash-transaction.ts
|
@@ -43565,9 +43871,8 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
43565
43871
|
return {
|
43566
43872
|
type: TransactionType.Create,
|
43567
43873
|
...baseTransaction,
|
43568
|
-
bytecodeLength: baseTransaction.witnesses[bytecodeWitnessIndex].dataLength / 4,
|
43569
43874
|
bytecodeWitnessIndex,
|
43570
|
-
storageSlotsCount: storageSlots.length,
|
43875
|
+
storageSlotsCount: bn(storageSlots.length),
|
43571
43876
|
salt: this.salt ? hexlify(this.salt) : ZeroBytes32,
|
43572
43877
|
storageSlots
|
43573
43878
|
};
|
@@ -43681,8 +43986,8 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
43681
43986
|
type: TransactionType.Script,
|
43682
43987
|
scriptGasLimit: this.gasLimit,
|
43683
43988
|
...super.getBaseTransaction(),
|
43684
|
-
scriptLength: script.length,
|
43685
|
-
scriptDataLength: scriptData.length,
|
43989
|
+
scriptLength: bn(script.length),
|
43990
|
+
scriptDataLength: bn(scriptData.length),
|
43686
43991
|
receiptsRoot: ZeroBytes32,
|
43687
43992
|
script: hexlify(script),
|
43688
43993
|
scriptData: hexlify(scriptData)
|
@@ -43746,7 +44051,7 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
43746
44051
|
}
|
43747
44052
|
calculateMaxGas(chainInfo, minGas) {
|
43748
44053
|
const { consensusParameters } = chainInfo;
|
43749
|
-
const { gasPerByte } = consensusParameters;
|
44054
|
+
const { gasPerByte, maxGasPerTx } = consensusParameters;
|
43750
44055
|
const witnessesLength = this.toTransaction().witnesses.reduce(
|
43751
44056
|
(acc, wit) => acc + wit.dataLength,
|
43752
44057
|
0
|
@@ -43756,7 +44061,8 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
43756
44061
|
minGas,
|
43757
44062
|
witnessesLength,
|
43758
44063
|
witnessLimit: this.witnessLimit,
|
43759
|
-
gasLimit: this.gasLimit
|
44064
|
+
gasLimit: this.gasLimit,
|
44065
|
+
maxGasPerTx
|
43760
44066
|
});
|
43761
44067
|
}
|
43762
44068
|
/**
|
@@ -43829,13 +44135,29 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
43829
44135
|
}
|
43830
44136
|
}
|
43831
44137
|
};
|
44138
|
+
var cacheTxInputsFromOwner = (inputs, owner) => inputs.reduce(
|
44139
|
+
(acc, input) => {
|
44140
|
+
if (input.type === InputType.Coin && input.owner === owner) {
|
44141
|
+
acc.utxos.push(input.id);
|
44142
|
+
}
|
44143
|
+
if (input.type === InputType.Message && input.recipient === owner) {
|
44144
|
+
acc.messages.push(input.nonce);
|
44145
|
+
}
|
44146
|
+
return acc;
|
44147
|
+
},
|
44148
|
+
{
|
44149
|
+
utxos: [],
|
44150
|
+
messages: []
|
44151
|
+
}
|
44152
|
+
);
|
43832
44153
|
|
43833
44154
|
// src/providers/transaction-summary/calculate-transaction-fee.ts
|
43834
44155
|
var calculateTransactionFee = (params) => {
|
43835
44156
|
const {
|
43836
|
-
|
44157
|
+
gasPrice,
|
43837
44158
|
rawPayload,
|
43838
|
-
|
44159
|
+
tip,
|
44160
|
+
consensusParameters: { gasCosts, feeParams, maxGasPerTx }
|
43839
44161
|
} = params;
|
43840
44162
|
const gasPerByte = bn(feeParams.gasPerByte);
|
43841
44163
|
const gasPriceFactor = bn(feeParams.gasPriceFactor);
|
@@ -43845,8 +44167,7 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
43845
44167
|
return {
|
43846
44168
|
fee: bn(0),
|
43847
44169
|
minFee: bn(0),
|
43848
|
-
maxFee: bn(0)
|
43849
|
-
feeFromGasUsed: bn(0)
|
44170
|
+
maxFee: bn(0)
|
43850
44171
|
};
|
43851
44172
|
}
|
43852
44173
|
const { type: type3, witnesses, inputs, policies } = transaction;
|
@@ -43878,7 +44199,6 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
43878
44199
|
metadataGas,
|
43879
44200
|
txBytesSize: transactionBytes.length
|
43880
44201
|
});
|
43881
|
-
const gasPrice = bn(policies.find((policy) => policy.type === PolicyType.GasPrice)?.data);
|
43882
44202
|
const witnessLimit = policies.find((policy) => policy.type === PolicyType.WitnessLimit)?.data;
|
43883
44203
|
const witnessesLength = witnesses.reduce((acc, wit) => acc + wit.dataLength, 0);
|
43884
44204
|
const maxGas = getMaxGas({
|
@@ -43886,17 +44206,25 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
43886
44206
|
minGas,
|
43887
44207
|
witnessesLength,
|
43888
44208
|
gasLimit,
|
43889
|
-
witnessLimit
|
44209
|
+
witnessLimit,
|
44210
|
+
maxGasPerTx
|
44211
|
+
});
|
44212
|
+
const minFee = calculateGasFee({
|
44213
|
+
gasPrice,
|
44214
|
+
gas: minGas,
|
44215
|
+
priceFactor: gasPriceFactor,
|
44216
|
+
tip
|
44217
|
+
});
|
44218
|
+
const maxFee = calculateGasFee({
|
44219
|
+
gasPrice,
|
44220
|
+
gas: maxGas,
|
44221
|
+
priceFactor: gasPriceFactor,
|
44222
|
+
tip
|
43890
44223
|
});
|
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
44224
|
return {
|
43896
|
-
fee,
|
43897
44225
|
minFee,
|
43898
44226
|
maxFee,
|
43899
|
-
|
44227
|
+
fee: maxFee
|
43900
44228
|
};
|
43901
44229
|
};
|
43902
44230
|
|
@@ -44450,7 +44778,9 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
44450
44778
|
gqlTransactionStatus,
|
44451
44779
|
abiMap = {},
|
44452
44780
|
maxInputs,
|
44453
|
-
gasCosts
|
44781
|
+
gasCosts,
|
44782
|
+
maxGasPerTx,
|
44783
|
+
gasPrice
|
44454
44784
|
} = params;
|
44455
44785
|
const gasUsed = getGasUsedFromReceipts(receipts);
|
44456
44786
|
const rawPayload = hexlify(transactionBytes);
|
@@ -44464,11 +44794,14 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
44464
44794
|
maxInputs
|
44465
44795
|
});
|
44466
44796
|
const typeName = getTransactionTypeName(transaction.type);
|
44797
|
+
const tip = bn(transaction.policies?.find((policy) => policy.type === PolicyType.Tip)?.data);
|
44467
44798
|
const { fee } = calculateTransactionFee({
|
44468
|
-
|
44799
|
+
gasPrice,
|
44469
44800
|
rawPayload,
|
44801
|
+
tip,
|
44470
44802
|
consensusParameters: {
|
44471
44803
|
gasCosts,
|
44804
|
+
maxGasPerTx,
|
44472
44805
|
feeParams: {
|
44473
44806
|
gasPerByte,
|
44474
44807
|
gasPriceFactor
|
@@ -44604,8 +44937,13 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
44604
44937
|
const decodedTransaction = this.decodeTransaction(
|
44605
44938
|
transaction
|
44606
44939
|
);
|
44607
|
-
|
44608
|
-
|
44940
|
+
let txReceipts = [];
|
44941
|
+
if (transaction?.status && "receipts" in transaction.status) {
|
44942
|
+
txReceipts = transaction.status.receipts;
|
44943
|
+
}
|
44944
|
+
const receipts = txReceipts.map(processGqlReceipt) || [];
|
44945
|
+
const { gasPerByte, gasPriceFactor, gasCosts, maxGasPerTx } = this.provider.getGasConfig();
|
44946
|
+
const gasPrice = await this.provider.getLatestGasPrice();
|
44609
44947
|
const maxInputs = this.provider.getChain().consensusParameters.maxInputs;
|
44610
44948
|
const transactionSummary = assembleTransactionSummary({
|
44611
44949
|
id: this.id,
|
@@ -44617,7 +44955,9 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
44617
44955
|
gasPriceFactor,
|
44618
44956
|
abiMap: contractsAbiMap,
|
44619
44957
|
maxInputs,
|
44620
|
-
gasCosts
|
44958
|
+
gasCosts,
|
44959
|
+
maxGasPerTx,
|
44960
|
+
gasPrice
|
44621
44961
|
});
|
44622
44962
|
return transactionSummary;
|
44623
44963
|
}
|
@@ -44761,13 +45101,12 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
44761
45101
|
gasPerByte: bn(feeParams.gasPerByte),
|
44762
45102
|
maxMessageDataLength: bn(predicateParams.maxMessageDataLength),
|
44763
45103
|
chainId: bn(consensusParameters.chainId),
|
44764
|
-
baseAssetId: consensusParameters.baseAssetId,
|
44765
45104
|
gasCosts
|
44766
45105
|
},
|
44767
45106
|
gasCosts,
|
44768
45107
|
latestBlock: {
|
44769
45108
|
id: latestBlock.id,
|
44770
|
-
height: bn(latestBlock.
|
45109
|
+
height: bn(latestBlock.height),
|
44771
45110
|
time: latestBlock.header.time,
|
44772
45111
|
transactions: latestBlock.transactions.map((i) => ({
|
44773
45112
|
id: i.id
|
@@ -44861,10 +45200,8 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
44861
45200
|
* Returns some helpful parameters related to gas fees.
|
44862
45201
|
*/
|
44863
45202
|
getGasConfig() {
|
44864
|
-
const { minGasPrice } = this.getNode();
|
44865
45203
|
const { maxGasPerTx, maxGasPerPredicate, gasPriceFactor, gasPerByte, gasCosts } = this.getChain().consensusParameters;
|
44866
45204
|
return {
|
44867
|
-
minGasPrice,
|
44868
45205
|
maxGasPerTx,
|
44869
45206
|
maxGasPerPredicate,
|
44870
45207
|
gasPriceFactor,
|
@@ -44962,7 +45299,7 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
44962
45299
|
*/
|
44963
45300
|
async getBlockNumber() {
|
44964
45301
|
const { chain } = await this.operations.getChain();
|
44965
|
-
return bn(chain.latestBlock.
|
45302
|
+
return bn(chain.latestBlock.height, 10);
|
44966
45303
|
}
|
44967
45304
|
/**
|
44968
45305
|
* Returns the chain information.
|
@@ -44974,11 +45311,9 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
44974
45311
|
const processedNodeInfo = {
|
44975
45312
|
maxDepth: bn(nodeInfo.maxDepth),
|
44976
45313
|
maxTx: bn(nodeInfo.maxTx),
|
44977
|
-
minGasPrice: bn(nodeInfo.minGasPrice),
|
44978
45314
|
nodeVersion: nodeInfo.nodeVersion,
|
44979
45315
|
utxoValidation: nodeInfo.utxoValidation,
|
44980
|
-
vmBacktrace: nodeInfo.vmBacktrace
|
44981
|
-
peers: nodeInfo.peers
|
45316
|
+
vmBacktrace: nodeInfo.vmBacktrace
|
44982
45317
|
};
|
44983
45318
|
_Provider.nodeInfoCache[this.url] = processedNodeInfo;
|
44984
45319
|
return processedNodeInfo;
|
@@ -45004,17 +45339,6 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
45004
45339
|
} = this.getChain();
|
45005
45340
|
return chainId.toNumber();
|
45006
45341
|
}
|
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
45342
|
/**
|
45019
45343
|
* Submits a transaction to the chain to be executed.
|
45020
45344
|
*
|
@@ -45075,14 +45399,13 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
45075
45399
|
return this.estimateTxDependencies(transactionRequest);
|
45076
45400
|
}
|
45077
45401
|
const encodedTransaction = hexlify(transactionRequest.toTransactionBytes());
|
45078
|
-
const { dryRun:
|
45079
|
-
encodedTransaction,
|
45402
|
+
const { dryRun: dryRunStatuses } = await this.operations.dryRun({
|
45403
|
+
encodedTransactions: encodedTransaction,
|
45080
45404
|
utxoValidation: utxoValidation || false
|
45081
45405
|
});
|
45082
|
-
const receipts =
|
45083
|
-
|
45084
|
-
|
45085
|
-
};
|
45406
|
+
const [{ receipts: rawReceipts, status }] = dryRunStatuses;
|
45407
|
+
const receipts = rawReceipts.map(processGqlReceipt);
|
45408
|
+
return { receipts, dryrunStatus: status };
|
45086
45409
|
}
|
45087
45410
|
/**
|
45088
45411
|
* Verifies whether enough gas is available to complete transaction.
|
@@ -45121,9 +45444,6 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
45121
45444
|
* If there are missing variable outputs,
|
45122
45445
|
* `addVariableOutputs` is called on the transaction.
|
45123
45446
|
*
|
45124
|
-
* @privateRemarks
|
45125
|
-
* TODO: Investigate support for missing contract IDs
|
45126
|
-
* TODO: Add support for missing output messages
|
45127
45447
|
*
|
45128
45448
|
* @param transactionRequest - The transaction request object.
|
45129
45449
|
* @returns A promise.
|
@@ -45136,16 +45456,19 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
45136
45456
|
missingContractIds: []
|
45137
45457
|
};
|
45138
45458
|
}
|
45139
|
-
await this.estimatePredicates(transactionRequest);
|
45140
45459
|
let receipts = [];
|
45141
45460
|
const missingContractIds = [];
|
45142
45461
|
let outputVariables = 0;
|
45462
|
+
let dryrunStatus;
|
45143
45463
|
for (let attempt = 0; attempt < MAX_RETRIES; attempt++) {
|
45144
|
-
const {
|
45145
|
-
|
45464
|
+
const {
|
45465
|
+
dryRun: [{ receipts: rawReceipts, status }]
|
45466
|
+
} = await this.operations.dryRun({
|
45467
|
+
encodedTransactions: [hexlify(transactionRequest.toTransactionBytes())],
|
45146
45468
|
utxoValidation: false
|
45147
45469
|
});
|
45148
|
-
receipts =
|
45470
|
+
receipts = rawReceipts.map(processGqlReceipt);
|
45471
|
+
dryrunStatus = status;
|
45149
45472
|
const { missingOutputVariables, missingOutputContractIds } = getReceiptsWithMissingData(receipts);
|
45150
45473
|
const hasMissingOutputs = missingOutputVariables.length !== 0 || missingOutputContractIds.length !== 0;
|
45151
45474
|
if (hasMissingOutputs) {
|
@@ -45155,6 +45478,11 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
45155
45478
|
transactionRequest.addContractInputAndOutput(Address.fromString(contractId));
|
45156
45479
|
missingContractIds.push(contractId);
|
45157
45480
|
});
|
45481
|
+
const { maxFee } = await this.estimateTxGasAndFee({
|
45482
|
+
transactionRequest,
|
45483
|
+
optimizeGas: false
|
45484
|
+
});
|
45485
|
+
transactionRequest.maxFee = maxFee;
|
45158
45486
|
} else {
|
45159
45487
|
break;
|
45160
45488
|
}
|
@@ -45162,7 +45490,133 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
45162
45490
|
return {
|
45163
45491
|
receipts,
|
45164
45492
|
outputVariables,
|
45165
|
-
missingContractIds
|
45493
|
+
missingContractIds,
|
45494
|
+
dryrunStatus
|
45495
|
+
};
|
45496
|
+
}
|
45497
|
+
/**
|
45498
|
+
* Dry runs multiple transactions and checks for missing dependencies in batches.
|
45499
|
+
*
|
45500
|
+
* Transactions are dry run in batches. After each dry run, transactions requiring
|
45501
|
+
* further modifications are identified. The method iteratively updates these transactions
|
45502
|
+
* and performs subsequent dry runs until all dependencies for each transaction are satisfied.
|
45503
|
+
*
|
45504
|
+
* @param transactionRequests - Array of transaction request objects.
|
45505
|
+
* @returns A promise that resolves to an array of results for each transaction.
|
45506
|
+
*/
|
45507
|
+
async estimateMultipleTxDependencies(transactionRequests) {
|
45508
|
+
const results = transactionRequests.map(() => ({
|
45509
|
+
receipts: [],
|
45510
|
+
outputVariables: 0,
|
45511
|
+
missingContractIds: [],
|
45512
|
+
dryrunStatus: void 0
|
45513
|
+
}));
|
45514
|
+
const allRequests = clone_default(transactionRequests);
|
45515
|
+
const serializedTransactionsMap = /* @__PURE__ */ new Map();
|
45516
|
+
allRequests.forEach((req, index) => {
|
45517
|
+
if (req.type === TransactionType.Script) {
|
45518
|
+
serializedTransactionsMap.set(index, hexlify(req.toTransactionBytes()));
|
45519
|
+
}
|
45520
|
+
});
|
45521
|
+
let transactionsToProcess = Array.from(serializedTransactionsMap.keys());
|
45522
|
+
let attempt = 0;
|
45523
|
+
while (transactionsToProcess.length > 0 && attempt < MAX_RETRIES) {
|
45524
|
+
const encodedTransactions = transactionsToProcess.map(
|
45525
|
+
(index) => serializedTransactionsMap.get(index)
|
45526
|
+
);
|
45527
|
+
const dryRunResults = await this.operations.dryRun({
|
45528
|
+
encodedTransactions,
|
45529
|
+
utxoValidation: false
|
45530
|
+
});
|
45531
|
+
const nextRoundTransactions = [];
|
45532
|
+
for (let i = 0; i < dryRunResults.dryRun.length; i++) {
|
45533
|
+
const currentResultIndex = transactionsToProcess[i];
|
45534
|
+
const { receipts: rawReceipts, status } = dryRunResults.dryRun[i];
|
45535
|
+
results[currentResultIndex].receipts = rawReceipts.map(processGqlReceipt);
|
45536
|
+
results[currentResultIndex].dryrunStatus = status;
|
45537
|
+
const { missingOutputVariables, missingOutputContractIds } = getReceiptsWithMissingData(
|
45538
|
+
results[currentResultIndex].receipts
|
45539
|
+
);
|
45540
|
+
const hasMissingOutputs = missingOutputVariables.length > 0 || missingOutputContractIds.length > 0;
|
45541
|
+
const requestToProcess = allRequests[currentResultIndex];
|
45542
|
+
if (hasMissingOutputs && requestToProcess?.type === TransactionType.Script) {
|
45543
|
+
results[currentResultIndex].outputVariables += missingOutputVariables.length;
|
45544
|
+
requestToProcess.addVariableOutputs(missingOutputVariables.length);
|
45545
|
+
missingOutputContractIds.forEach(({ contractId }) => {
|
45546
|
+
requestToProcess.addContractInputAndOutput(Address.fromString(contractId));
|
45547
|
+
results[currentResultIndex].missingContractIds.push(contractId);
|
45548
|
+
});
|
45549
|
+
const { maxFee } = await this.estimateTxGasAndFee({
|
45550
|
+
transactionRequest: requestToProcess,
|
45551
|
+
optimizeGas: false
|
45552
|
+
});
|
45553
|
+
requestToProcess.maxFee = maxFee;
|
45554
|
+
serializedTransactionsMap.set(
|
45555
|
+
currentResultIndex,
|
45556
|
+
hexlify(requestToProcess.toTransactionBytes())
|
45557
|
+
);
|
45558
|
+
nextRoundTransactions.push(currentResultIndex);
|
45559
|
+
allRequests[currentResultIndex] = requestToProcess;
|
45560
|
+
}
|
45561
|
+
}
|
45562
|
+
transactionsToProcess = nextRoundTransactions;
|
45563
|
+
attempt += 1;
|
45564
|
+
}
|
45565
|
+
return results;
|
45566
|
+
}
|
45567
|
+
async dryRunMultipleTransactions(transactionRequests, { utxoValidation, estimateTxDependencies = true } = {}) {
|
45568
|
+
if (estimateTxDependencies) {
|
45569
|
+
return this.estimateMultipleTxDependencies(transactionRequests);
|
45570
|
+
}
|
45571
|
+
const encodedTransactions = transactionRequests.map((tx) => hexlify(tx.toTransactionBytes()));
|
45572
|
+
const { dryRun: dryRunStatuses } = await this.operations.dryRun({
|
45573
|
+
encodedTransactions,
|
45574
|
+
utxoValidation: utxoValidation || false
|
45575
|
+
});
|
45576
|
+
const results = dryRunStatuses.map(({ receipts: rawReceipts, status }) => {
|
45577
|
+
const receipts = rawReceipts.map(processGqlReceipt);
|
45578
|
+
return { receipts, dryrunStatus: status };
|
45579
|
+
});
|
45580
|
+
return results;
|
45581
|
+
}
|
45582
|
+
async estimateTxGasAndFee(params) {
|
45583
|
+
const { transactionRequest, optimizeGas = true } = params;
|
45584
|
+
let { gasPrice } = params;
|
45585
|
+
const chainInfo = this.getChain();
|
45586
|
+
const { gasPriceFactor } = this.getGasConfig();
|
45587
|
+
const minGas = transactionRequest.calculateMinGas(chainInfo);
|
45588
|
+
if (!gasPrice) {
|
45589
|
+
gasPrice = await this.estimateGasPrice(10);
|
45590
|
+
}
|
45591
|
+
const minFee = calculateGasFee({
|
45592
|
+
gasPrice: bn(gasPrice),
|
45593
|
+
gas: minGas,
|
45594
|
+
priceFactor: gasPriceFactor,
|
45595
|
+
tip: transactionRequest.tip
|
45596
|
+
}).add(1);
|
45597
|
+
let gasLimit = bn(0);
|
45598
|
+
if (transactionRequest.type === TransactionType.Script) {
|
45599
|
+
gasLimit = transactionRequest.gasLimit;
|
45600
|
+
if (!optimizeGas) {
|
45601
|
+
transactionRequest.gasLimit = minGas;
|
45602
|
+
gasLimit = transactionRequest.calculateMaxGas(chainInfo, minGas);
|
45603
|
+
transactionRequest.gasLimit = gasLimit;
|
45604
|
+
}
|
45605
|
+
}
|
45606
|
+
const maxGas = transactionRequest.calculateMaxGas(chainInfo, minGas);
|
45607
|
+
const maxFee = calculateGasFee({
|
45608
|
+
gasPrice: bn(gasPrice),
|
45609
|
+
gas: maxGas,
|
45610
|
+
priceFactor: gasPriceFactor,
|
45611
|
+
tip: transactionRequest.tip
|
45612
|
+
}).add(1);
|
45613
|
+
return {
|
45614
|
+
minGas,
|
45615
|
+
minFee,
|
45616
|
+
maxGas,
|
45617
|
+
maxFee,
|
45618
|
+
gasPrice,
|
45619
|
+
gasLimit
|
45166
45620
|
};
|
45167
45621
|
}
|
45168
45622
|
/**
|
@@ -45180,15 +45634,17 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
45180
45634
|
if (estimateTxDependencies) {
|
45181
45635
|
return this.estimateTxDependencies(transactionRequest);
|
45182
45636
|
}
|
45183
|
-
const
|
45184
|
-
const { dryRun:
|
45185
|
-
|
45637
|
+
const encodedTransactions = [hexlify(transactionRequest.toTransactionBytes())];
|
45638
|
+
const { dryRun: dryRunStatuses } = await this.operations.dryRun({
|
45639
|
+
encodedTransactions,
|
45186
45640
|
utxoValidation: true
|
45187
45641
|
});
|
45188
|
-
const
|
45189
|
-
|
45190
|
-
receipts
|
45191
|
-
|
45642
|
+
const callResult = dryRunStatuses.map((dryRunStatus) => {
|
45643
|
+
const { id, receipts, status } = dryRunStatus;
|
45644
|
+
const processedReceipts = receipts.map(processGqlReceipt);
|
45645
|
+
return { id, receipts: processedReceipts, status };
|
45646
|
+
});
|
45647
|
+
return { receipts: callResult[0].receipts };
|
45192
45648
|
}
|
45193
45649
|
/**
|
45194
45650
|
* Returns a transaction cost to enable user
|
@@ -45205,80 +45661,80 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
45205
45661
|
* @param tolerance - The tolerance to add on top of the gasUsed.
|
45206
45662
|
* @returns A promise that resolves to the transaction cost object.
|
45207
45663
|
*/
|
45208
|
-
async getTransactionCost(transactionRequestLike,
|
45209
|
-
estimateTxDependencies = true,
|
45210
|
-
estimatePredicates = true,
|
45211
|
-
resourcesOwner,
|
45212
|
-
signatureCallback
|
45213
|
-
} = {}) {
|
45664
|
+
async getTransactionCost(transactionRequestLike, { resourcesOwner, signatureCallback, quantitiesToContract = [] } = {}) {
|
45214
45665
|
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
45666
|
const isScriptTransaction = txRequestClone.type === TransactionType.Script;
|
45219
45667
|
const coinOutputsQuantities = txRequestClone.getCoinOutputsQuantities();
|
45220
|
-
const allQuantities = mergeQuantities(coinOutputsQuantities,
|
45668
|
+
const allQuantities = mergeQuantities(coinOutputsQuantities, quantitiesToContract);
|
45221
45669
|
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);
|
45670
|
+
txRequestClone.maxFee = bn(0);
|
45671
|
+
if (isScriptTransaction) {
|
45672
|
+
txRequestClone.gasLimit = bn(0);
|
45230
45673
|
}
|
45231
|
-
if (
|
45232
|
-
|
45674
|
+
if (resourcesOwner && "populateTransactionPredicateData" in resourcesOwner) {
|
45675
|
+
resourcesOwner.populateTransactionPredicateData(txRequestClone);
|
45233
45676
|
}
|
45234
|
-
const
|
45235
|
-
|
45677
|
+
const signedRequest = clone_default(txRequestClone);
|
45678
|
+
let addedSignatures = 0;
|
45679
|
+
if (signatureCallback && isScriptTransaction) {
|
45680
|
+
const lengthBefore = signedRequest.witnesses.length;
|
45681
|
+
await signatureCallback(signedRequest);
|
45682
|
+
addedSignatures = signedRequest.witnesses.length - lengthBefore;
|
45683
|
+
}
|
45684
|
+
await this.estimatePredicates(signedRequest);
|
45685
|
+
let { maxFee, maxGas, minFee, minGas, gasPrice, gasLimit } = await this.estimateTxGasAndFee({
|
45686
|
+
transactionRequest: signedRequest,
|
45687
|
+
optimizeGas: false
|
45688
|
+
});
|
45689
|
+
txRequestClone.maxFee = maxFee;
|
45236
45690
|
let receipts = [];
|
45237
45691
|
let missingContractIds = [];
|
45238
45692
|
let outputVariables = 0;
|
45239
|
-
|
45240
|
-
|
45241
|
-
|
45693
|
+
let gasUsed = bn(0);
|
45694
|
+
txRequestClone.updatePredicateGasUsed(signedRequest.inputs);
|
45695
|
+
if (isScriptTransaction) {
|
45696
|
+
if (signatureCallback) {
|
45697
|
+
await signatureCallback(txRequestClone);
|
45698
|
+
}
|
45699
|
+
txRequestClone.gasLimit = gasLimit;
|
45242
45700
|
const result = await this.estimateTxDependencies(txRequestClone);
|
45243
45701
|
receipts = result.receipts;
|
45244
45702
|
outputVariables = result.outputVariables;
|
45245
45703
|
missingContractIds = result.missingContractIds;
|
45704
|
+
gasUsed = getGasUsedFromReceipts(receipts);
|
45705
|
+
txRequestClone.gasLimit = gasUsed;
|
45706
|
+
({ maxFee, maxGas, minFee, minGas, gasPrice } = await this.estimateTxGasAndFee({
|
45707
|
+
transactionRequest: txRequestClone,
|
45708
|
+
gasPrice
|
45709
|
+
}));
|
45246
45710
|
}
|
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
45711
|
return {
|
45256
45712
|
requiredQuantities: allQuantities,
|
45257
45713
|
receipts,
|
45258
45714
|
gasUsed,
|
45259
|
-
minGasPrice,
|
45260
45715
|
gasPrice,
|
45261
45716
|
minGas,
|
45262
45717
|
maxGas,
|
45263
|
-
usedFee,
|
45264
45718
|
minFee,
|
45265
45719
|
maxFee,
|
45266
|
-
estimatedInputs: txRequestClone.inputs,
|
45267
45720
|
outputVariables,
|
45268
|
-
missingContractIds
|
45721
|
+
missingContractIds,
|
45722
|
+
addedSignatures,
|
45723
|
+
estimatedPredicates: txRequestClone.inputs
|
45269
45724
|
};
|
45270
45725
|
}
|
45271
|
-
async getResourcesForTransaction(owner, transactionRequestLike,
|
45726
|
+
async getResourcesForTransaction(owner, transactionRequestLike, quantitiesToContract = []) {
|
45272
45727
|
const ownerAddress = Address.fromAddressOrString(owner);
|
45273
45728
|
const transactionRequest = transactionRequestify(clone_default(transactionRequestLike));
|
45274
|
-
const transactionCost = await this.getTransactionCost(transactionRequest,
|
45729
|
+
const transactionCost = await this.getTransactionCost(transactionRequest, {
|
45730
|
+
quantitiesToContract
|
45731
|
+
});
|
45275
45732
|
transactionRequest.addResources(
|
45276
45733
|
await this.getResourcesToSpend(ownerAddress, transactionCost.requiredQuantities)
|
45277
45734
|
);
|
45278
|
-
const { requiredQuantities, ...txCost } = await this.getTransactionCost(
|
45279
|
-
|
45280
|
-
|
45281
|
-
);
|
45735
|
+
const { requiredQuantities, ...txCost } = await this.getTransactionCost(transactionRequest, {
|
45736
|
+
quantitiesToContract
|
45737
|
+
});
|
45282
45738
|
const resources = await this.getResourcesToSpend(ownerAddress, requiredQuantities);
|
45283
45739
|
return {
|
45284
45740
|
resources,
|
@@ -45302,7 +45758,6 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
45302
45758
|
assetId: coin.assetId,
|
45303
45759
|
amount: bn(coin.amount),
|
45304
45760
|
owner: Address.fromAddressOrString(coin.owner),
|
45305
|
-
maturity: bn(coin.maturity).toNumber(),
|
45306
45761
|
blockCreated: bn(coin.blockCreated),
|
45307
45762
|
txCreatedIdx: bn(coin.txCreatedIdx)
|
45308
45763
|
}));
|
@@ -45354,7 +45809,6 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
45354
45809
|
amount: bn(coin.amount),
|
45355
45810
|
assetId: coin.assetId,
|
45356
45811
|
owner: Address.fromAddressOrString(coin.owner),
|
45357
|
-
maturity: bn(coin.maturity).toNumber(),
|
45358
45812
|
blockCreated: bn(coin.blockCreated),
|
45359
45813
|
txCreatedIdx: bn(coin.txCreatedIdx)
|
45360
45814
|
};
|
@@ -45387,7 +45841,7 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
45387
45841
|
}
|
45388
45842
|
return {
|
45389
45843
|
id: block2.id,
|
45390
|
-
height: bn(block2.
|
45844
|
+
height: bn(block2.height),
|
45391
45845
|
time: block2.header.time,
|
45392
45846
|
transactionIds: block2.transactions.map((tx) => tx.id)
|
45393
45847
|
};
|
@@ -45402,7 +45856,7 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
45402
45856
|
const { blocks: fetchedData } = await this.operations.getBlocks(params);
|
45403
45857
|
const blocks = fetchedData.edges.map(({ node: block2 }) => ({
|
45404
45858
|
id: block2.id,
|
45405
|
-
height: bn(block2.
|
45859
|
+
height: bn(block2.height),
|
45406
45860
|
time: block2.header.time,
|
45407
45861
|
transactionIds: block2.transactions.map((tx) => tx.id)
|
45408
45862
|
}));
|
@@ -45429,7 +45883,7 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
45429
45883
|
}
|
45430
45884
|
return {
|
45431
45885
|
id: block2.id,
|
45432
|
-
height: bn(block2.
|
45886
|
+
height: bn(block2.height, 10),
|
45433
45887
|
time: block2.header.time,
|
45434
45888
|
transactionIds: block2.transactions.map((tx) => tx.id),
|
45435
45889
|
transactions: block2.transactions.map(
|
@@ -45609,7 +46063,6 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
45609
46063
|
prevRoot: messageBlockHeader.prevRoot,
|
45610
46064
|
time: messageBlockHeader.time,
|
45611
46065
|
applicationHash: messageBlockHeader.applicationHash,
|
45612
|
-
messageReceiptRoot: messageBlockHeader.messageReceiptRoot,
|
45613
46066
|
messageReceiptCount: bn(messageBlockHeader.messageReceiptCount)
|
45614
46067
|
},
|
45615
46068
|
commitBlockHeader: {
|
@@ -45621,7 +46074,6 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
45621
46074
|
prevRoot: commitBlockHeader.prevRoot,
|
45622
46075
|
time: commitBlockHeader.time,
|
45623
46076
|
applicationHash: commitBlockHeader.applicationHash,
|
45624
|
-
messageReceiptRoot: commitBlockHeader.messageReceiptRoot,
|
45625
46077
|
messageReceiptCount: bn(commitBlockHeader.messageReceiptCount)
|
45626
46078
|
},
|
45627
46079
|
sender: Address.fromAddressOrString(sender),
|
@@ -45631,6 +46083,16 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
45631
46083
|
data
|
45632
46084
|
};
|
45633
46085
|
}
|
46086
|
+
async getLatestGasPrice() {
|
46087
|
+
const { latestGasPrice } = await this.operations.getLatestGasPrice();
|
46088
|
+
return bn(latestGasPrice.gasPrice);
|
46089
|
+
}
|
46090
|
+
async estimateGasPrice(blockHorizon) {
|
46091
|
+
const { estimateGasPrice } = await this.operations.estimateGasPrice({
|
46092
|
+
blockHorizon: String(blockHorizon)
|
46093
|
+
});
|
46094
|
+
return bn(estimateGasPrice.gasPrice);
|
46095
|
+
}
|
45634
46096
|
/**
|
45635
46097
|
* Returns Message Proof for given transaction id and the message id from MessageOut receipt.
|
45636
46098
|
*
|
@@ -45876,9 +46338,8 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
45876
46338
|
* @param assetId - The asset ID to check the balance for.
|
45877
46339
|
* @returns A promise that resolves to the balance amount.
|
45878
46340
|
*/
|
45879
|
-
async getBalance(assetId) {
|
45880
|
-
const
|
45881
|
-
const amount = await this.provider.getBalance(this.address, assetIdToFetch);
|
46341
|
+
async getBalance(assetId = BaseAssetId) {
|
46342
|
+
const amount = await this.provider.getBalance(this.address, assetId);
|
45882
46343
|
return amount;
|
45883
46344
|
}
|
45884
46345
|
/**
|
@@ -45915,37 +46376,33 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
45915
46376
|
* @param fee - The estimated transaction fee.
|
45916
46377
|
* @returns A promise that resolves when the resources are added to the transaction.
|
45917
46378
|
*/
|
45918
|
-
async fund(request,
|
45919
|
-
const
|
45920
|
-
const
|
46379
|
+
async fund(request, params) {
|
46380
|
+
const { addedSignatures, estimatedPredicates, maxFee: fee, requiredQuantities } = params;
|
46381
|
+
const txRequest = request;
|
46382
|
+
const requiredQuantitiesWithFee = addAmountToCoinQuantities({
|
45921
46383
|
amount: bn(fee),
|
45922
|
-
assetId:
|
45923
|
-
coinQuantities
|
46384
|
+
assetId: BaseAssetId,
|
46385
|
+
coinQuantities: requiredQuantities
|
45924
46386
|
});
|
45925
46387
|
const quantitiesDict = {};
|
45926
|
-
|
46388
|
+
requiredQuantitiesWithFee.forEach(({ amount, assetId }) => {
|
45927
46389
|
quantitiesDict[assetId] = {
|
45928
46390
|
required: amount,
|
45929
46391
|
owned: bn(0)
|
45930
46392
|
};
|
45931
46393
|
});
|
45932
|
-
|
45933
|
-
const cachedMessages = [];
|
45934
|
-
const owner = this.address.toB256();
|
45935
|
-
request.inputs.forEach((input) => {
|
46394
|
+
txRequest.inputs.forEach((input) => {
|
45936
46395
|
const isResource = "amount" in input;
|
45937
46396
|
if (isResource) {
|
45938
46397
|
const isCoin2 = "owner" in input;
|
45939
46398
|
if (isCoin2) {
|
45940
46399
|
const assetId = String(input.assetId);
|
45941
|
-
if (
|
46400
|
+
if (quantitiesDict[assetId]) {
|
45942
46401
|
const amount = bn(input.amount);
|
45943
46402
|
quantitiesDict[assetId].owned = quantitiesDict[assetId].owned.add(amount);
|
45944
|
-
cachedUtxos.push(input.id);
|
45945
46403
|
}
|
45946
|
-
} else if (input.
|
45947
|
-
quantitiesDict[
|
45948
|
-
cachedMessages.push(input.nonce);
|
46404
|
+
} else if (input.amount && quantitiesDict[BaseAssetId]) {
|
46405
|
+
quantitiesDict[BaseAssetId].owned = quantitiesDict[BaseAssetId].owned.add(input.amount);
|
45949
46406
|
}
|
45950
46407
|
}
|
45951
46408
|
});
|
@@ -45960,12 +46417,23 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
45960
46417
|
});
|
45961
46418
|
const needsToBeFunded = missingQuantities.length;
|
45962
46419
|
if (needsToBeFunded) {
|
45963
|
-
const
|
45964
|
-
|
45965
|
-
|
45966
|
-
|
45967
|
-
|
46420
|
+
const excludedIds = cacheTxInputsFromOwner(txRequest.inputs, this.address.toB256());
|
46421
|
+
const resources = await this.getResourcesToSpend(missingQuantities, excludedIds);
|
46422
|
+
txRequest.addResources(resources);
|
46423
|
+
}
|
46424
|
+
txRequest.shiftPredicateData();
|
46425
|
+
txRequest.updatePredicateGasUsed(estimatedPredicates);
|
46426
|
+
const requestToBeReEstimate = clone_default(txRequest);
|
46427
|
+
if (addedSignatures) {
|
46428
|
+
Array.from({ length: addedSignatures }).forEach(
|
46429
|
+
() => requestToBeReEstimate.addEmptyWitness()
|
46430
|
+
);
|
45968
46431
|
}
|
46432
|
+
const { maxFee } = await this.provider.estimateTxGasAndFee({
|
46433
|
+
transactionRequest: requestToBeReEstimate
|
46434
|
+
});
|
46435
|
+
txRequest.maxFee = maxFee;
|
46436
|
+
return txRequest;
|
45969
46437
|
}
|
45970
46438
|
/**
|
45971
46439
|
* A helper that creates a transfer transaction request and returns it.
|
@@ -45973,29 +46441,25 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
45973
46441
|
* @param destination - The address of the destination.
|
45974
46442
|
* @param amount - The amount of coins to transfer.
|
45975
46443
|
* @param assetId - The asset ID of the coins to transfer.
|
45976
|
-
* @param txParams - The transaction parameters (gasLimit,
|
46444
|
+
* @param txParams - The transaction parameters (gasLimit, tip, maturity, maxFee, witnessLimit).
|
45977
46445
|
* @returns A promise that resolves to the prepared transaction request.
|
45978
46446
|
*/
|
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, [], {
|
46447
|
+
async createTransfer(destination, amount, assetId = BaseAssetId, txParams = {}) {
|
46448
|
+
const request = new ScriptTransactionRequest(txParams);
|
46449
|
+
request.addCoinOutput(Address.fromAddressOrString(destination), amount, assetId);
|
46450
|
+
const txCost = await this.provider.getTransactionCost(request, {
|
45986
46451
|
estimateTxDependencies: true,
|
45987
46452
|
resourcesOwner: this
|
45988
46453
|
});
|
45989
|
-
|
45990
|
-
|
45991
|
-
|
45992
|
-
|
45993
|
-
|
45994
|
-
|
45995
|
-
|
45996
|
-
|
45997
|
-
await this.fund(request,
|
45998
|
-
request.updatePredicateInputs(estimatedInputs);
|
46454
|
+
if ("gasLimit" in txParams) {
|
46455
|
+
this.validateGas({
|
46456
|
+
gasUsed: txCost.gasUsed,
|
46457
|
+
gasLimit: request.gasLimit
|
46458
|
+
});
|
46459
|
+
}
|
46460
|
+
request.gasLimit = txCost.gasUsed;
|
46461
|
+
request.maxFee = txCost.maxFee;
|
46462
|
+
await this.fund(request, txCost);
|
45999
46463
|
return request;
|
46000
46464
|
}
|
46001
46465
|
/**
|
@@ -46007,15 +46471,14 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
46007
46471
|
* @param txParams - The transaction parameters (gasLimit, gasPrice, maturity).
|
46008
46472
|
* @returns A promise that resolves to the transaction response.
|
46009
46473
|
*/
|
46010
|
-
async transfer(destination, amount, assetId, txParams = {}) {
|
46474
|
+
async transfer(destination, amount, assetId = BaseAssetId, txParams = {}) {
|
46011
46475
|
if (bn(amount).lte(0)) {
|
46012
46476
|
throw new FuelError(
|
46013
46477
|
ErrorCode.INVALID_TRANSFER_AMOUNT,
|
46014
46478
|
"Transfer amount must be a positive number."
|
46015
46479
|
);
|
46016
46480
|
}
|
46017
|
-
const
|
46018
|
-
const request = await this.createTransfer(destination, amount, assetIdToTransfer, txParams);
|
46481
|
+
const request = await this.createTransfer(destination, amount, assetId, txParams);
|
46019
46482
|
return this.sendTransaction(request, { estimateTxDependencies: false });
|
46020
46483
|
}
|
46021
46484
|
/**
|
@@ -46027,7 +46490,7 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
46027
46490
|
* @param txParams - The optional transaction parameters.
|
46028
46491
|
* @returns A promise that resolves to the transaction response.
|
46029
46492
|
*/
|
46030
|
-
async transferToContract(contractId, amount, assetId, txParams = {}) {
|
46493
|
+
async transferToContract(contractId, amount, assetId = BaseAssetId, txParams = {}) {
|
46031
46494
|
if (bn(amount).lte(0)) {
|
46032
46495
|
throw new FuelError(
|
46033
46496
|
ErrorCode.INVALID_TRANSFER_AMOUNT,
|
@@ -46035,32 +46498,30 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
46035
46498
|
);
|
46036
46499
|
}
|
46037
46500
|
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
46501
|
const { script, scriptData } = await assembleTransferToContractScript({
|
46042
46502
|
hexlifiedContractId: contractAddress.toB256(),
|
46043
46503
|
amountToTransfer: bn(amount),
|
46044
|
-
assetId
|
46504
|
+
assetId
|
46045
46505
|
});
|
46046
46506
|
const request = new ScriptTransactionRequest({
|
46047
|
-
...
|
46507
|
+
...txParams,
|
46048
46508
|
script,
|
46049
46509
|
scriptData
|
46050
46510
|
});
|
46051
46511
|
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
|
46512
|
+
const txCost = await this.provider.getTransactionCost(request, {
|
46513
|
+
resourcesOwner: this,
|
46514
|
+
quantitiesToContract: [{ amount: bn(amount), assetId: String(assetId) }]
|
46062
46515
|
});
|
46063
|
-
|
46516
|
+
if (txParams.gasLimit) {
|
46517
|
+
this.validateGas({
|
46518
|
+
gasUsed: txCost.gasUsed,
|
46519
|
+
gasLimit: request.gasLimit
|
46520
|
+
});
|
46521
|
+
}
|
46522
|
+
request.gasLimit = txCost.gasUsed;
|
46523
|
+
request.maxFee = txCost.maxFee;
|
46524
|
+
await this.fund(request, txCost);
|
46064
46525
|
return this.sendTransaction(request);
|
46065
46526
|
}
|
46066
46527
|
/**
|
@@ -46072,8 +46533,6 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
46072
46533
|
* @returns A promise that resolves to the transaction response.
|
46073
46534
|
*/
|
46074
46535
|
async withdrawToBaseLayer(recipient, amount, txParams = {}) {
|
46075
|
-
const { minGasPrice } = this.provider.getGasConfig();
|
46076
|
-
const baseAssetId = this.provider.getBaseAssetId();
|
46077
46536
|
const recipientAddress = Address.fromAddressOrString(recipient);
|
46078
46537
|
const recipientDataArray = arrayify(
|
46079
46538
|
"0x".concat(recipientAddress.toHexString().substring(2).padStart(64, "0"))
|
@@ -46086,21 +46545,19 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
46086
46545
|
...recipientDataArray,
|
46087
46546
|
...amountDataArray
|
46088
46547
|
]);
|
46089
|
-
const params = { script,
|
46548
|
+
const params = { script, ...txParams };
|
46090
46549
|
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);
|
46550
|
+
const quantitiesToContract = [{ amount: bn(amount), assetId: BaseAssetId }];
|
46551
|
+
const txCost = await this.provider.getTransactionCost(request, { quantitiesToContract });
|
46552
|
+
if (txParams.gasLimit) {
|
46553
|
+
this.validateGas({
|
46554
|
+
gasUsed: txCost.gasUsed,
|
46555
|
+
gasLimit: request.gasLimit
|
46556
|
+
});
|
46557
|
+
}
|
46558
|
+
request.maxFee = txCost.maxFee;
|
46559
|
+
request.gasLimit = txCost.gasUsed;
|
46560
|
+
await this.fund(request, txCost);
|
46104
46561
|
return this.sendTransaction(request);
|
46105
46562
|
}
|
46106
46563
|
async signMessage(message) {
|
@@ -46158,18 +46615,7 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
46158
46615
|
}
|
46159
46616
|
return this.provider.simulate(transactionRequest, { estimateTxDependencies: false });
|
46160
46617
|
}
|
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
|
-
}
|
46618
|
+
validateGas({ gasUsed, gasLimit }) {
|
46173
46619
|
if (gasUsed.gt(gasLimit)) {
|
46174
46620
|
throw new FuelError(
|
46175
46621
|
ErrorCode.GAS_LIMIT_TOO_LOW,
|
@@ -47552,12 +47998,12 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
47552
47998
|
};
|
47553
47999
|
|
47554
48000
|
// ../../node_modules/.pnpm/uuid@9.0.0/node_modules/uuid/dist/esm-node/rng.js
|
47555
|
-
var
|
48001
|
+
var import_crypto16 = __toESM(__require("crypto"));
|
47556
48002
|
var rnds8Pool = new Uint8Array(256);
|
47557
48003
|
var poolPtr = rnds8Pool.length;
|
47558
48004
|
function rng() {
|
47559
48005
|
if (poolPtr > rnds8Pool.length - 16) {
|
47560
|
-
|
48006
|
+
import_crypto16.default.randomFillSync(rnds8Pool);
|
47561
48007
|
poolPtr = 0;
|
47562
48008
|
}
|
47563
48009
|
return rnds8Pool.slice(poolPtr, poolPtr += 16);
|
@@ -47573,9 +48019,9 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
47573
48019
|
}
|
47574
48020
|
|
47575
48021
|
// ../../node_modules/.pnpm/uuid@9.0.0/node_modules/uuid/dist/esm-node/native.js
|
47576
|
-
var
|
48022
|
+
var import_crypto17 = __toESM(__require("crypto"));
|
47577
48023
|
var native_default = {
|
47578
|
-
randomUUID:
|
48024
|
+
randomUUID: import_crypto17.default.randomUUID
|
47579
48025
|
};
|
47580
48026
|
|
47581
48027
|
// ../../node_modules/.pnpm/uuid@9.0.0/node_modules/uuid/dist/esm-node/v4.js
|
@@ -47758,7 +48204,7 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
47758
48204
|
* @param transactionRequestLike - The transaction request to send.
|
47759
48205
|
* @returns A promise that resolves to the TransactionResponse object.
|
47760
48206
|
*/
|
47761
|
-
async sendTransaction(transactionRequestLike, { estimateTxDependencies =
|
48207
|
+
async sendTransaction(transactionRequestLike, { estimateTxDependencies = false, awaitExecution } = {}) {
|
47762
48208
|
const transactionRequest = transactionRequestify(transactionRequestLike);
|
47763
48209
|
if (estimateTxDependencies) {
|
47764
48210
|
await this.provider.estimateTxDependencies(transactionRequest);
|
@@ -50518,14 +50964,15 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
50518
50964
|
process.env.GENESIS_SECRET || randomBytes22(32),
|
50519
50965
|
wallet.provider
|
50520
50966
|
);
|
50521
|
-
const
|
50522
|
-
|
50523
|
-
|
50524
|
-
|
50525
|
-
gasPrice: minGasPrice
|
50967
|
+
const request = new ScriptTransactionRequest();
|
50968
|
+
quantities.forEach((quantity) => {
|
50969
|
+
const { amount, assetId } = coinQuantityfy(quantity);
|
50970
|
+
request.addCoinOutput(wallet.address, amount, assetId);
|
50526
50971
|
});
|
50527
|
-
|
50528
|
-
|
50972
|
+
const txCost = await genesisWallet.provider.getTransactionCost(request);
|
50973
|
+
request.gasLimit = txCost.gasUsed;
|
50974
|
+
request.maxFee = txCost.maxFee;
|
50975
|
+
await genesisWallet.fund(request, txCost);
|
50529
50976
|
await genesisWallet.sendTransaction(request, { awaitExecution: true });
|
50530
50977
|
};
|
50531
50978
|
|
@@ -50555,7 +51002,7 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
50555
51002
|
|
50556
51003
|
// src/test-utils/launchNode.ts
|
50557
51004
|
var import_child_process = __require("child_process");
|
50558
|
-
var
|
51005
|
+
var import_crypto21 = __require("crypto");
|
50559
51006
|
var import_fs2 = __require("fs");
|
50560
51007
|
var import_os = __toESM(__require("os"));
|
50561
51008
|
var import_path8 = __toESM(__require("path"));
|
@@ -50604,12 +51051,12 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
50604
51051
|
// eslint-disable-next-line no-async-promise-executor
|
50605
51052
|
new Promise(async (resolve, reject) => {
|
50606
51053
|
const remainingArgs = extractRemainingArgs(args, [
|
50607
|
-
"--
|
51054
|
+
"--snapshot",
|
50608
51055
|
"--consensus-key",
|
50609
51056
|
"--db-type",
|
50610
51057
|
"--poa-instant"
|
50611
51058
|
]);
|
50612
|
-
const chainConfigPath = getFlagValueFromArgs(args, "--
|
51059
|
+
const chainConfigPath = getFlagValueFromArgs(args, "--snapshot");
|
50613
51060
|
const consensusKey = getFlagValueFromArgs(args, "--consensus-key") || defaultConsensusKey;
|
50614
51061
|
const dbTypeFlagValue = getFlagValueFromArgs(args, "--db-type");
|
50615
51062
|
const useInMemoryDb = dbTypeFlagValue === "in-memory" || dbTypeFlagValue === void 0;
|
@@ -50627,37 +51074,55 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
50627
51074
|
})).toString();
|
50628
51075
|
let chainConfigPathToUse;
|
50629
51076
|
const prefix = basePath || import_os.default.tmpdir();
|
50630
|
-
const suffix = basePath ? "" : (0,
|
50631
|
-
const tempDirPath = import_path8.default.join(prefix, ".fuels", suffix);
|
51077
|
+
const suffix = basePath ? "" : (0, import_crypto21.randomUUID)();
|
51078
|
+
const tempDirPath = import_path8.default.join(prefix, ".fuels", suffix, "chainConfigs");
|
50632
51079
|
if (chainConfigPath) {
|
50633
51080
|
chainConfigPathToUse = chainConfigPath;
|
50634
51081
|
} else {
|
50635
51082
|
if (!(0, import_fs2.existsSync)(tempDirPath)) {
|
50636
51083
|
(0, import_fs2.mkdirSync)(tempDirPath, { recursive: true });
|
50637
51084
|
}
|
50638
|
-
|
50639
|
-
|
51085
|
+
let { stateConfigJson } = defaultChainConfigs;
|
51086
|
+
const { chainConfigJson, metadataJson } = defaultChainConfigs;
|
51087
|
+
stateConfigJson = {
|
51088
|
+
...stateConfigJson,
|
51089
|
+
coins: [
|
51090
|
+
...stateConfigJson.coins.map((coin) => ({
|
51091
|
+
...coin,
|
51092
|
+
amount: "18446744073709551615"
|
51093
|
+
}))
|
51094
|
+
],
|
51095
|
+
messages: stateConfigJson.messages.map((message) => ({
|
51096
|
+
...message,
|
51097
|
+
amount: "18446744073709551615"
|
51098
|
+
}))
|
51099
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
51100
|
+
};
|
50640
51101
|
if (!process.env.GENESIS_SECRET) {
|
50641
51102
|
const pk = Signer.generatePrivateKey();
|
50642
51103
|
const signer = new Signer(pk);
|
50643
51104
|
process.env.GENESIS_SECRET = hexlify(pk);
|
50644
|
-
|
50645
|
-
|
50646
|
-
|
50647
|
-
|
50648
|
-
|
50649
|
-
|
50650
|
-
|
50651
|
-
|
50652
|
-
|
50653
|
-
|
50654
|
-
}
|
50655
|
-
]
|
50656
|
-
}
|
50657
|
-
};
|
51105
|
+
stateConfigJson.coins.push({
|
51106
|
+
tx_id: hexlify(randomBytes3(34)),
|
51107
|
+
owner: signer.address.toHexString(),
|
51108
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
51109
|
+
amount: "18446744073709551615",
|
51110
|
+
asset_id: BaseAssetId,
|
51111
|
+
output_index: 0,
|
51112
|
+
tx_pointer_block_height: 0,
|
51113
|
+
tx_pointer_tx_idx: 0
|
51114
|
+
});
|
50658
51115
|
}
|
50659
|
-
|
50660
|
-
|
51116
|
+
let fixedStateConfigJSON = JSON.stringify(stateConfigJson);
|
51117
|
+
const regexMakeNumber = /("amount":)"(\d+)"/gm;
|
51118
|
+
fixedStateConfigJSON = fixedStateConfigJSON.replace(regexMakeNumber, "$1$2");
|
51119
|
+
const chainConfigWritePath = import_path8.default.join(tempDirPath, "chainConfig.json");
|
51120
|
+
const stateConfigWritePath = import_path8.default.join(tempDirPath, "stateConfig.json");
|
51121
|
+
const metadataWritePath = import_path8.default.join(tempDirPath, "metadata.json");
|
51122
|
+
(0, import_fs2.writeFileSync)(chainConfigWritePath, JSON.stringify(chainConfigJson), "utf8");
|
51123
|
+
(0, import_fs2.writeFileSync)(stateConfigWritePath, fixedStateConfigJSON, "utf8");
|
51124
|
+
(0, import_fs2.writeFileSync)(metadataWritePath, JSON.stringify(metadataJson), "utf8");
|
51125
|
+
chainConfigPathToUse = tempDirPath;
|
50661
51126
|
}
|
50662
51127
|
const child = (0, import_child_process.spawn)(
|
50663
51128
|
command,
|
@@ -50666,10 +51131,10 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
50666
51131
|
["--ip", ipToUse],
|
50667
51132
|
["--port", portToUse],
|
50668
51133
|
useInMemoryDb ? ["--db-type", "in-memory"] : ["--db-path", tempDirPath],
|
50669
|
-
["--min-gas-price", "
|
51134
|
+
["--min-gas-price", "1"],
|
50670
51135
|
poaInstant ? ["--poa-instant", "true"] : [],
|
50671
51136
|
["--consensus-key", consensusKey],
|
50672
|
-
["--
|
51137
|
+
["--snapshot", chainConfigPathToUse],
|
50673
51138
|
"--vm-backtrace",
|
50674
51139
|
"--utxo-validation",
|
50675
51140
|
"--debug",
|
@@ -50716,10 +51181,9 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
50716
51181
|
})
|
50717
51182
|
);
|
50718
51183
|
var generateWallets = async (count, provider) => {
|
50719
|
-
const baseAssetId = provider.getBaseAssetId();
|
50720
51184
|
const wallets = [];
|
50721
51185
|
for (let i = 0; i < count; i += 1) {
|
50722
|
-
const wallet = await generateTestWallet(provider, [[1e3,
|
51186
|
+
const wallet = await generateTestWallet(provider, [[1e3, BaseAssetId]]);
|
50723
51187
|
wallets.push(wallet);
|
50724
51188
|
}
|
50725
51189
|
return wallets;
|
@@ -50729,7 +51193,7 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
50729
51193
|
walletCount = 10
|
50730
51194
|
} = {}) => {
|
50731
51195
|
const { cleanup: closeNode, ip, port } = await launchNode(launchNodeOptions || {});
|
50732
|
-
const provider = await Provider.create(`http://${ip}:${port}/graphql`);
|
51196
|
+
const provider = await Provider.create(`http://${ip}:${port}/v1/graphql`);
|
50733
51197
|
const wallets = await generateWallets(walletCount, provider);
|
50734
51198
|
const cleanup = () => {
|
50735
51199
|
closeNode();
|