@fuel-ts/account 0.0.0-rc-1976-20240419101644 → 0.0.0-rc-2021-20240419145341
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 +830 -604
- package/dist/index.global.js.map +1 -1
- package/dist/index.js +833 -601
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +675 -444
- 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 +906 -324
- 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/message.d.ts +7 -1
- package/dist/providers/message.d.ts.map +1 -1
- package/dist/providers/provider.d.ts +37 -34
- package/dist/providers/provider.d.ts.map +1 -1
- package/dist/providers/transaction-request/create-transaction-request.d.ts +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 +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/seedTestWallet.d.ts.map +1 -1
- package/dist/test-utils.global.js +1579 -1118
- package/dist/test-utils.global.js.map +1 -1
- package/dist/test-utils.js +811 -600
- package/dist/test-utils.js.map +1 -1
- package/dist/test-utils.mjs +667 -456
- package/dist/test-utils.mjs.map +1 -1
- package/dist/wallet/base-wallet-unlocked.d.ts.map +1 -1
- package/package.json +16 -16
@@ -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.81.0"
|
31920
31920
|
};
|
31921
31921
|
}
|
@@ -32193,525 +32193,757 @@ This unreleased fuel-core build may include features and updates not yet support
|
|
32193
32193
|
__publicField3(DateTime, "TAI64_NULL", "");
|
32194
32194
|
var chainConfig_default = {
|
32195
32195
|
chain_name: "local_testnet",
|
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
|
-
|
32452
|
-
da_height: "0x00"
|
32196
|
+
consensus_parameters: {
|
32197
|
+
V1: {
|
32198
|
+
tx_params: {
|
32199
|
+
V1: {
|
32200
|
+
max_inputs: 255,
|
32201
|
+
max_outputs: 255,
|
32202
|
+
max_witnesses: 255,
|
32203
|
+
max_gas_per_tx: 3e7,
|
32204
|
+
max_size: 112640
|
32205
|
+
}
|
32206
|
+
},
|
32207
|
+
predicate_params: {
|
32208
|
+
V1: {
|
32209
|
+
max_predicate_length: 102400,
|
32210
|
+
max_predicate_data_length: 102400,
|
32211
|
+
max_message_data_length: 102400,
|
32212
|
+
max_gas_per_predicate: 3e7
|
32213
|
+
}
|
32214
|
+
},
|
32215
|
+
script_params: {
|
32216
|
+
V1: {
|
32217
|
+
max_script_length: 102400,
|
32218
|
+
max_script_data_length: 102400
|
32219
|
+
}
|
32220
|
+
},
|
32221
|
+
contract_params: {
|
32222
|
+
V1: {
|
32223
|
+
contract_max_size: 102400,
|
32224
|
+
max_storage_slots: 1760
|
32225
|
+
}
|
32226
|
+
},
|
32227
|
+
fee_params: {
|
32228
|
+
V1: {
|
32229
|
+
gas_price_factor: 92,
|
32230
|
+
gas_per_byte: 63
|
32231
|
+
}
|
32232
|
+
},
|
32233
|
+
chain_id: 0,
|
32234
|
+
gas_costs: {
|
32235
|
+
V1: {
|
32236
|
+
add: 2,
|
32237
|
+
addi: 2,
|
32238
|
+
aloc: 1,
|
32239
|
+
and: 2,
|
32240
|
+
andi: 2,
|
32241
|
+
bal: 366,
|
32242
|
+
bhei: 2,
|
32243
|
+
bhsh: 2,
|
32244
|
+
burn: 33949,
|
32245
|
+
cb: 2,
|
32246
|
+
cfei: 2,
|
32247
|
+
cfsi: 2,
|
32248
|
+
div: 2,
|
32249
|
+
divi: 2,
|
32250
|
+
eck1: 3347,
|
32251
|
+
ecr1: 46165,
|
32252
|
+
ed19: 4210,
|
32253
|
+
eq: 2,
|
32254
|
+
exp: 2,
|
32255
|
+
expi: 2,
|
32256
|
+
flag: 1,
|
32257
|
+
gm: 2,
|
32258
|
+
gt: 2,
|
32259
|
+
gtf: 16,
|
32260
|
+
ji: 2,
|
32261
|
+
jmp: 2,
|
32262
|
+
jne: 2,
|
32263
|
+
jnei: 2,
|
32264
|
+
jnzi: 2,
|
32265
|
+
jmpf: 2,
|
32266
|
+
jmpb: 2,
|
32267
|
+
jnzf: 2,
|
32268
|
+
jnzb: 2,
|
32269
|
+
jnef: 2,
|
32270
|
+
jneb: 2,
|
32271
|
+
lb: 2,
|
32272
|
+
log: 754,
|
32273
|
+
lt: 2,
|
32274
|
+
lw: 2,
|
32275
|
+
mint: 35718,
|
32276
|
+
mlog: 2,
|
32277
|
+
mod: 2,
|
32278
|
+
modi: 2,
|
32279
|
+
move: 2,
|
32280
|
+
movi: 2,
|
32281
|
+
mroo: 5,
|
32282
|
+
mul: 2,
|
32283
|
+
muli: 2,
|
32284
|
+
mldv: 4,
|
32285
|
+
noop: 1,
|
32286
|
+
not: 2,
|
32287
|
+
or: 2,
|
32288
|
+
ori: 2,
|
32289
|
+
poph: 3,
|
32290
|
+
popl: 3,
|
32291
|
+
pshh: 4,
|
32292
|
+
pshl: 4,
|
32293
|
+
ret_contract: 733,
|
32294
|
+
rvrt_contract: 722,
|
32295
|
+
sb: 2,
|
32296
|
+
sll: 2,
|
32297
|
+
slli: 2,
|
32298
|
+
srl: 2,
|
32299
|
+
srli: 2,
|
32300
|
+
srw: 253,
|
32301
|
+
sub: 2,
|
32302
|
+
subi: 2,
|
32303
|
+
sw: 2,
|
32304
|
+
sww: 29053,
|
32305
|
+
time: 79,
|
32306
|
+
tr: 46242,
|
32307
|
+
tro: 33251,
|
32308
|
+
wdcm: 3,
|
32309
|
+
wqcm: 3,
|
32310
|
+
wdop: 3,
|
32311
|
+
wqop: 3,
|
32312
|
+
wdml: 3,
|
32313
|
+
wqml: 4,
|
32314
|
+
wddv: 5,
|
32315
|
+
wqdv: 7,
|
32316
|
+
wdmd: 11,
|
32317
|
+
wqmd: 18,
|
32318
|
+
wdam: 9,
|
32319
|
+
wqam: 12,
|
32320
|
+
wdmm: 11,
|
32321
|
+
wqmm: 11,
|
32322
|
+
xor: 2,
|
32323
|
+
xori: 2,
|
32324
|
+
call: {
|
32325
|
+
LightOperation: {
|
32326
|
+
base: 21687,
|
32327
|
+
units_per_gas: 4
|
32328
|
+
}
|
32329
|
+
},
|
32330
|
+
ccp: {
|
32331
|
+
LightOperation: {
|
32332
|
+
base: 59,
|
32333
|
+
units_per_gas: 20
|
32334
|
+
}
|
32335
|
+
},
|
32336
|
+
croo: {
|
32337
|
+
LightOperation: {
|
32338
|
+
base: 1,
|
32339
|
+
units_per_gas: 1
|
32340
|
+
}
|
32341
|
+
},
|
32342
|
+
csiz: {
|
32343
|
+
LightOperation: {
|
32344
|
+
base: 59,
|
32345
|
+
units_per_gas: 195
|
32346
|
+
}
|
32347
|
+
},
|
32348
|
+
k256: {
|
32349
|
+
LightOperation: {
|
32350
|
+
base: 282,
|
32351
|
+
units_per_gas: 3
|
32352
|
+
}
|
32353
|
+
},
|
32354
|
+
ldc: {
|
32355
|
+
LightOperation: {
|
32356
|
+
base: 45,
|
32357
|
+
units_per_gas: 65
|
32358
|
+
}
|
32359
|
+
},
|
32360
|
+
logd: {
|
32361
|
+
LightOperation: {
|
32362
|
+
base: 1134,
|
32363
|
+
units_per_gas: 2
|
32364
|
+
}
|
32365
|
+
},
|
32366
|
+
mcl: {
|
32367
|
+
LightOperation: {
|
32368
|
+
base: 3,
|
32369
|
+
units_per_gas: 523
|
32370
|
+
}
|
32371
|
+
},
|
32372
|
+
mcli: {
|
32373
|
+
LightOperation: {
|
32374
|
+
base: 3,
|
32375
|
+
units_per_gas: 526
|
32376
|
+
}
|
32377
|
+
},
|
32378
|
+
mcp: {
|
32379
|
+
LightOperation: {
|
32380
|
+
base: 3,
|
32381
|
+
units_per_gas: 448
|
32382
|
+
}
|
32383
|
+
},
|
32384
|
+
mcpi: {
|
32385
|
+
LightOperation: {
|
32386
|
+
base: 7,
|
32387
|
+
units_per_gas: 585
|
32388
|
+
}
|
32389
|
+
},
|
32390
|
+
meq: {
|
32391
|
+
LightOperation: {
|
32392
|
+
base: 11,
|
32393
|
+
units_per_gas: 1097
|
32394
|
+
}
|
32395
|
+
},
|
32396
|
+
retd_contract: {
|
32397
|
+
LightOperation: {
|
32398
|
+
base: 1086,
|
32399
|
+
units_per_gas: 2
|
32400
|
+
}
|
32401
|
+
},
|
32402
|
+
s256: {
|
32403
|
+
LightOperation: {
|
32404
|
+
base: 45,
|
32405
|
+
units_per_gas: 3
|
32406
|
+
}
|
32407
|
+
},
|
32408
|
+
scwq: {
|
32409
|
+
HeavyOperation: {
|
32410
|
+
base: 30375,
|
32411
|
+
gas_per_unit: 28628
|
32412
|
+
}
|
32413
|
+
},
|
32414
|
+
smo: {
|
32415
|
+
LightOperation: {
|
32416
|
+
base: 64196,
|
32417
|
+
units_per_gas: 1
|
32418
|
+
}
|
32419
|
+
},
|
32420
|
+
srwq: {
|
32421
|
+
HeavyOperation: {
|
32422
|
+
base: 262,
|
32423
|
+
gas_per_unit: 249
|
32424
|
+
}
|
32425
|
+
},
|
32426
|
+
swwq: {
|
32427
|
+
HeavyOperation: {
|
32428
|
+
base: 28484,
|
32429
|
+
gas_per_unit: 26613
|
32430
|
+
}
|
32431
|
+
},
|
32432
|
+
contract_root: {
|
32433
|
+
LightOperation: {
|
32434
|
+
base: 45,
|
32435
|
+
units_per_gas: 1
|
32436
|
+
}
|
32437
|
+
},
|
32438
|
+
state_root: {
|
32439
|
+
HeavyOperation: {
|
32440
|
+
base: 350,
|
32441
|
+
gas_per_unit: 176
|
32442
|
+
}
|
32443
|
+
},
|
32444
|
+
new_storage_per_byte: 63,
|
32445
|
+
vm_initialization: {
|
32446
|
+
LightOperation: {
|
32447
|
+
base: 1645,
|
32448
|
+
units_per_gas: 14
|
32449
|
+
}
|
32450
|
+
}
|
32451
|
+
}
|
32453
32452
|
},
|
32454
|
-
|
32455
|
-
|
32456
|
-
|
32457
|
-
|
32458
|
-
amount: "0xb04f3c08f59b309e",
|
32459
|
-
data: "",
|
32460
|
-
da_height: "0x00"
|
32461
|
-
}
|
32462
|
-
]
|
32453
|
+
base_asset_id: "0000000000000000000000000000000000000000000000000000000000000000",
|
32454
|
+
block_gas_limit: 3e7,
|
32455
|
+
privileged_address: "0000000000000000000000000000000000000000000000000000000000000000"
|
32456
|
+
}
|
32463
32457
|
},
|
32464
|
-
|
32465
|
-
|
32466
|
-
|
32467
|
-
|
32468
|
-
|
32469
|
-
|
32470
|
-
|
32458
|
+
consensus: {
|
32459
|
+
PoA: {
|
32460
|
+
signing_key: "0x94ffcc53b892684acefaebc8a3d4a595e528a8cf664eeb3ef36f1020b0809d0d"
|
32461
|
+
}
|
32462
|
+
}
|
32463
|
+
};
|
32464
|
+
var metadata_default = {
|
32465
|
+
chain_config: "chainConfig.json",
|
32466
|
+
table_encoding: {
|
32467
|
+
Json: {
|
32468
|
+
filepath: "stateConfig.json"
|
32469
|
+
}
|
32470
|
+
}
|
32471
|
+
};
|
32472
|
+
var stateConfig_default = {
|
32473
|
+
coins: [
|
32474
|
+
{
|
32475
|
+
tx_id: "0x260eabfd50937e92939fd92687e9302a72e91c5065f64f853f2ccbe02396fe09d665",
|
32476
|
+
output_index: 0,
|
32477
|
+
tx_pointer_block_height: 0,
|
32478
|
+
tx_pointer_tx_idx: 0,
|
32479
|
+
owner: "0x94ffcc53b892684acefaebc8a3d4a595e528a8cf664eeb3ef36f1020b0809d0d",
|
32480
|
+
amount: 18446744073709552e3,
|
32481
|
+
asset_id: "0x0000000000000000000000000000000000000000000000000000000000000000"
|
32471
32482
|
},
|
32472
|
-
|
32473
|
-
|
32474
|
-
|
32475
|
-
|
32476
|
-
|
32483
|
+
{
|
32484
|
+
tx_id: "0x2a757c2317236f7883ac9bbbf7d402f034e0b725c544ef1c8725b1d2bd960f8c690f",
|
32485
|
+
output_index: 0,
|
32486
|
+
tx_pointer_block_height: 0,
|
32487
|
+
tx_pointer_tx_idx: 0,
|
32488
|
+
owner: "0x09c0b2d1a486c439a87bcba6b46a7a1a23f3897cc83a94521a96da5c23bc58db",
|
32489
|
+
amount: 18446744073709552e3,
|
32490
|
+
asset_id: "0x0000000000000000000000000000000000000000000000000000000000000000"
|
32477
32491
|
},
|
32478
|
-
|
32479
|
-
|
32480
|
-
|
32492
|
+
{
|
32493
|
+
tx_id: "0x634ef6cda00bac63992bbde80c6d694d484d58025a5ca0c9c848f0d35a5a3eee74b2",
|
32494
|
+
output_index: 0,
|
32495
|
+
tx_pointer_block_height: 0,
|
32496
|
+
tx_pointer_tx_idx: 0,
|
32497
|
+
owner: "0x09c0b2d1a486c439a87bcba6b46a7a1a23f3897cc83a94521a96da5c23bc58db",
|
32498
|
+
amount: 18446744073709552e3,
|
32499
|
+
asset_id: "0x0101010101010101010101010101010101010101010101010101010101010101"
|
32481
32500
|
},
|
32482
|
-
|
32483
|
-
|
32484
|
-
|
32501
|
+
{
|
32502
|
+
tx_id: "0xd3543bb1da137a7987a96a1bb71681fdd195ff25318c0d4a923aa30eb27ffa80bc7b",
|
32503
|
+
output_index: 0,
|
32504
|
+
tx_pointer_block_height: 0,
|
32505
|
+
tx_pointer_tx_idx: 0,
|
32506
|
+
owner: "0x09c0b2d1a486c439a87bcba6b46a7a1a23f3897cc83a94521a96da5c23bc58db",
|
32507
|
+
amount: 18446744073709552e3,
|
32508
|
+
asset_id: "0x0202020202020202020202020202020202020202020202020202020202020202"
|
32485
32509
|
},
|
32486
|
-
|
32487
|
-
|
32488
|
-
|
32510
|
+
{
|
32511
|
+
tx_id: "0xa4d42cbb02adb32f5f3a9eab33a0ee7bdab8910ad9f615dfc86a7bb9e49a732bc58c",
|
32512
|
+
output_index: 0,
|
32513
|
+
tx_pointer_block_height: 0,
|
32514
|
+
tx_pointer_tx_idx: 0,
|
32515
|
+
owner: "0x5d99ee966b42cd8fc7bdd1364b389153a9e78b42b7d4a691470674e817888d4e",
|
32516
|
+
amount: 18446744073709552e3,
|
32517
|
+
asset_id: "0x0000000000000000000000000000000000000000000000000000000000000000"
|
32489
32518
|
},
|
32490
|
-
|
32491
|
-
|
32492
|
-
|
32493
|
-
|
32494
|
-
|
32495
|
-
|
32496
|
-
|
32497
|
-
|
32498
|
-
bal: 13,
|
32499
|
-
bhei: 1,
|
32500
|
-
bhsh: 1,
|
32501
|
-
burn: 132,
|
32502
|
-
cb: 1,
|
32503
|
-
cfei: 1,
|
32504
|
-
cfsi: 1,
|
32505
|
-
croo: 16,
|
32506
|
-
div: 1,
|
32507
|
-
divi: 1,
|
32508
|
-
ecr1: 3e3,
|
32509
|
-
eck1: 951,
|
32510
|
-
ed19: 3e3,
|
32511
|
-
eq: 1,
|
32512
|
-
exp: 1,
|
32513
|
-
expi: 1,
|
32514
|
-
flag: 1,
|
32515
|
-
gm: 1,
|
32516
|
-
gt: 1,
|
32517
|
-
gtf: 1,
|
32518
|
-
ji: 1,
|
32519
|
-
jmp: 1,
|
32520
|
-
jne: 1,
|
32521
|
-
jnei: 1,
|
32522
|
-
jnzi: 1,
|
32523
|
-
jmpf: 1,
|
32524
|
-
jmpb: 1,
|
32525
|
-
jnzf: 1,
|
32526
|
-
jnzb: 1,
|
32527
|
-
jnef: 1,
|
32528
|
-
jneb: 1,
|
32529
|
-
lb: 1,
|
32530
|
-
log: 9,
|
32531
|
-
lt: 1,
|
32532
|
-
lw: 1,
|
32533
|
-
mint: 135,
|
32534
|
-
mlog: 1,
|
32535
|
-
modOp: 1,
|
32536
|
-
modi: 1,
|
32537
|
-
moveOp: 1,
|
32538
|
-
movi: 1,
|
32539
|
-
mroo: 2,
|
32540
|
-
mul: 1,
|
32541
|
-
muli: 1,
|
32542
|
-
mldv: 1,
|
32543
|
-
noop: 1,
|
32544
|
-
not: 1,
|
32545
|
-
or: 1,
|
32546
|
-
ori: 1,
|
32547
|
-
poph: 2,
|
32548
|
-
popl: 2,
|
32549
|
-
pshh: 2,
|
32550
|
-
pshl: 2,
|
32551
|
-
ret: 13,
|
32552
|
-
rvrt: 13,
|
32553
|
-
sb: 1,
|
32554
|
-
sll: 1,
|
32555
|
-
slli: 1,
|
32556
|
-
srl: 1,
|
32557
|
-
srli: 1,
|
32558
|
-
srw: 12,
|
32559
|
-
sub: 1,
|
32560
|
-
subi: 1,
|
32561
|
-
sw: 1,
|
32562
|
-
sww: 67,
|
32563
|
-
time: 1,
|
32564
|
-
tr: 105,
|
32565
|
-
tro: 60,
|
32566
|
-
wdcm: 1,
|
32567
|
-
wqcm: 1,
|
32568
|
-
wdop: 1,
|
32569
|
-
wqop: 1,
|
32570
|
-
wdml: 1,
|
32571
|
-
wqml: 1,
|
32572
|
-
wddv: 1,
|
32573
|
-
wqdv: 2,
|
32574
|
-
wdmd: 3,
|
32575
|
-
wqmd: 4,
|
32576
|
-
wdam: 2,
|
32577
|
-
wqam: 3,
|
32578
|
-
wdmm: 3,
|
32579
|
-
wqmm: 3,
|
32580
|
-
xor: 1,
|
32581
|
-
xori: 1,
|
32582
|
-
call: {
|
32583
|
-
LightOperation: {
|
32584
|
-
base: 144,
|
32585
|
-
units_per_gas: 214
|
32586
|
-
}
|
32519
|
+
{
|
32520
|
+
tx_id: "0xc197cb09b1d89a7862b238e9500631bd43f291aadb7ff55c8129335349634e9fde3f",
|
32521
|
+
output_index: 0,
|
32522
|
+
tx_pointer_block_height: 0,
|
32523
|
+
tx_pointer_tx_idx: 0,
|
32524
|
+
owner: "0x5d99ee966b42cd8fc7bdd1364b389153a9e78b42b7d4a691470674e817888d4e",
|
32525
|
+
amount: 18446744073709552e3,
|
32526
|
+
asset_id: "0x0101010101010101010101010101010101010101010101010101010101010101"
|
32587
32527
|
},
|
32588
|
-
|
32589
|
-
|
32590
|
-
|
32591
|
-
|
32592
|
-
|
32528
|
+
{
|
32529
|
+
tx_id: "0x4c4fc2451b9a9b16c520c1b89ec8968ce46823dd0396d84f7e3155861352fdce12c5",
|
32530
|
+
output_index: 0,
|
32531
|
+
tx_pointer_block_height: 0,
|
32532
|
+
tx_pointer_tx_idx: 0,
|
32533
|
+
owner: "0x5d99ee966b42cd8fc7bdd1364b389153a9e78b42b7d4a691470674e817888d4e",
|
32534
|
+
amount: 18446744073709552e3,
|
32535
|
+
asset_id: "0x0202020202020202020202020202020202020202020202020202020202020202"
|
32593
32536
|
},
|
32594
|
-
|
32595
|
-
|
32596
|
-
|
32597
|
-
|
32598
|
-
|
32537
|
+
{
|
32538
|
+
tx_id: "0x68df8f08555086a1ab45591e6fe4bf2f538bcb80dd519108030b7e886d6a230c2531",
|
32539
|
+
output_index: 0,
|
32540
|
+
tx_pointer_block_height: 0,
|
32541
|
+
tx_pointer_tx_idx: 0,
|
32542
|
+
owner: "0xbdaad6a89e073e177895b3e5a9ccd15806749eda134a6438dae32fc5b6601f3f",
|
32543
|
+
amount: 18446744073709552e3,
|
32544
|
+
asset_id: "0x0000000000000000000000000000000000000000000000000000000000000000"
|
32599
32545
|
},
|
32600
|
-
|
32601
|
-
|
32602
|
-
|
32603
|
-
|
32604
|
-
|
32546
|
+
{
|
32547
|
+
tx_id: "0x1b9bdaa290518373eb905e45ce7fcb89acedd24341ca7749ad47a938e4bf3ca9b7ce",
|
32548
|
+
output_index: 0,
|
32549
|
+
tx_pointer_block_height: 0,
|
32550
|
+
tx_pointer_tx_idx: 0,
|
32551
|
+
owner: "0xbdaad6a89e073e177895b3e5a9ccd15806749eda134a6438dae32fc5b6601f3f",
|
32552
|
+
amount: 18446744073709552e3,
|
32553
|
+
asset_id: "0x0101010101010101010101010101010101010101010101010101010101010101"
|
32605
32554
|
},
|
32606
|
-
|
32607
|
-
|
32608
|
-
|
32609
|
-
|
32610
|
-
|
32555
|
+
{
|
32556
|
+
tx_id: "0xa5a2e9db3d1285337fe1183dc1eabe8f9cdcd470daf95cd5c522bbae292f53977f26",
|
32557
|
+
output_index: 0,
|
32558
|
+
tx_pointer_block_height: 0,
|
32559
|
+
tx_pointer_tx_idx: 0,
|
32560
|
+
owner: "0xbdaad6a89e073e177895b3e5a9ccd15806749eda134a6438dae32fc5b6601f3f",
|
32561
|
+
amount: 18446744073709552e3,
|
32562
|
+
asset_id: "0x0202020202020202020202020202020202020202020202020202020202020202"
|
32611
32563
|
},
|
32612
|
-
|
32613
|
-
|
32614
|
-
|
32615
|
-
|
32616
|
-
|
32564
|
+
{
|
32565
|
+
tx_id: "0x13b685a1ea7c56309a92d69dd7e4808987ec90d62a1f9c9f2ec18e54746855c8c93c",
|
32566
|
+
output_index: 0,
|
32567
|
+
tx_pointer_block_height: 0,
|
32568
|
+
tx_pointer_tx_idx: 0,
|
32569
|
+
owner: "0x95a7aa6cc32743f8706c40ef49a7423b47da763bb4bbc055b1f07254dc729036",
|
32570
|
+
amount: 18446744073709552e3,
|
32571
|
+
asset_id: "0x0000000000000000000000000000000000000000000000000000000000000000"
|
32617
32572
|
},
|
32618
|
-
|
32619
|
-
|
32620
|
-
|
32621
|
-
|
32622
|
-
|
32573
|
+
{
|
32574
|
+
tx_id: "0xf8f00a234cf3fbab86befc3fd9346d7fd1ac085233c9cb58c7447f30c75cbf87ed38",
|
32575
|
+
output_index: 0,
|
32576
|
+
tx_pointer_block_height: 0,
|
32577
|
+
tx_pointer_tx_idx: 0,
|
32578
|
+
owner: "0x95a7aa6cc32743f8706c40ef49a7423b47da763bb4bbc055b1f07254dc729036",
|
32579
|
+
amount: 18446744073709552e3,
|
32580
|
+
asset_id: "0x0101010101010101010101010101010101010101010101010101010101010101"
|
32623
32581
|
},
|
32624
|
-
|
32625
|
-
|
32626
|
-
|
32627
|
-
|
32628
|
-
|
32582
|
+
{
|
32583
|
+
tx_id: "0x2a36c870f624b60fbd6f2b71332ca7f704c69296ceae4ddbf3a8ede79408088934be",
|
32584
|
+
output_index: 0,
|
32585
|
+
tx_pointer_block_height: 0,
|
32586
|
+
tx_pointer_tx_idx: 0,
|
32587
|
+
owner: "0x95a7aa6cc32743f8706c40ef49a7423b47da763bb4bbc055b1f07254dc729036",
|
32588
|
+
amount: 18446744073709552e3,
|
32589
|
+
asset_id: "0x0202020202020202020202020202020202020202020202020202020202020202"
|
32629
32590
|
},
|
32630
|
-
|
32631
|
-
|
32632
|
-
|
32633
|
-
|
32634
|
-
|
32591
|
+
{
|
32592
|
+
tx_id: "0x9cd180d41e67a422da8a7683f036b463a7ed7efc0de31c1692adac90decbfebce78c",
|
32593
|
+
output_index: 0,
|
32594
|
+
tx_pointer_block_height: 0,
|
32595
|
+
tx_pointer_tx_idx: 0,
|
32596
|
+
owner: "0xcee104acd38b940c8f1c62c6d7ea00a0ad2241d6dee0509a4bf27297508870d3",
|
32597
|
+
amount: 18446744073709552e3,
|
32598
|
+
asset_id: "0x0000000000000000000000000000000000000000000000000000000000000000"
|
32635
32599
|
},
|
32636
|
-
|
32637
|
-
|
32638
|
-
|
32639
|
-
|
32640
|
-
|
32600
|
+
{
|
32601
|
+
tx_id: "0xfeb4f2388fa22e6613ff85cf4e655f58acdfaa6299eba7f93b812cd1f0d7bbac48f0",
|
32602
|
+
output_index: 0,
|
32603
|
+
tx_pointer_block_height: 0,
|
32604
|
+
tx_pointer_tx_idx: 0,
|
32605
|
+
owner: "0xcee104acd38b940c8f1c62c6d7ea00a0ad2241d6dee0509a4bf27297508870d3",
|
32606
|
+
amount: 18446744073709552e3,
|
32607
|
+
asset_id: "0x0101010101010101010101010101010101010101010101010101010101010101"
|
32641
32608
|
},
|
32642
|
-
|
32643
|
-
|
32644
|
-
|
32645
|
-
|
32646
|
-
|
32609
|
+
{
|
32610
|
+
tx_id: "0xc4d20299f43358dc32ab853f6631340b09278511b6adbaf34597ade6ef37efd018f1",
|
32611
|
+
output_index: 0,
|
32612
|
+
tx_pointer_block_height: 0,
|
32613
|
+
tx_pointer_tx_idx: 0,
|
32614
|
+
owner: "0xcee104acd38b940c8f1c62c6d7ea00a0ad2241d6dee0509a4bf27297508870d3",
|
32615
|
+
amount: 18446744073709552e3,
|
32616
|
+
asset_id: "0x0202020202020202020202020202020202020202020202020202020202020202"
|
32647
32617
|
},
|
32648
|
-
|
32649
|
-
|
32650
|
-
|
32651
|
-
|
32652
|
-
|
32618
|
+
{
|
32619
|
+
tx_id: "0x437291414110b0aebaa8be5c0d9ff1e97d1130a24a6c9e028f2b1f6b0576be6aa961",
|
32620
|
+
output_index: 0,
|
32621
|
+
tx_pointer_block_height: 0,
|
32622
|
+
tx_pointer_tx_idx: 0,
|
32623
|
+
owner: "0x7e3626e306588eba79cafab73f0709e55ab8f4bdfe8c8b75034a430fc56ece89",
|
32624
|
+
amount: 18446744073709552e3,
|
32625
|
+
asset_id: "0x0000000000000000000000000000000000000000000000000000000000000000"
|
32653
32626
|
},
|
32654
|
-
|
32655
|
-
|
32656
|
-
|
32657
|
-
|
32658
|
-
|
32627
|
+
{
|
32628
|
+
tx_id: "0x28131b9acc90c2058ee14f4094a474146ba5b779cb9021867164b3d41abad3d047a7",
|
32629
|
+
output_index: 0,
|
32630
|
+
tx_pointer_block_height: 0,
|
32631
|
+
tx_pointer_tx_idx: 0,
|
32632
|
+
owner: "0x7e3626e306588eba79cafab73f0709e55ab8f4bdfe8c8b75034a430fc56ece89",
|
32633
|
+
amount: 18446744073709552e3,
|
32634
|
+
asset_id: "0x0101010101010101010101010101010101010101010101010101010101010101"
|
32659
32635
|
},
|
32660
|
-
|
32661
|
-
|
32662
|
-
|
32663
|
-
|
32664
|
-
|
32636
|
+
{
|
32637
|
+
tx_id: "0x033bb5f9b0e4f530d50af3a0f12dd510f799af495ef88baea3cf854a37da728d214b",
|
32638
|
+
output_index: 0,
|
32639
|
+
tx_pointer_block_height: 0,
|
32640
|
+
tx_pointer_tx_idx: 0,
|
32641
|
+
owner: "0x7e3626e306588eba79cafab73f0709e55ab8f4bdfe8c8b75034a430fc56ece89",
|
32642
|
+
amount: 18446744073709552e3,
|
32643
|
+
asset_id: "0x0202020202020202020202020202020202020202020202020202020202020202"
|
32665
32644
|
},
|
32666
|
-
|
32667
|
-
|
32668
|
-
|
32669
|
-
|
32670
|
-
|
32645
|
+
{
|
32646
|
+
tx_id: "0x460591398552eca338dd9577f362b91b0f9297f308258734870350004dcc303c67e9",
|
32647
|
+
output_index: 0,
|
32648
|
+
tx_pointer_block_height: 0,
|
32649
|
+
tx_pointer_tx_idx: 0,
|
32650
|
+
owner: "0x1c31df52b6df56407dd95f83082e8beb9cfc9532ac111d5bd8491651d95ba775",
|
32651
|
+
amount: 18446744073709552e3,
|
32652
|
+
asset_id: "0x0000000000000000000000000000000000000000000000000000000000000000"
|
32671
32653
|
},
|
32672
|
-
|
32673
|
-
|
32674
|
-
|
32675
|
-
|
32676
|
-
|
32654
|
+
{
|
32655
|
+
tx_id: "0x447a7c37aee972dcba72f05255c5145dd63125f0fc46ef98c216f775ee0421e23d2b",
|
32656
|
+
output_index: 0,
|
32657
|
+
tx_pointer_block_height: 0,
|
32658
|
+
tx_pointer_tx_idx: 0,
|
32659
|
+
owner: "0x1c31df52b6df56407dd95f83082e8beb9cfc9532ac111d5bd8491651d95ba775",
|
32660
|
+
amount: 18446744073709552e3,
|
32661
|
+
asset_id: "0x0101010101010101010101010101010101010101010101010101010101010101"
|
32677
32662
|
},
|
32678
|
-
|
32679
|
-
|
32680
|
-
|
32681
|
-
|
32682
|
-
|
32663
|
+
{
|
32664
|
+
tx_id: "0xf4a5d727606260c7ac6333fa89e7aef474df8a13326716d4d02f6392ebb7b997d268",
|
32665
|
+
output_index: 0,
|
32666
|
+
tx_pointer_block_height: 0,
|
32667
|
+
tx_pointer_tx_idx: 0,
|
32668
|
+
owner: "0x1c31df52b6df56407dd95f83082e8beb9cfc9532ac111d5bd8491651d95ba775",
|
32669
|
+
amount: 18446744073709552e3,
|
32670
|
+
asset_id: "0x0202020202020202020202020202020202020202020202020202020202020202"
|
32683
32671
|
},
|
32684
|
-
|
32685
|
-
|
32686
|
-
|
32687
|
-
|
32688
|
-
|
32672
|
+
{
|
32673
|
+
tx_id: "0x25a49b0731bf610f6706aa9e9e96e5967f7c50f4302a3c75d7c8141595896551c18d",
|
32674
|
+
output_index: 0,
|
32675
|
+
tx_pointer_block_height: 0,
|
32676
|
+
tx_pointer_tx_idx: 0,
|
32677
|
+
owner: "0x09dd7a49174d6fcc9f4c6f7942c18060a935ddd03ee69b594189b8c3581276ea",
|
32678
|
+
amount: 18446744073709552e3,
|
32679
|
+
asset_id: "0x0000000000000000000000000000000000000000000000000000000000000000"
|
32689
32680
|
},
|
32690
|
-
|
32691
|
-
|
32692
|
-
|
32693
|
-
|
32694
|
-
|
32681
|
+
{
|
32682
|
+
tx_id: "0x0a6e3585881ef2edf3f7727762799089dc0b5923e8b3718b49044dd9ddcb33b68459",
|
32683
|
+
output_index: 0,
|
32684
|
+
tx_pointer_block_height: 0,
|
32685
|
+
tx_pointer_tx_idx: 0,
|
32686
|
+
owner: "0x09dd7a49174d6fcc9f4c6f7942c18060a935ddd03ee69b594189b8c3581276ea",
|
32687
|
+
amount: 18446744073709552e3,
|
32688
|
+
asset_id: "0x0101010101010101010101010101010101010101010101010101010101010101"
|
32695
32689
|
},
|
32696
|
-
|
32697
|
-
|
32698
|
-
|
32699
|
-
|
32700
|
-
|
32690
|
+
{
|
32691
|
+
tx_id: "0xf73bbe0635f7b6d59a090a21d87288b82164d0f6101da830ce64eff64a2d2ff2ac37",
|
32692
|
+
output_index: 0,
|
32693
|
+
tx_pointer_block_height: 0,
|
32694
|
+
tx_pointer_tx_idx: 0,
|
32695
|
+
owner: "0x09dd7a49174d6fcc9f4c6f7942c18060a935ddd03ee69b594189b8c3581276ea",
|
32696
|
+
amount: 18446744073709552e3,
|
32697
|
+
asset_id: "0x0202020202020202020202020202020202020202020202020202020202020202"
|
32701
32698
|
},
|
32702
|
-
|
32703
|
-
|
32704
|
-
|
32705
|
-
|
32706
|
-
|
32699
|
+
{
|
32700
|
+
tx_id: "0x6cc44cb8d2a6462a591a77b6b9917eb6b22ad80d23d3cfd4f94c9da49c14b3cbac6e",
|
32701
|
+
output_index: 0,
|
32702
|
+
tx_pointer_block_height: 0,
|
32703
|
+
tx_pointer_tx_idx: 0,
|
32704
|
+
owner: "0x86604282dc604481b809845be49667607c470644f6822fc01eb0d22f167e08cf",
|
32705
|
+
amount: 18446744073709552e3,
|
32706
|
+
asset_id: "0x0000000000000000000000000000000000000000000000000000000000000000"
|
32707
|
+
},
|
32708
|
+
{
|
32709
|
+
tx_id: "0xbf2305d284ea95227040df4cc727156cccc2ca6aa3b92ed86fea4db1c37e5905f926",
|
32710
|
+
output_index: 0,
|
32711
|
+
tx_pointer_block_height: 0,
|
32712
|
+
tx_pointer_tx_idx: 0,
|
32713
|
+
owner: "0x86604282dc604481b809845be49667607c470644f6822fc01eb0d22f167e08cf",
|
32714
|
+
amount: 18446744073709552e3,
|
32715
|
+
asset_id: "0x0101010101010101010101010101010101010101010101010101010101010101"
|
32716
|
+
},
|
32717
|
+
{
|
32718
|
+
tx_id: "0xf4e1c76c72ecae699696f5e7a62ccf1425f7395080d0ca7b25ab63d1f841f425b807",
|
32719
|
+
output_index: 0,
|
32720
|
+
tx_pointer_block_height: 0,
|
32721
|
+
tx_pointer_tx_idx: 0,
|
32722
|
+
owner: "0x86604282dc604481b809845be49667607c470644f6822fc01eb0d22f167e08cf",
|
32723
|
+
amount: 18446744073709552e3,
|
32724
|
+
asset_id: "0x0202020202020202020202020202020202020202020202020202020202020202"
|
32725
|
+
},
|
32726
|
+
{
|
32727
|
+
tx_id: "0x619c80ee9f4c27c2e134cec6c67bdb268ce7fb1d2ac229ca2a44ec7ac88b2da99669",
|
32728
|
+
output_index: 0,
|
32729
|
+
tx_pointer_block_height: 0,
|
32730
|
+
tx_pointer_tx_idx: 0,
|
32731
|
+
owner: "0xbca334a06d19db5041c78fe2f465b07be5bec828f38b7796b2877e7d1542c950",
|
32732
|
+
amount: 18446744073709552e3,
|
32733
|
+
asset_id: "0x0000000000000000000000000000000000000000000000000000000000000000"
|
32734
|
+
},
|
32735
|
+
{
|
32736
|
+
tx_id: "0x978d5b6be047ffbf1474dc376a6baa33264629b809e4a8210d11aaa805ec6451585d",
|
32737
|
+
output_index: 0,
|
32738
|
+
tx_pointer_block_height: 0,
|
32739
|
+
tx_pointer_tx_idx: 0,
|
32740
|
+
owner: "0xbca334a06d19db5041c78fe2f465b07be5bec828f38b7796b2877e7d1542c950",
|
32741
|
+
amount: 18446744073709552e3,
|
32742
|
+
asset_id: "0x0101010101010101010101010101010101010101010101010101010101010101"
|
32743
|
+
},
|
32744
|
+
{
|
32745
|
+
tx_id: "0x673ba12fca6e52429896096262b8c59b61751976e552649fb1fe7369488fc10aa83c",
|
32746
|
+
output_index: 0,
|
32747
|
+
tx_pointer_block_height: 0,
|
32748
|
+
tx_pointer_tx_idx: 0,
|
32749
|
+
owner: "0xbca334a06d19db5041c78fe2f465b07be5bec828f38b7796b2877e7d1542c950",
|
32750
|
+
amount: 18446744073709552e3,
|
32751
|
+
asset_id: "0x0202020202020202020202020202020202020202020202020202020202020202"
|
32752
|
+
},
|
32753
|
+
{
|
32754
|
+
tx_id: "0xc42a165104b9fcfa4a9ebffc707781ace233f1c0609c24c36a5c4bfcd407480ddb6c",
|
32755
|
+
output_index: 0,
|
32756
|
+
tx_pointer_block_height: 0,
|
32757
|
+
tx_pointer_tx_idx: 0,
|
32758
|
+
owner: "0xbd9a1dc8d3ec3521c43f6c2c01611b4d0204c7610204ff0178488c8738a30bd2",
|
32759
|
+
amount: 18446744073709552e3,
|
32760
|
+
asset_id: "0x0000000000000000000000000000000000000000000000000000000000000000"
|
32761
|
+
},
|
32762
|
+
{
|
32763
|
+
tx_id: "0xb353fbcd94abba347f3ba25e17744e98da26e608ebccbbbd2e9d004997644bdf993c",
|
32764
|
+
output_index: 0,
|
32765
|
+
tx_pointer_block_height: 0,
|
32766
|
+
tx_pointer_tx_idx: 0,
|
32767
|
+
owner: "0xbd9a1dc8d3ec3521c43f6c2c01611b4d0204c7610204ff0178488c8738a30bd2",
|
32768
|
+
amount: 18446744073709552e3,
|
32769
|
+
asset_id: "0x0101010101010101010101010101010101010101010101010101010101010101"
|
32770
|
+
},
|
32771
|
+
{
|
32772
|
+
tx_id: "0xc34a6fcb241dec82f885019caf5e14bb6708b435afebfef0037ac447fbb6d30378a3",
|
32773
|
+
output_index: 0,
|
32774
|
+
tx_pointer_block_height: 0,
|
32775
|
+
tx_pointer_tx_idx: 0,
|
32776
|
+
owner: "0xbd9a1dc8d3ec3521c43f6c2c01611b4d0204c7610204ff0178488c8738a30bd2",
|
32777
|
+
amount: 18446744073709552e3,
|
32778
|
+
asset_id: "0x0202020202020202020202020202020202020202020202020202020202020202"
|
32779
|
+
},
|
32780
|
+
{
|
32781
|
+
tx_id: "0x421dfb5811c905724f2f4c6370cd15eaeb590ddeb966f9a4b9f8d65991dfe5142e12",
|
32782
|
+
output_index: 0,
|
32783
|
+
tx_pointer_block_height: 0,
|
32784
|
+
tx_pointer_tx_idx: 0,
|
32785
|
+
owner: "0xb32197cf75efe05bf453c26178139f09b391582065549c1422bc92555ecffb64",
|
32786
|
+
amount: 18446744073709552e3,
|
32787
|
+
asset_id: "0x0000000000000000000000000000000000000000000000000000000000000000"
|
32788
|
+
},
|
32789
|
+
{
|
32790
|
+
tx_id: "0xa952c0487eefac5dda612011c4c82554c8660834461b9b815c6ae257b56b68005235",
|
32791
|
+
output_index: 0,
|
32792
|
+
tx_pointer_block_height: 0,
|
32793
|
+
tx_pointer_tx_idx: 0,
|
32794
|
+
owner: "0xb32197cf75efe05bf453c26178139f09b391582065549c1422bc92555ecffb64",
|
32795
|
+
amount: 18446744073709552e3,
|
32796
|
+
asset_id: "0x0101010101010101010101010101010101010101010101010101010101010101"
|
32797
|
+
},
|
32798
|
+
{
|
32799
|
+
tx_id: "0xebaccf91b3b213341d047b6e6af214f1f9729b3d6dadf9c1918a9fe412486af871db",
|
32800
|
+
output_index: 0,
|
32801
|
+
tx_pointer_block_height: 0,
|
32802
|
+
tx_pointer_tx_idx: 0,
|
32803
|
+
owner: "0xb32197cf75efe05bf453c26178139f09b391582065549c1422bc92555ecffb64",
|
32804
|
+
amount: 18446744073709552e3,
|
32805
|
+
asset_id: "0x0202020202020202020202020202020202020202020202020202020202020202"
|
32806
|
+
},
|
32807
|
+
{
|
32808
|
+
tx_id: "0xda6d61c153e7d735954408274f4ffe8459c2dbab720ce22a1ae9ffedd33077b5b19d",
|
32809
|
+
output_index: 0,
|
32810
|
+
tx_pointer_block_height: 0,
|
32811
|
+
tx_pointer_tx_idx: 0,
|
32812
|
+
owner: "0x3b24509ed4ab3c7959f5c9391c1445c59290cdb5f13d6f780922f376b7029f30",
|
32813
|
+
amount: 18446744073709552e3,
|
32814
|
+
asset_id: "0x0000000000000000000000000000000000000000000000000000000000000000"
|
32815
|
+
},
|
32816
|
+
{
|
32817
|
+
tx_id: "0x508871600ef68c4f1e021dd0db219c733107151338aa95de530bd10dc61f6a69c144",
|
32818
|
+
output_index: 0,
|
32819
|
+
tx_pointer_block_height: 0,
|
32820
|
+
tx_pointer_tx_idx: 0,
|
32821
|
+
owner: "0x3b24509ed4ab3c7959f5c9391c1445c59290cdb5f13d6f780922f376b7029f30",
|
32822
|
+
amount: 18446744073709552e3,
|
32823
|
+
asset_id: "0x0101010101010101010101010101010101010101010101010101010101010101"
|
32824
|
+
},
|
32825
|
+
{
|
32826
|
+
tx_id: "0x509994738b4973e2dbbff9596b176a89fb07ee95f0ed575a4fe07a735a2a181f3200",
|
32827
|
+
output_index: 0,
|
32828
|
+
tx_pointer_block_height: 0,
|
32829
|
+
tx_pointer_tx_idx: 0,
|
32830
|
+
owner: "0x3b24509ed4ab3c7959f5c9391c1445c59290cdb5f13d6f780922f376b7029f30",
|
32831
|
+
amount: 18446744073709552e3,
|
32832
|
+
asset_id: "0x0202020202020202020202020202020202020202020202020202020202020202"
|
32833
|
+
},
|
32834
|
+
{
|
32835
|
+
tx_id: "0x6cc0cb58df0e0606fc85481aaaf5f47e145a67240b298c184bcb7fd7367c3bbf9453",
|
32836
|
+
output_index: 0,
|
32837
|
+
tx_pointer_block_height: 0,
|
32838
|
+
tx_pointer_tx_idx: 0,
|
32839
|
+
owner: "0x77c6f40b7da70d885f68efaad7c661327482a63ea10dcb4271de819438254ae1",
|
32840
|
+
amount: 18446744073709552e3,
|
32841
|
+
asset_id: "0x0000000000000000000000000000000000000000000000000000000000000000"
|
32842
|
+
},
|
32843
|
+
{
|
32844
|
+
tx_id: "0x9ddea761afc31516307e1553647ac6cc26d4a82fed9a9e6a03b994cdbf2293b3e3b6",
|
32845
|
+
output_index: 0,
|
32846
|
+
tx_pointer_block_height: 0,
|
32847
|
+
tx_pointer_tx_idx: 0,
|
32848
|
+
owner: "0x77c6f40b7da70d885f68efaad7c661327482a63ea10dcb4271de819438254ae1",
|
32849
|
+
amount: 18446744073709552e3,
|
32850
|
+
asset_id: "0x0101010101010101010101010101010101010101010101010101010101010101"
|
32851
|
+
},
|
32852
|
+
{
|
32853
|
+
tx_id: "0x82dbc478ba63abf28b92d9dce0cb8c2e6c02833d436fe812a33cf78417e4a80c1306",
|
32854
|
+
output_index: 0,
|
32855
|
+
tx_pointer_block_height: 0,
|
32856
|
+
tx_pointer_tx_idx: 0,
|
32857
|
+
owner: "0x77c6f40b7da70d885f68efaad7c661327482a63ea10dcb4271de819438254ae1",
|
32858
|
+
amount: 18446744073709552e3,
|
32859
|
+
asset_id: "0x0202020202020202020202020202020202020202020202020202020202020202"
|
32860
|
+
},
|
32861
|
+
{
|
32862
|
+
tx_id: "0xc3b0cb232c74009fd226a6246403f78bcc33d116579f41d9387c0d76c76942749c7c",
|
32863
|
+
output_index: 0,
|
32864
|
+
tx_pointer_block_height: 0,
|
32865
|
+
tx_pointer_tx_idx: 0,
|
32866
|
+
owner: "0x6a2c4691c547c43924650dbd30620b184b5fe3fb6dbe5c4446110b08f6f405bf",
|
32867
|
+
amount: 18446744073709552e3,
|
32868
|
+
asset_id: "0x0000000000000000000000000000000000000000000000000000000000000000"
|
32869
|
+
},
|
32870
|
+
{
|
32871
|
+
tx_id: "0x708ee45d18f94ab06458712745c92c7b9b6049ba345219d6697eae5208ec0328aeaf",
|
32872
|
+
output_index: 0,
|
32873
|
+
tx_pointer_block_height: 0,
|
32874
|
+
tx_pointer_tx_idx: 0,
|
32875
|
+
owner: "0x6a2c4691c547c43924650dbd30620b184b5fe3fb6dbe5c4446110b08f6f405bf",
|
32876
|
+
amount: 18446744073709552e3,
|
32877
|
+
asset_id: "0x0101010101010101010101010101010101010101010101010101010101010101"
|
32878
|
+
},
|
32879
|
+
{
|
32880
|
+
tx_id: "0xfe26968c44ac5becc608ce543075ae9e677b7631f3beb7a11ba20703fdca3c0e3569",
|
32881
|
+
output_index: 0,
|
32882
|
+
tx_pointer_block_height: 0,
|
32883
|
+
tx_pointer_tx_idx: 0,
|
32884
|
+
owner: "0x6a2c4691c547c43924650dbd30620b184b5fe3fb6dbe5c4446110b08f6f405bf",
|
32885
|
+
amount: 18446744073709552e3,
|
32886
|
+
asset_id: "0x0202020202020202020202020202020202020202020202020202020202020202"
|
32887
|
+
},
|
32888
|
+
{
|
32889
|
+
tx_id: "0xe0ec1d2c991feac69be4d0e84ad7c964616de08e16dccc4d2000b1900ba31082b993",
|
32890
|
+
output_index: 0,
|
32891
|
+
tx_pointer_block_height: 0,
|
32892
|
+
tx_pointer_tx_idx: 0,
|
32893
|
+
owner: "0x49075a7538e2c88ebe1926ce4d898198a2a4e790d14512943a9864bc536b3c82",
|
32894
|
+
amount: 18446744073709552e3,
|
32895
|
+
asset_id: "0x0000000000000000000000000000000000000000000000000000000000000000"
|
32896
|
+
},
|
32897
|
+
{
|
32898
|
+
tx_id: "0xfa82dbdd72252d1e6c76ee818bbac0441c3a705aff447f041c8b9fc3cb03f9ccd7e2",
|
32899
|
+
output_index: 0,
|
32900
|
+
tx_pointer_block_height: 0,
|
32901
|
+
tx_pointer_tx_idx: 0,
|
32902
|
+
owner: "0x49075a7538e2c88ebe1926ce4d898198a2a4e790d14512943a9864bc536b3c82",
|
32903
|
+
amount: 18446744073709552e3,
|
32904
|
+
asset_id: "0x0101010101010101010101010101010101010101010101010101010101010101"
|
32905
|
+
},
|
32906
|
+
{
|
32907
|
+
tx_id: "0x324f45e47cef892ac3e0759f3b72207c77046f9938267af4bd4af2ae031b97cb36c8",
|
32908
|
+
output_index: 0,
|
32909
|
+
tx_pointer_block_height: 0,
|
32910
|
+
tx_pointer_tx_idx: 0,
|
32911
|
+
owner: "0x49075a7538e2c88ebe1926ce4d898198a2a4e790d14512943a9864bc536b3c82",
|
32912
|
+
amount: 18446744073709552e3,
|
32913
|
+
asset_id: "0x0202020202020202020202020202020202020202020202020202020202020202"
|
32707
32914
|
}
|
32708
|
-
|
32915
|
+
],
|
32916
|
+
messages: [
|
32917
|
+
{
|
32918
|
+
sender: "0xc43454aa38dd91f88109a4b7aef5efb96ce34e3f24992fe0f81d233ca686f80f",
|
32919
|
+
recipient: "0x69a2b736b60159b43bb8a4f98c0589f6da5fa3a3d101e8e269c499eb942753ba",
|
32920
|
+
nonce: "0101010101010101010101010101010101010101010101010101010101010101",
|
32921
|
+
amount: 18446744073709552e3,
|
32922
|
+
data: "",
|
32923
|
+
da_height: 0
|
32924
|
+
},
|
32925
|
+
{
|
32926
|
+
sender: "0x69a2b736b60159b43bb8a4f98c0589f6da5fa3a3d101e8e269c499eb942753ba",
|
32927
|
+
recipient: "0xc43454aa38dd91f88109a4b7aef5efb96ce34e3f24992fe0f81d233ca686f80f",
|
32928
|
+
nonce: "0e1ef2963832068b0e1ef2963832068b0e1ef2963832068b0e1ef2963832068b",
|
32929
|
+
amount: 12704439083013452e3,
|
32930
|
+
data: "",
|
32931
|
+
da_height: 0
|
32932
|
+
}
|
32933
|
+
],
|
32934
|
+
contracts: [],
|
32935
|
+
block_height: 0,
|
32936
|
+
da_block_height: 0
|
32937
|
+
};
|
32938
|
+
var defaultChainConfigs = {
|
32939
|
+
chainConfigJson: chainConfig_default,
|
32940
|
+
metadataJson: metadata_default,
|
32941
|
+
stateConfigJson: stateConfig_default
|
32709
32942
|
};
|
32710
|
-
var defaultChainConfig = chainConfig_default;
|
32711
32943
|
var defaultConsensusKey = "0xa449b1ffee0e2205fa924c6740cc48b3b473aa28587df6dab12abc245d1f5298";
|
32712
32944
|
|
32713
32945
|
// ../crypto/dist/index.mjs
|
32714
|
-
var
|
32946
|
+
var import_crypto9 = __toESM(__require("crypto"), 1);
|
32715
32947
|
|
32716
32948
|
// ../../node_modules/.pnpm/ethers@6.7.1/node_modules/ethers/lib.esm/_version.js
|
32717
32949
|
var version = "6.7.1";
|
@@ -33783,6 +34015,27 @@ This unreleased fuel-core build may include features and updates not yet support
|
|
33783
34015
|
};
|
33784
34016
|
Object.freeze(pbkdf22);
|
33785
34017
|
|
34018
|
+
// ../../node_modules/.pnpm/ethers@6.7.1/node_modules/ethers/lib.esm/crypto/random.js
|
34019
|
+
var locked5 = false;
|
34020
|
+
var _randomBytes = function(length) {
|
34021
|
+
return new Uint8Array((0, import_crypto2.randomBytes)(length));
|
34022
|
+
};
|
34023
|
+
var __randomBytes = _randomBytes;
|
34024
|
+
function randomBytes3(length) {
|
34025
|
+
return __randomBytes(length);
|
34026
|
+
}
|
34027
|
+
randomBytes3._ = _randomBytes;
|
34028
|
+
randomBytes3.lock = function() {
|
34029
|
+
locked5 = true;
|
34030
|
+
};
|
34031
|
+
randomBytes3.register = function(func) {
|
34032
|
+
if (locked5) {
|
34033
|
+
throw new Error("randomBytes is locked");
|
34034
|
+
}
|
34035
|
+
__randomBytes = func;
|
34036
|
+
};
|
34037
|
+
Object.freeze(randomBytes3);
|
34038
|
+
|
33786
34039
|
// ../../node_modules/.pnpm/ethers@6.7.1/node_modules/ethers/lib.esm/address/address.js
|
33787
34040
|
var BN_03 = BigInt(0);
|
33788
34041
|
var BN_36 = BigInt(36);
|
@@ -34367,8 +34620,8 @@ This unreleased fuel-core build may include features and updates not yet support
|
|
34367
34620
|
}
|
34368
34621
|
|
34369
34622
|
// ../crypto/dist/index.mjs
|
34370
|
-
var import_crypto9 = __toESM(__require("crypto"), 1);
|
34371
34623
|
var import_crypto10 = __toESM(__require("crypto"), 1);
|
34624
|
+
var import_crypto11 = __toESM(__require("crypto"), 1);
|
34372
34625
|
var scrypt3 = (params) => {
|
34373
34626
|
const { password, salt, n, p, r, dklen } = params;
|
34374
34627
|
const derivedKey = scrypt(password, salt, { N: n, r, p, dkLen: dklen });
|
@@ -34377,7 +34630,7 @@ This unreleased fuel-core build may include features and updates not yet support
|
|
34377
34630
|
var keccak2562 = (data) => keccak_256(data);
|
34378
34631
|
var bufferFromString = (string, encoding = "base64") => Uint8Array.from(Buffer.from(string, encoding));
|
34379
34632
|
var randomBytes4 = (length) => {
|
34380
|
-
const randomValues = Uint8Array.from(
|
34633
|
+
const randomValues = Uint8Array.from(import_crypto10.default.randomBytes(length));
|
34381
34634
|
return randomValues;
|
34382
34635
|
};
|
34383
34636
|
var stringFromBuffer = (buffer, encoding = "base64") => Buffer.from(buffer).toString(encoding);
|
@@ -34392,7 +34645,7 @@ This unreleased fuel-core build may include features and updates not yet support
|
|
34392
34645
|
const salt = randomBytes4(32);
|
34393
34646
|
const secret = keyFromPassword(password, salt);
|
34394
34647
|
const dataBuffer = Uint8Array.from(Buffer.from(JSON.stringify(data), "utf-8"));
|
34395
|
-
const cipher = await
|
34648
|
+
const cipher = await import_crypto9.default.createCipheriv(ALGORITHM, secret, iv);
|
34396
34649
|
let cipherData = cipher.update(dataBuffer);
|
34397
34650
|
cipherData = Buffer.concat([cipherData, cipher.final()]);
|
34398
34651
|
return {
|
@@ -34406,7 +34659,7 @@ This unreleased fuel-core build may include features and updates not yet support
|
|
34406
34659
|
const salt = bufferFromString(keystore.salt);
|
34407
34660
|
const secret = keyFromPassword(password, salt);
|
34408
34661
|
const encryptedText = bufferFromString(keystore.data);
|
34409
|
-
const decipher = await
|
34662
|
+
const decipher = await import_crypto9.default.createDecipheriv(ALGORITHM, secret, iv);
|
34410
34663
|
const decrypted = decipher.update(encryptedText);
|
34411
34664
|
const deBuff = Buffer.concat([decrypted, decipher.final()]);
|
34412
34665
|
const decryptedData = Buffer.from(deBuff).toString("utf-8");
|
@@ -34417,12 +34670,12 @@ This unreleased fuel-core build may include features and updates not yet support
|
|
34417
34670
|
}
|
34418
34671
|
};
|
34419
34672
|
async function encryptJsonWalletData(data, key, iv) {
|
34420
|
-
const cipher = await
|
34673
|
+
const cipher = await import_crypto11.default.createCipheriv("aes-128-ctr", key.subarray(0, 16), iv);
|
34421
34674
|
const encrypted = Buffer.concat([cipher.update(data), cipher.final()]);
|
34422
34675
|
return new Uint8Array(encrypted);
|
34423
34676
|
}
|
34424
34677
|
async function decryptJsonWalletData(data, key, iv) {
|
34425
|
-
const decipher =
|
34678
|
+
const decipher = import_crypto11.default.createDecipheriv("aes-128-ctr", key.subarray(0, 16), iv);
|
34426
34679
|
const decrypted = await Buffer.concat([decipher.update(data), decipher.final()]);
|
34427
34680
|
return new Uint8Array(decrypted);
|
34428
34681
|
}
|
@@ -34756,6 +35009,10 @@ This unreleased fuel-core build may include features and updates not yet support
|
|
34756
35009
|
}
|
34757
35010
|
};
|
34758
35011
|
|
35012
|
+
// ../address/dist/configs.mjs
|
35013
|
+
var ZeroBytes32 = "0x0000000000000000000000000000000000000000000000000000000000000000";
|
35014
|
+
var BaseAssetId = ZeroBytes32;
|
35015
|
+
|
34759
35016
|
// ../math/dist/index.mjs
|
34760
35017
|
var import_bn = __toESM(require_bn(), 1);
|
34761
35018
|
var DEFAULT_PRECISION = 9;
|
@@ -34975,32 +35232,182 @@ This unreleased fuel-core build may include features and updates not yet support
|
|
34975
35232
|
function toBytes3(value, bytesPadding) {
|
34976
35233
|
return bn(value).toBytes(bytesPadding);
|
34977
35234
|
}
|
34978
|
-
|
34979
|
-
|
35235
|
+
|
35236
|
+
// ../../node_modules/.pnpm/ramda@0.29.0/node_modules/ramda/es/internal/_isPlaceholder.js
|
35237
|
+
function _isPlaceholder(a) {
|
35238
|
+
return a != null && typeof a === "object" && a["@@functional/placeholder"] === true;
|
35239
|
+
}
|
35240
|
+
|
35241
|
+
// ../../node_modules/.pnpm/ramda@0.29.0/node_modules/ramda/es/internal/_curry1.js
|
35242
|
+
function _curry1(fn) {
|
35243
|
+
return function f1(a) {
|
35244
|
+
if (arguments.length === 0 || _isPlaceholder(a)) {
|
35245
|
+
return f1;
|
35246
|
+
} else {
|
35247
|
+
return fn.apply(this, arguments);
|
35248
|
+
}
|
35249
|
+
};
|
35250
|
+
}
|
35251
|
+
|
35252
|
+
// ../../node_modules/.pnpm/ramda@0.29.0/node_modules/ramda/es/internal/_isArray.js
|
35253
|
+
var isArray_default = Array.isArray || function _isArray(val) {
|
35254
|
+
return val != null && val.length >= 0 && Object.prototype.toString.call(val) === "[object Array]";
|
35255
|
+
};
|
35256
|
+
|
35257
|
+
// ../../node_modules/.pnpm/ramda@0.29.0/node_modules/ramda/es/type.js
|
35258
|
+
var type = /* @__PURE__ */ _curry1(function type2(val) {
|
35259
|
+
return val === null ? "Null" : val === void 0 ? "Undefined" : Object.prototype.toString.call(val).slice(8, -1);
|
35260
|
+
});
|
35261
|
+
var type_default = type;
|
35262
|
+
|
35263
|
+
// ../../node_modules/.pnpm/ramda@0.29.0/node_modules/ramda/es/internal/_toISOString.js
|
35264
|
+
var pad = function pad2(n) {
|
35265
|
+
return (n < 10 ? "0" : "") + n;
|
35266
|
+
};
|
35267
|
+
var _toISOString = typeof Date.prototype.toISOString === "function" ? function _toISOString2(d) {
|
35268
|
+
return d.toISOString();
|
35269
|
+
} : function _toISOString3(d) {
|
35270
|
+
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";
|
35271
|
+
};
|
35272
|
+
|
35273
|
+
// ../../node_modules/.pnpm/ramda@0.29.0/node_modules/ramda/es/internal/_isInteger.js
|
35274
|
+
var isInteger_default = Number.isInteger || function _isInteger(n) {
|
35275
|
+
return n << 0 === n;
|
35276
|
+
};
|
35277
|
+
|
35278
|
+
// ../../node_modules/.pnpm/ramda@0.29.0/node_modules/ramda/es/internal/_cloneRegExp.js
|
35279
|
+
function _cloneRegExp(pattern) {
|
35280
|
+
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" : ""));
|
35281
|
+
}
|
35282
|
+
|
35283
|
+
// ../../node_modules/.pnpm/ramda@0.29.0/node_modules/ramda/es/internal/_clone.js
|
35284
|
+
function _clone(value, deep, map) {
|
35285
|
+
map || (map = new _ObjectMap());
|
35286
|
+
if (_isPrimitive(value)) {
|
35287
|
+
return value;
|
35288
|
+
}
|
35289
|
+
var copy = function copy2(copiedValue) {
|
35290
|
+
var cachedCopy = map.get(value);
|
35291
|
+
if (cachedCopy) {
|
35292
|
+
return cachedCopy;
|
35293
|
+
}
|
35294
|
+
map.set(value, copiedValue);
|
35295
|
+
for (var key in value) {
|
35296
|
+
if (Object.prototype.hasOwnProperty.call(value, key)) {
|
35297
|
+
copiedValue[key] = deep ? _clone(value[key], true, map) : value[key];
|
35298
|
+
}
|
35299
|
+
}
|
35300
|
+
return copiedValue;
|
35301
|
+
};
|
35302
|
+
switch (type_default(value)) {
|
35303
|
+
case "Object":
|
35304
|
+
return copy(Object.create(Object.getPrototypeOf(value)));
|
35305
|
+
case "Array":
|
35306
|
+
return copy([]);
|
35307
|
+
case "Date":
|
35308
|
+
return new Date(value.valueOf());
|
35309
|
+
case "RegExp":
|
35310
|
+
return _cloneRegExp(value);
|
35311
|
+
case "Int8Array":
|
35312
|
+
case "Uint8Array":
|
35313
|
+
case "Uint8ClampedArray":
|
35314
|
+
case "Int16Array":
|
35315
|
+
case "Uint16Array":
|
35316
|
+
case "Int32Array":
|
35317
|
+
case "Uint32Array":
|
35318
|
+
case "Float32Array":
|
35319
|
+
case "Float64Array":
|
35320
|
+
case "BigInt64Array":
|
35321
|
+
case "BigUint64Array":
|
35322
|
+
return value.slice();
|
35323
|
+
default:
|
35324
|
+
return value;
|
35325
|
+
}
|
35326
|
+
}
|
35327
|
+
function _isPrimitive(param) {
|
35328
|
+
var type3 = typeof param;
|
35329
|
+
return param == null || type3 != "object" && type3 != "function";
|
34980
35330
|
}
|
35331
|
+
var _ObjectMap = /* @__PURE__ */ function() {
|
35332
|
+
function _ObjectMap2() {
|
35333
|
+
this.map = {};
|
35334
|
+
this.length = 0;
|
35335
|
+
}
|
35336
|
+
_ObjectMap2.prototype.set = function(key, value) {
|
35337
|
+
const hashedKey = this.hash(key);
|
35338
|
+
let bucket = this.map[hashedKey];
|
35339
|
+
if (!bucket) {
|
35340
|
+
this.map[hashedKey] = bucket = [];
|
35341
|
+
}
|
35342
|
+
bucket.push([key, value]);
|
35343
|
+
this.length += 1;
|
35344
|
+
};
|
35345
|
+
_ObjectMap2.prototype.hash = function(key) {
|
35346
|
+
let hashedKey = [];
|
35347
|
+
for (var value in key) {
|
35348
|
+
hashedKey.push(Object.prototype.toString.call(key[value]));
|
35349
|
+
}
|
35350
|
+
return hashedKey.join();
|
35351
|
+
};
|
35352
|
+
_ObjectMap2.prototype.get = function(key) {
|
35353
|
+
if (this.length <= 180) {
|
35354
|
+
for (const p in this.map) {
|
35355
|
+
const bucket2 = this.map[p];
|
35356
|
+
for (let i = 0; i < bucket2.length; i += 1) {
|
35357
|
+
const element = bucket2[i];
|
35358
|
+
if (element[0] === key) {
|
35359
|
+
return element[1];
|
35360
|
+
}
|
35361
|
+
}
|
35362
|
+
}
|
35363
|
+
return;
|
35364
|
+
}
|
35365
|
+
const hashedKey = this.hash(key);
|
35366
|
+
const bucket = this.map[hashedKey];
|
35367
|
+
if (!bucket) {
|
35368
|
+
return;
|
35369
|
+
}
|
35370
|
+
for (let i = 0; i < bucket.length; i += 1) {
|
35371
|
+
const element = bucket[i];
|
35372
|
+
if (element[0] === key) {
|
35373
|
+
return element[1];
|
35374
|
+
}
|
35375
|
+
}
|
35376
|
+
};
|
35377
|
+
return _ObjectMap2;
|
35378
|
+
}();
|
35379
|
+
|
35380
|
+
// ../../node_modules/.pnpm/ramda@0.29.0/node_modules/ramda/es/clone.js
|
35381
|
+
var clone = /* @__PURE__ */ _curry1(function clone2(value) {
|
35382
|
+
return value != null && typeof value.clone === "function" ? value.clone() : _clone(value, true);
|
35383
|
+
});
|
35384
|
+
var clone_default = clone;
|
35385
|
+
|
35386
|
+
// ../../node_modules/.pnpm/ramda@0.29.0/node_modules/ramda/es/trim.js
|
35387
|
+
var hasProtoTrim = typeof String.prototype.trim === "function";
|
34981
35388
|
|
34982
35389
|
// src/providers/coin-quantity.ts
|
34983
35390
|
var coinQuantityfy = (coinQuantityLike) => {
|
34984
35391
|
let assetId;
|
34985
35392
|
let amount;
|
34986
|
-
let
|
35393
|
+
let max;
|
34987
35394
|
if (Array.isArray(coinQuantityLike)) {
|
34988
35395
|
amount = coinQuantityLike[0];
|
34989
|
-
assetId = coinQuantityLike[1];
|
34990
|
-
|
35396
|
+
assetId = coinQuantityLike[1] ?? BaseAssetId;
|
35397
|
+
max = coinQuantityLike[2] ?? void 0;
|
34991
35398
|
} else {
|
34992
35399
|
amount = coinQuantityLike.amount;
|
34993
|
-
assetId = coinQuantityLike.assetId;
|
34994
|
-
|
35400
|
+
assetId = coinQuantityLike.assetId ?? BaseAssetId;
|
35401
|
+
max = coinQuantityLike.max ?? void 0;
|
34995
35402
|
}
|
34996
35403
|
const bnAmount = bn(amount);
|
34997
35404
|
return {
|
34998
35405
|
assetId: hexlify(assetId),
|
34999
35406
|
amount: bnAmount.lt(1) ? bn(1) : bnAmount,
|
35000
|
-
max:
|
35407
|
+
max: max ? bn(max) : void 0
|
35001
35408
|
};
|
35002
35409
|
};
|
35003
|
-
var
|
35410
|
+
var addAmountToCoinQuantities = (params) => {
|
35004
35411
|
const { amount, assetId } = params;
|
35005
35412
|
const coinQuantities = [...params.coinQuantities];
|
35006
35413
|
const assetIdx = coinQuantities.findIndex((coinQuantity) => coinQuantity.assetId === assetId);
|
@@ -35067,7 +35474,7 @@ This unreleased fuel-core build may include features and updates not yet support
|
|
35067
35474
|
var ENCODING_V1 = "1";
|
35068
35475
|
var WORD_SIZE = 8;
|
35069
35476
|
var BYTES_32 = 32;
|
35070
|
-
var UTXO_ID_LEN = BYTES_32 +
|
35477
|
+
var UTXO_ID_LEN = BYTES_32 + 2;
|
35071
35478
|
var ASSET_ID_LEN = BYTES_32;
|
35072
35479
|
var ADDRESS_LEN = BYTES_32;
|
35073
35480
|
var NONCE_LEN = BYTES_32;
|
@@ -35075,9 +35482,9 @@ This unreleased fuel-core build may include features and updates not yet support
|
|
35075
35482
|
var TX_POINTER_LEN = WORD_SIZE * 2;
|
35076
35483
|
var MAX_BYTES = 2 ** 32 - 1;
|
35077
35484
|
var calculateVmTxMemory = ({ maxInputs }) => BYTES_32 + // Tx ID
|
35078
|
-
|
35485
|
+
ASSET_ID_LEN + // Base asset ID
|
35079
35486
|
// Asset ID/Balance coin input pairs
|
35080
|
-
maxInputs * (ASSET_ID_LEN + WORD_SIZE);
|
35487
|
+
maxInputs * (ASSET_ID_LEN + WORD_SIZE) + WORD_SIZE;
|
35081
35488
|
var SCRIPT_FIXED_SIZE = WORD_SIZE + // Identifier
|
35082
35489
|
WORD_SIZE + // Gas limit
|
35083
35490
|
WORD_SIZE + // Script size
|
@@ -35095,7 +35502,6 @@ This unreleased fuel-core build may include features and updates not yet support
|
|
35095
35502
|
ASSET_ID_LEN + // Asset id
|
35096
35503
|
TX_POINTER_LEN + // TxPointer
|
35097
35504
|
WORD_SIZE + // Witnesses index
|
35098
|
-
WORD_SIZE + // Maturity
|
35099
35505
|
WORD_SIZE + // Predicate size
|
35100
35506
|
WORD_SIZE + // Predicate data size
|
35101
35507
|
WORD_SIZE;
|
@@ -35417,7 +35823,7 @@ This unreleased fuel-core build may include features and updates not yet support
|
|
35417
35823
|
constructor(name, coders) {
|
35418
35824
|
const caseIndexCoder = new BigNumberCoder("u64");
|
35419
35825
|
const encodedValueSize = Object.values(coders).reduce(
|
35420
|
-
(
|
35826
|
+
(max, coder) => Math.max(max, coder.encodedLength),
|
35421
35827
|
0
|
35422
35828
|
);
|
35423
35829
|
super(`enum ${name}`, `enum ${name}`, caseIndexCoder.encodedLength + encodedValueSize);
|
@@ -36121,7 +36527,7 @@ This unreleased fuel-core build may include features and updates not yet support
|
|
36121
36527
|
constructor(name, coders) {
|
36122
36528
|
const caseIndexCoder = new BigNumberCoder("u64");
|
36123
36529
|
const encodedValueSize = Object.values(coders).reduce(
|
36124
|
-
(
|
36530
|
+
(max, coder) => Math.max(max, coder.encodedLength),
|
36125
36531
|
0
|
36126
36532
|
);
|
36127
36533
|
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
|
}
|
@@ -41540,26 +41837,32 @@ ${TransactionStatusFragmentFragmentDoc}`;
|
|
41540
41837
|
messageBlockHeader {
|
41541
41838
|
id
|
41542
41839
|
daHeight
|
41840
|
+
consensusParametersVersion
|
41841
|
+
stateTransitionBytecodeVersion
|
41543
41842
|
transactionsCount
|
41843
|
+
messageReceiptCount
|
41544
41844
|
transactionsRoot
|
41845
|
+
messageOutboxRoot
|
41846
|
+
eventInboxRoot
|
41545
41847
|
height
|
41546
41848
|
prevRoot
|
41547
41849
|
time
|
41548
41850
|
applicationHash
|
41549
|
-
messageReceiptRoot
|
41550
|
-
messageReceiptCount
|
41551
41851
|
}
|
41552
41852
|
commitBlockHeader {
|
41553
41853
|
id
|
41554
41854
|
daHeight
|
41855
|
+
consensusParametersVersion
|
41856
|
+
stateTransitionBytecodeVersion
|
41555
41857
|
transactionsCount
|
41858
|
+
messageReceiptCount
|
41556
41859
|
transactionsRoot
|
41860
|
+
messageOutboxRoot
|
41861
|
+
eventInboxRoot
|
41557
41862
|
height
|
41558
41863
|
prevRoot
|
41559
41864
|
time
|
41560
41865
|
applicationHash
|
41561
|
-
messageReceiptRoot
|
41562
|
-
messageReceiptCount
|
41563
41866
|
}
|
41564
41867
|
sender
|
41565
41868
|
recipient
|
@@ -41578,8 +41881,8 @@ ${TransactionStatusFragmentFragmentDoc}`;
|
|
41578
41881
|
var BlockFragmentFragmentDoc = lib_default2`
|
41579
41882
|
fragment blockFragment on Block {
|
41580
41883
|
id
|
41884
|
+
height
|
41581
41885
|
header {
|
41582
|
-
height
|
41583
41886
|
time
|
41584
41887
|
}
|
41585
41888
|
transactions {
|
@@ -41637,6 +41940,11 @@ ${TransactionStatusFragmentFragmentDoc}`;
|
|
41637
41940
|
`;
|
41638
41941
|
var GasCostsFragmentFragmentDoc = lib_default2`
|
41639
41942
|
fragment GasCostsFragment on GasCosts {
|
41943
|
+
version {
|
41944
|
+
... on Version {
|
41945
|
+
value
|
41946
|
+
}
|
41947
|
+
}
|
41640
41948
|
add
|
41641
41949
|
addi
|
41642
41950
|
aloc
|
@@ -41649,7 +41957,6 @@ ${TransactionStatusFragmentFragmentDoc}`;
|
|
41649
41957
|
cb
|
41650
41958
|
cfei
|
41651
41959
|
cfsi
|
41652
|
-
croo
|
41653
41960
|
div
|
41654
41961
|
divi
|
41655
41962
|
ecr1
|
@@ -41732,6 +42039,9 @@ ${TransactionStatusFragmentFragmentDoc}`;
|
|
41732
42039
|
ccp {
|
41733
42040
|
...DependentCostFragment
|
41734
42041
|
}
|
42042
|
+
croo {
|
42043
|
+
...DependentCostFragment
|
42044
|
+
}
|
41735
42045
|
csiz {
|
41736
42046
|
...DependentCostFragment
|
41737
42047
|
}
|
@@ -41791,6 +42101,11 @@ ${TransactionStatusFragmentFragmentDoc}`;
|
|
41791
42101
|
${DependentCostFragmentFragmentDoc}`;
|
41792
42102
|
var ConsensusParametersFragmentFragmentDoc = lib_default2`
|
41793
42103
|
fragment consensusParametersFragment on ConsensusParameters {
|
42104
|
+
version {
|
42105
|
+
... on Version {
|
42106
|
+
value
|
42107
|
+
}
|
42108
|
+
}
|
41794
42109
|
txParams {
|
41795
42110
|
...TxParametersFragment
|
41796
42111
|
}
|
@@ -41850,18 +42165,9 @@ ${ConsensusParametersFragmentFragmentDoc}`;
|
|
41850
42165
|
fragment nodeInfoFragment on NodeInfo {
|
41851
42166
|
utxoValidation
|
41852
42167
|
vmBacktrace
|
41853
|
-
minGasPrice
|
41854
42168
|
maxTx
|
41855
42169
|
maxDepth
|
41856
42170
|
nodeVersion
|
41857
|
-
peers {
|
41858
|
-
id
|
41859
|
-
addresses
|
41860
|
-
clientVersion
|
41861
|
-
blockHeight
|
41862
|
-
lastHeartbeatMs
|
41863
|
-
appScore
|
41864
|
-
}
|
41865
42171
|
}
|
41866
42172
|
`;
|
41867
42173
|
var GetVersionDocument = lib_default2`
|
@@ -41896,13 +42202,9 @@ ${ConsensusParametersFragmentFragmentDoc}`;
|
|
41896
42202
|
query getTransactionWithReceipts($transactionId: TransactionId!) {
|
41897
42203
|
transaction(id: $transactionId) {
|
41898
42204
|
...transactionFragment
|
41899
|
-
receipts {
|
41900
|
-
...receiptFragment
|
41901
|
-
}
|
41902
42205
|
}
|
41903
42206
|
}
|
41904
|
-
${TransactionFragmentFragmentDoc}
|
41905
|
-
${ReceiptFragmentFragmentDoc}`;
|
42207
|
+
${TransactionFragmentFragmentDoc}`;
|
41906
42208
|
var GetTransactionsDocument = lib_default2`
|
41907
42209
|
query getTransactions($after: String, $before: String, $first: Int, $last: Int) {
|
41908
42210
|
transactions(after: $after, before: $before, first: $first, last: $last) {
|
@@ -42030,6 +42332,20 @@ ${MessageCoinFragmentFragmentDoc}`;
|
|
42030
42332
|
}
|
42031
42333
|
}
|
42032
42334
|
${BalanceFragmentFragmentDoc}`;
|
42335
|
+
var GetLatestGasPriceDocument = lib_default2`
|
42336
|
+
query getLatestGasPrice {
|
42337
|
+
latestGasPrice {
|
42338
|
+
gasPrice
|
42339
|
+
}
|
42340
|
+
}
|
42341
|
+
`;
|
42342
|
+
var EstimateGasPriceDocument = lib_default2`
|
42343
|
+
query estimateGasPrice($blockHorizon: U32!) {
|
42344
|
+
estimateGasPrice(blockHorizon: $blockHorizon) {
|
42345
|
+
gasPrice
|
42346
|
+
}
|
42347
|
+
}
|
42348
|
+
`;
|
42033
42349
|
var GetBalancesDocument = lib_default2`
|
42034
42350
|
query getBalances($filter: BalanceFilterInput!, $after: String, $before: String, $first: Int, $last: Int) {
|
42035
42351
|
balances(
|
@@ -42084,12 +42400,12 @@ ${MessageCoinFragmentFragmentDoc}`;
|
|
42084
42400
|
}
|
42085
42401
|
`;
|
42086
42402
|
var DryRunDocument = lib_default2`
|
42087
|
-
mutation dryRun($
|
42088
|
-
dryRun(
|
42089
|
-
...
|
42403
|
+
mutation dryRun($encodedTransactions: [HexString!]!, $utxoValidation: Boolean) {
|
42404
|
+
dryRun(txs: $encodedTransactions, utxoValidation: $utxoValidation) {
|
42405
|
+
...dryRunTransactionExecutionStatusFragment
|
42090
42406
|
}
|
42091
42407
|
}
|
42092
|
-
${
|
42408
|
+
${DryRunTransactionExecutionStatusFragmentFragmentDoc}`;
|
42093
42409
|
var SubmitDocument = lib_default2`
|
42094
42410
|
mutation submit($encodedTransaction: HexString!) {
|
42095
42411
|
submit(tx: $encodedTransaction) {
|
@@ -42172,6 +42488,12 @@ ${MessageCoinFragmentFragmentDoc}`;
|
|
42172
42488
|
getBalance(variables, options) {
|
42173
42489
|
return requester(GetBalanceDocument, variables, options);
|
42174
42490
|
},
|
42491
|
+
getLatestGasPrice(variables, options) {
|
42492
|
+
return requester(GetLatestGasPriceDocument, variables, options);
|
42493
|
+
},
|
42494
|
+
estimateGasPrice(variables, options) {
|
42495
|
+
return requester(EstimateGasPriceDocument, variables, options);
|
42496
|
+
},
|
42175
42497
|
getBalances(variables, options) {
|
42176
42498
|
return requester(GetBalancesDocument, variables, options);
|
42177
42499
|
},
|
@@ -42336,9 +42658,6 @@ ${MessageCoinFragmentFragmentDoc}`;
|
|
42336
42658
|
}
|
42337
42659
|
};
|
42338
42660
|
|
42339
|
-
// ../address/dist/configs.mjs
|
42340
|
-
var ZeroBytes32 = "0x0000000000000000000000000000000000000000000000000000000000000000";
|
42341
|
-
|
42342
42661
|
// src/providers/transaction-request/input.ts
|
42343
42662
|
var inputify = (value) => {
|
42344
42663
|
const { type: type3 } = value;
|
@@ -42358,10 +42677,9 @@ ${MessageCoinFragmentFragmentDoc}`;
|
|
42358
42677
|
txIndex: toNumber2(arrayify(value.txPointer).slice(8, 16))
|
42359
42678
|
},
|
42360
42679
|
witnessIndex: value.witnessIndex,
|
42361
|
-
maturity: value.maturity ?? 0,
|
42362
42680
|
predicateGasUsed: bn(value.predicateGasUsed),
|
42363
|
-
predicateLength: predicate.length,
|
42364
|
-
predicateDataLength: predicateData.length,
|
42681
|
+
predicateLength: bn(predicate.length),
|
42682
|
+
predicateDataLength: bn(predicateData.length),
|
42365
42683
|
predicate: hexlify(predicate),
|
42366
42684
|
predicateData: hexlify(predicateData)
|
42367
42685
|
};
|
@@ -42392,8 +42710,8 @@ ${MessageCoinFragmentFragmentDoc}`;
|
|
42392
42710
|
nonce: hexlify(value.nonce),
|
42393
42711
|
witnessIndex: value.witnessIndex,
|
42394
42712
|
predicateGasUsed: bn(value.predicateGasUsed),
|
42395
|
-
predicateLength: predicate.length,
|
42396
|
-
predicateDataLength: predicateData.length,
|
42713
|
+
predicateLength: bn(predicate.length),
|
42714
|
+
predicateDataLength: bn(predicateData.length),
|
42397
42715
|
predicate: hexlify(predicate),
|
42398
42716
|
predicateData: hexlify(predicateData),
|
42399
42717
|
data: hexlify(data),
|
@@ -42550,8 +42868,8 @@ ${MessageCoinFragmentFragmentDoc}`;
|
|
42550
42868
|
case "CALL" /* Call */: {
|
42551
42869
|
const callReceipt = {
|
42552
42870
|
type: ReceiptType.Call,
|
42553
|
-
from: hexOrZero(receipt.
|
42554
|
-
to: hexOrZero(receipt?.to
|
42871
|
+
from: hexOrZero(receipt.id || receipt.contractId),
|
42872
|
+
to: hexOrZero(receipt?.to),
|
42555
42873
|
amount: bn(receipt.amount),
|
42556
42874
|
assetId: hexOrZero(receipt.assetId),
|
42557
42875
|
gas: bn(receipt.gas),
|
@@ -42565,7 +42883,7 @@ ${MessageCoinFragmentFragmentDoc}`;
|
|
42565
42883
|
case "RETURN" /* Return */: {
|
42566
42884
|
const returnReceipt = {
|
42567
42885
|
type: ReceiptType.Return,
|
42568
|
-
id: hexOrZero(receipt.
|
42886
|
+
id: hexOrZero(receipt.id || receipt.contractId),
|
42569
42887
|
val: bn(receipt.val),
|
42570
42888
|
pc: bn(receipt.pc),
|
42571
42889
|
is: bn(receipt.is)
|
@@ -42575,7 +42893,7 @@ ${MessageCoinFragmentFragmentDoc}`;
|
|
42575
42893
|
case "RETURN_DATA" /* ReturnData */: {
|
42576
42894
|
const returnDataReceipt = {
|
42577
42895
|
type: ReceiptType.ReturnData,
|
42578
|
-
id: hexOrZero(receipt.
|
42896
|
+
id: hexOrZero(receipt.id || receipt.contractId),
|
42579
42897
|
ptr: bn(receipt.ptr),
|
42580
42898
|
len: bn(receipt.len),
|
42581
42899
|
digest: hexOrZero(receipt.digest),
|
@@ -42587,7 +42905,7 @@ ${MessageCoinFragmentFragmentDoc}`;
|
|
42587
42905
|
case "PANIC" /* Panic */: {
|
42588
42906
|
const panicReceipt = {
|
42589
42907
|
type: ReceiptType.Panic,
|
42590
|
-
id: hexOrZero(receipt.
|
42908
|
+
id: hexOrZero(receipt.id),
|
42591
42909
|
reason: bn(receipt.reason),
|
42592
42910
|
pc: bn(receipt.pc),
|
42593
42911
|
is: bn(receipt.is),
|
@@ -42598,7 +42916,7 @@ ${MessageCoinFragmentFragmentDoc}`;
|
|
42598
42916
|
case "REVERT" /* Revert */: {
|
42599
42917
|
const revertReceipt = {
|
42600
42918
|
type: ReceiptType.Revert,
|
42601
|
-
id: hexOrZero(receipt.
|
42919
|
+
id: hexOrZero(receipt.id || receipt.contractId),
|
42602
42920
|
val: bn(receipt.ra),
|
42603
42921
|
pc: bn(receipt.pc),
|
42604
42922
|
is: bn(receipt.is)
|
@@ -42608,7 +42926,7 @@ ${MessageCoinFragmentFragmentDoc}`;
|
|
42608
42926
|
case "LOG" /* Log */: {
|
42609
42927
|
const logReceipt = {
|
42610
42928
|
type: ReceiptType.Log,
|
42611
|
-
id: hexOrZero(receipt.
|
42929
|
+
id: hexOrZero(receipt.id || receipt.contractId),
|
42612
42930
|
val0: bn(receipt.ra),
|
42613
42931
|
val1: bn(receipt.rb),
|
42614
42932
|
val2: bn(receipt.rc),
|
@@ -42621,7 +42939,7 @@ ${MessageCoinFragmentFragmentDoc}`;
|
|
42621
42939
|
case "LOG_DATA" /* LogData */: {
|
42622
42940
|
const logDataReceipt = {
|
42623
42941
|
type: ReceiptType.LogData,
|
42624
|
-
id: hexOrZero(receipt.
|
42942
|
+
id: hexOrZero(receipt.id || receipt.contractId),
|
42625
42943
|
val0: bn(receipt.ra),
|
42626
42944
|
val1: bn(receipt.rb),
|
42627
42945
|
ptr: bn(receipt.ptr),
|
@@ -42635,8 +42953,8 @@ ${MessageCoinFragmentFragmentDoc}`;
|
|
42635
42953
|
case "TRANSFER" /* Transfer */: {
|
42636
42954
|
const transferReceipt = {
|
42637
42955
|
type: ReceiptType.Transfer,
|
42638
|
-
from: hexOrZero(receipt.
|
42639
|
-
to: hexOrZero(receipt.toAddress || receipt?.to
|
42956
|
+
from: hexOrZero(receipt.id || receipt.contractId),
|
42957
|
+
to: hexOrZero(receipt.toAddress || receipt?.to),
|
42640
42958
|
amount: bn(receipt.amount),
|
42641
42959
|
assetId: hexOrZero(receipt.assetId),
|
42642
42960
|
pc: bn(receipt.pc),
|
@@ -42647,8 +42965,8 @@ ${MessageCoinFragmentFragmentDoc}`;
|
|
42647
42965
|
case "TRANSFER_OUT" /* TransferOut */: {
|
42648
42966
|
const transferOutReceipt = {
|
42649
42967
|
type: ReceiptType.TransferOut,
|
42650
|
-
from: hexOrZero(receipt.
|
42651
|
-
to: hexOrZero(receipt.toAddress || receipt.to
|
42968
|
+
from: hexOrZero(receipt.id || receipt.contractId),
|
42969
|
+
to: hexOrZero(receipt.toAddress || receipt.to),
|
42652
42970
|
amount: bn(receipt.amount),
|
42653
42971
|
assetId: hexOrZero(receipt.assetId),
|
42654
42972
|
pc: bn(receipt.pc),
|
@@ -42691,7 +43009,7 @@ ${MessageCoinFragmentFragmentDoc}`;
|
|
42691
43009
|
return receiptMessageOut;
|
42692
43010
|
}
|
42693
43011
|
case "MINT" /* Mint */: {
|
42694
|
-
const contractId = hexOrZero(receipt.
|
43012
|
+
const contractId = hexOrZero(receipt.id || receipt.contractId);
|
42695
43013
|
const subId = hexOrZero(receipt.subId);
|
42696
43014
|
const assetId = ReceiptMintCoder.getAssetId(contractId, subId);
|
42697
43015
|
const mintReceipt = {
|
@@ -42706,7 +43024,7 @@ ${MessageCoinFragmentFragmentDoc}`;
|
|
42706
43024
|
return mintReceipt;
|
42707
43025
|
}
|
42708
43026
|
case "BURN" /* Burn */: {
|
42709
|
-
const contractId = hexOrZero(receipt.
|
43027
|
+
const contractId = hexOrZero(receipt.id || receipt.contractId);
|
42710
43028
|
const subId = hexOrZero(receipt.subId);
|
42711
43029
|
const assetId = ReceiptBurnCoder.getAssetId(contractId, subId);
|
42712
43030
|
const burnReceipt = {
|
@@ -42726,7 +43044,6 @@ ${MessageCoinFragmentFragmentDoc}`;
|
|
42726
43044
|
}
|
42727
43045
|
|
42728
43046
|
// src/providers/utils/gas.ts
|
42729
|
-
var calculatePriceWithFactor = (gas, gasPrice, priceFactor) => bn(Math.ceil(gas.mul(gasPrice).toNumber() / priceFactor.toNumber()));
|
42730
43047
|
var getGasUsedFromReceipts = (receipts) => {
|
42731
43048
|
const scriptResult = receipts.filter(
|
42732
43049
|
(receipt) => receipt.type === ReceiptType.ScriptResult
|
@@ -42747,18 +43064,28 @@ ${MessageCoinFragmentFragmentDoc}`;
|
|
42747
43064
|
}
|
42748
43065
|
function gasUsedByInputs(inputs, txBytesSize, gasCosts) {
|
42749
43066
|
const witnessCache = [];
|
42750
|
-
const
|
43067
|
+
const chargeableInputs = inputs.filter((input) => {
|
43068
|
+
const isCoinOrMessage = "owner" in input || "sender" in input;
|
43069
|
+
if (isCoinOrMessage) {
|
43070
|
+
if ("predicate" in input && input.predicate && input.predicate !== "0x") {
|
43071
|
+
return true;
|
43072
|
+
}
|
43073
|
+
if (!witnessCache.includes(input.witnessIndex)) {
|
43074
|
+
witnessCache.push(input.witnessIndex);
|
43075
|
+
return true;
|
43076
|
+
}
|
43077
|
+
}
|
43078
|
+
return false;
|
43079
|
+
});
|
43080
|
+
const vmInitializationCost = resolveGasDependentCosts(txBytesSize, gasCosts.vmInitialization);
|
43081
|
+
const totalGas = chargeableInputs.reduce((total, input) => {
|
42751
43082
|
if ("predicate" in input && input.predicate && input.predicate !== "0x") {
|
42752
43083
|
return total.add(
|
42753
|
-
|
43084
|
+
vmInitializationCost.add(resolveGasDependentCosts(arrayify(input.predicate).length, gasCosts.contractRoot)).add(bn(input.predicateGasUsed))
|
42754
43085
|
);
|
42755
43086
|
}
|
42756
|
-
|
42757
|
-
|
42758
|
-
return total.add(gasCosts.ecr1);
|
42759
|
-
}
|
42760
|
-
return total;
|
42761
|
-
}, bn());
|
43087
|
+
return total.add(gasCosts.ecr1);
|
43088
|
+
}, bn(0));
|
42762
43089
|
return totalGas;
|
42763
43090
|
}
|
42764
43091
|
function getMinGas(params) {
|
@@ -42770,12 +43097,20 @@ ${MessageCoinFragmentFragmentDoc}`;
|
|
42770
43097
|
return minGas;
|
42771
43098
|
}
|
42772
43099
|
function getMaxGas(params) {
|
42773
|
-
const {
|
43100
|
+
const {
|
43101
|
+
gasPerByte,
|
43102
|
+
witnessesLength,
|
43103
|
+
witnessLimit,
|
43104
|
+
minGas,
|
43105
|
+
gasLimit = bn(0),
|
43106
|
+
maxGasPerTx
|
43107
|
+
} = params;
|
42774
43108
|
let remainingAllowedWitnessGas = bn(0);
|
42775
43109
|
if (witnessLimit?.gt(0) && witnessLimit.gte(witnessesLength)) {
|
42776
43110
|
remainingAllowedWitnessGas = bn(witnessLimit).sub(witnessesLength).mul(gasPerByte);
|
42777
43111
|
}
|
42778
|
-
|
43112
|
+
const maxGas = remainingAllowedWitnessGas.add(minGas).add(gasLimit);
|
43113
|
+
return maxGas.gte(maxGasPerTx) ? maxGasPerTx : maxGas;
|
42779
43114
|
}
|
42780
43115
|
function calculateMetadataGasForTxCreate({
|
42781
43116
|
gasCosts,
|
@@ -42797,6 +43132,10 @@ ${MessageCoinFragmentFragmentDoc}`;
|
|
42797
43132
|
}) {
|
42798
43133
|
return resolveGasDependentCosts(txBytesSize, gasCosts.s256);
|
42799
43134
|
}
|
43135
|
+
var calculateGasFee = (params) => {
|
43136
|
+
const { gas, gasPrice, priceFactor, tip } = params;
|
43137
|
+
return gas.mul(gasPrice).div(priceFactor).add(tip);
|
43138
|
+
};
|
42800
43139
|
|
42801
43140
|
// src/providers/utils/json.ts
|
42802
43141
|
function normalize2(object) {
|
@@ -42926,7 +43265,7 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
42926
43265
|
// src/providers/transaction-request/transaction-request.ts
|
42927
43266
|
var BaseTransactionRequest = class {
|
42928
43267
|
/** Gas price for transaction */
|
42929
|
-
|
43268
|
+
tip;
|
42930
43269
|
/** Block until which tx cannot be included */
|
42931
43270
|
maturity;
|
42932
43271
|
/** The maximum fee payable by this transaction using BASE_ASSET. */
|
@@ -42939,38 +43278,34 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
42939
43278
|
outputs = [];
|
42940
43279
|
/** List of witnesses */
|
42941
43280
|
witnesses = [];
|
42942
|
-
/** Base asset ID - should be fetched from the chain */
|
42943
|
-
baseAssetId;
|
42944
43281
|
/**
|
42945
43282
|
* Constructor for initializing a base transaction request.
|
42946
43283
|
*
|
42947
43284
|
* @param baseTransactionRequest - Optional object containing properties to initialize the transaction request.
|
42948
43285
|
*/
|
42949
43286
|
constructor({
|
42950
|
-
|
43287
|
+
tip,
|
42951
43288
|
maturity,
|
42952
43289
|
maxFee,
|
42953
43290
|
witnessLimit,
|
42954
43291
|
inputs,
|
42955
43292
|
outputs,
|
42956
|
-
witnesses
|
42957
|
-
|
42958
|
-
|
42959
|
-
this.gasPrice = bn(gasPrice);
|
43293
|
+
witnesses
|
43294
|
+
} = {}) {
|
43295
|
+
this.tip = bn(tip);
|
42960
43296
|
this.maturity = maturity ?? 0;
|
42961
43297
|
this.witnessLimit = witnessLimit ? bn(witnessLimit) : void 0;
|
42962
43298
|
this.maxFee = maxFee ? bn(maxFee) : void 0;
|
42963
43299
|
this.inputs = inputs ?? [];
|
42964
43300
|
this.outputs = outputs ?? [];
|
42965
43301
|
this.witnesses = witnesses ?? [];
|
42966
|
-
this.baseAssetId = baseAssetId;
|
42967
43302
|
}
|
42968
43303
|
static getPolicyMeta(req) {
|
42969
43304
|
let policyTypes = 0;
|
42970
43305
|
const policies = [];
|
42971
|
-
if (req.
|
42972
|
-
policyTypes += PolicyType.
|
42973
|
-
policies.push({ data: req.
|
43306
|
+
if (req.tip) {
|
43307
|
+
policyTypes += PolicyType.Tip;
|
43308
|
+
policies.push({ data: req.tip, type: PolicyType.Tip });
|
42974
43309
|
}
|
42975
43310
|
if (req.witnessLimit) {
|
42976
43311
|
policyTypes += PolicyType.WitnessLimit;
|
@@ -43157,10 +43492,10 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
43157
43492
|
* @param predicate - Predicate bytes.
|
43158
43493
|
* @param predicateData - Predicate data bytes.
|
43159
43494
|
*/
|
43160
|
-
addCoinInput(coin
|
43495
|
+
addCoinInput(coin) {
|
43161
43496
|
const { assetId, owner, amount } = coin;
|
43162
43497
|
let witnessIndex;
|
43163
|
-
if (predicate) {
|
43498
|
+
if (coin.predicate) {
|
43164
43499
|
witnessIndex = 0;
|
43165
43500
|
} else {
|
43166
43501
|
witnessIndex = this.getCoinInputWitnessIndexByOwner(owner);
|
@@ -43175,8 +43510,7 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
43175
43510
|
amount,
|
43176
43511
|
assetId,
|
43177
43512
|
txPointer: "0x00000000000000000000000000000000",
|
43178
|
-
witnessIndex
|
43179
|
-
predicate: predicate?.bytes
|
43513
|
+
witnessIndex
|
43180
43514
|
};
|
43181
43515
|
this.pushInput(input);
|
43182
43516
|
this.addChangeOutput(owner, assetId);
|
@@ -43187,11 +43521,13 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
43187
43521
|
*
|
43188
43522
|
* @param message - Message resource.
|
43189
43523
|
* @param predicate - Predicate bytes.
|
43524
|
+
* @param predicateData - Predicate data bytes.
|
43190
43525
|
*/
|
43191
|
-
addMessageInput(message
|
43526
|
+
addMessageInput(message) {
|
43192
43527
|
const { recipient, sender, amount } = message;
|
43528
|
+
const assetId = BaseAssetId;
|
43193
43529
|
let witnessIndex;
|
43194
|
-
if (predicate) {
|
43530
|
+
if (message.predicate) {
|
43195
43531
|
witnessIndex = 0;
|
43196
43532
|
} else {
|
43197
43533
|
witnessIndex = this.getCoinInputWitnessIndexByOwner(recipient);
|
@@ -43205,11 +43541,10 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
43205
43541
|
sender: sender.toB256(),
|
43206
43542
|
recipient: recipient.toB256(),
|
43207
43543
|
amount,
|
43208
|
-
witnessIndex
|
43209
|
-
predicate: predicate?.bytes
|
43544
|
+
witnessIndex
|
43210
43545
|
};
|
43211
43546
|
this.pushInput(input);
|
43212
|
-
this.addChangeOutput(recipient,
|
43547
|
+
this.addChangeOutput(recipient, assetId);
|
43213
43548
|
}
|
43214
43549
|
/**
|
43215
43550
|
* Adds a single resource to the transaction by adding a coin/message input and a
|
@@ -43237,32 +43572,6 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
43237
43572
|
resources.forEach((resource) => this.addResource(resource));
|
43238
43573
|
return this;
|
43239
43574
|
}
|
43240
|
-
/**
|
43241
|
-
* Adds multiple resources to the transaction by adding coin/message inputs and change
|
43242
|
-
* outputs from the related assetIds.
|
43243
|
-
*
|
43244
|
-
* @param resources - The resources to add.
|
43245
|
-
* @returns This transaction.
|
43246
|
-
*/
|
43247
|
-
addPredicateResource(resource, predicate) {
|
43248
|
-
if (isCoin(resource)) {
|
43249
|
-
this.addCoinInput(resource, predicate);
|
43250
|
-
} else {
|
43251
|
-
this.addMessageInput(resource, predicate);
|
43252
|
-
}
|
43253
|
-
return this;
|
43254
|
-
}
|
43255
|
-
/**
|
43256
|
-
* Adds multiple predicate coin/message inputs to the transaction and change outputs
|
43257
|
-
* from the related assetIds.
|
43258
|
-
*
|
43259
|
-
* @param resources - The resources to add.
|
43260
|
-
* @returns This transaction.
|
43261
|
-
*/
|
43262
|
-
addPredicateResources(resources, predicate) {
|
43263
|
-
resources.forEach((resource) => this.addPredicateResource(resource, predicate));
|
43264
|
-
return this;
|
43265
|
-
}
|
43266
43575
|
/**
|
43267
43576
|
* Adds a coin output to the transaction.
|
43268
43577
|
*
|
@@ -43270,12 +43579,12 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
43270
43579
|
* @param amount - Amount of coin.
|
43271
43580
|
* @param assetId - Asset ID of coin.
|
43272
43581
|
*/
|
43273
|
-
addCoinOutput(to, amount, assetId) {
|
43582
|
+
addCoinOutput(to, amount, assetId = BaseAssetId) {
|
43274
43583
|
this.pushOutput({
|
43275
43584
|
type: OutputType.Coin,
|
43276
43585
|
to: addressify(to).toB256(),
|
43277
43586
|
amount,
|
43278
|
-
assetId
|
43587
|
+
assetId
|
43279
43588
|
});
|
43280
43589
|
return this;
|
43281
43590
|
}
|
@@ -43302,7 +43611,7 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
43302
43611
|
* @param to - Address of the owner.
|
43303
43612
|
* @param assetId - Asset ID of coin.
|
43304
43613
|
*/
|
43305
|
-
addChangeOutput(to, assetId) {
|
43614
|
+
addChangeOutput(to, assetId = BaseAssetId) {
|
43306
43615
|
const changeOutput = this.getChangeOutputs().find(
|
43307
43616
|
(output3) => hexlify(output3.assetId) === assetId
|
43308
43617
|
);
|
@@ -43310,7 +43619,7 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
43310
43619
|
this.pushOutput({
|
43311
43620
|
type: OutputType.Change,
|
43312
43621
|
to: addressify(to).toB256(),
|
43313
|
-
assetId
|
43622
|
+
assetId
|
43314
43623
|
});
|
43315
43624
|
}
|
43316
43625
|
}
|
@@ -43342,7 +43651,7 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
43342
43651
|
}
|
43343
43652
|
calculateMaxGas(chainInfo, minGas) {
|
43344
43653
|
const { consensusParameters } = chainInfo;
|
43345
|
-
const { gasPerByte } = consensusParameters;
|
43654
|
+
const { gasPerByte, maxGasPerTx } = consensusParameters;
|
43346
43655
|
const witnessesLength = this.toTransaction().witnesses.reduce(
|
43347
43656
|
(acc, wit) => acc + wit.dataLength,
|
43348
43657
|
0
|
@@ -43351,7 +43660,8 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
43351
43660
|
gasPerByte,
|
43352
43661
|
minGas,
|
43353
43662
|
witnessesLength,
|
43354
|
-
witnessLimit: this.witnessLimit
|
43663
|
+
witnessLimit: this.witnessLimit,
|
43664
|
+
maxGasPerTx
|
43355
43665
|
});
|
43356
43666
|
}
|
43357
43667
|
/**
|
@@ -43369,24 +43679,27 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
43369
43679
|
});
|
43370
43680
|
const updateAssetInput = (assetId, quantity) => {
|
43371
43681
|
const assetInput = findAssetInput(assetId);
|
43682
|
+
let usedQuantity = quantity;
|
43683
|
+
if (assetId === BaseAssetId) {
|
43684
|
+
usedQuantity = bn("1000000000000000000");
|
43685
|
+
}
|
43372
43686
|
if (assetInput && "assetId" in assetInput) {
|
43373
43687
|
assetInput.id = hexlify(randomBytes22(UTXO_ID_LEN));
|
43374
|
-
assetInput.amount =
|
43688
|
+
assetInput.amount = usedQuantity;
|
43375
43689
|
} else {
|
43376
43690
|
this.addResources([
|
43377
43691
|
{
|
43378
43692
|
id: hexlify(randomBytes22(UTXO_ID_LEN)),
|
43379
|
-
amount:
|
43693
|
+
amount: usedQuantity,
|
43380
43694
|
assetId,
|
43381
43695
|
owner: resourcesOwner || Address.fromRandom(),
|
43382
|
-
maturity: 0,
|
43383
43696
|
blockCreated: bn(1),
|
43384
43697
|
txCreatedIdx: bn(1)
|
43385
43698
|
}
|
43386
43699
|
]);
|
43387
43700
|
}
|
43388
43701
|
};
|
43389
|
-
updateAssetInput(
|
43702
|
+
updateAssetInput(BaseAssetId, bn(1e11));
|
43390
43703
|
quantities.forEach((q) => updateAssetInput(q.assetId, q.amount));
|
43391
43704
|
}
|
43392
43705
|
/**
|
@@ -43411,7 +43724,7 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
43411
43724
|
toJSON() {
|
43412
43725
|
return normalizeJSON(this);
|
43413
43726
|
}
|
43414
|
-
|
43727
|
+
updatePredicateGasUsed(inputs) {
|
43415
43728
|
this.inputs.forEach((i) => {
|
43416
43729
|
let correspondingInput;
|
43417
43730
|
switch (i.type) {
|
@@ -43433,6 +43746,15 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
43433
43746
|
}
|
43434
43747
|
});
|
43435
43748
|
}
|
43749
|
+
shiftPredicateData() {
|
43750
|
+
this.inputs.forEach((input) => {
|
43751
|
+
if ("predicateData" in input && "paddPredicateData" in input && typeof input.paddPredicateData === "function") {
|
43752
|
+
input.predicateData = input.paddPredicateData(
|
43753
|
+
BaseTransactionRequest.getPolicyMeta(this).policies.length
|
43754
|
+
);
|
43755
|
+
}
|
43756
|
+
});
|
43757
|
+
}
|
43436
43758
|
};
|
43437
43759
|
|
43438
43760
|
// src/providers/transaction-request/hash-transaction.ts
|
@@ -43543,7 +43865,12 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
43543
43865
|
*
|
43544
43866
|
* @param createTransactionRequestLike - The initial values for the instance
|
43545
43867
|
*/
|
43546
|
-
constructor({
|
43868
|
+
constructor({
|
43869
|
+
bytecodeWitnessIndex,
|
43870
|
+
salt,
|
43871
|
+
storageSlots,
|
43872
|
+
...rest
|
43873
|
+
} = {}) {
|
43547
43874
|
super(rest);
|
43548
43875
|
this.bytecodeWitnessIndex = bytecodeWitnessIndex ?? 0;
|
43549
43876
|
this.salt = hexlify(salt ?? ZeroBytes32);
|
@@ -43561,9 +43888,8 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
43561
43888
|
return {
|
43562
43889
|
type: TransactionType.Create,
|
43563
43890
|
...baseTransaction,
|
43564
|
-
bytecodeLength: baseTransaction.witnesses[bytecodeWitnessIndex].dataLength / 4,
|
43565
43891
|
bytecodeWitnessIndex,
|
43566
|
-
storageSlotsCount: storageSlots.length,
|
43892
|
+
storageSlotsCount: bn(storageSlots.length),
|
43567
43893
|
salt: this.salt ? hexlify(this.salt) : ZeroBytes32,
|
43568
43894
|
storageSlots
|
43569
43895
|
};
|
@@ -43658,7 +43984,7 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
43658
43984
|
*
|
43659
43985
|
* @param scriptTransactionRequestLike - The initial values for the instance.
|
43660
43986
|
*/
|
43661
|
-
constructor({ script, scriptData, gasLimit, ...rest }) {
|
43987
|
+
constructor({ script, scriptData, gasLimit, ...rest } = {}) {
|
43662
43988
|
super(rest);
|
43663
43989
|
this.gasLimit = bn(gasLimit);
|
43664
43990
|
this.script = arrayify(script ?? returnZeroScript.bytes);
|
@@ -43677,8 +44003,8 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
43677
44003
|
type: TransactionType.Script,
|
43678
44004
|
scriptGasLimit: this.gasLimit,
|
43679
44005
|
...super.getBaseTransaction(),
|
43680
|
-
scriptLength: script.length,
|
43681
|
-
scriptDataLength: scriptData.length,
|
44006
|
+
scriptLength: bn(script.length),
|
44007
|
+
scriptDataLength: bn(scriptData.length),
|
43682
44008
|
receiptsRoot: ZeroBytes32,
|
43683
44009
|
script: hexlify(script),
|
43684
44010
|
scriptData: hexlify(scriptData)
|
@@ -43742,7 +44068,7 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
43742
44068
|
}
|
43743
44069
|
calculateMaxGas(chainInfo, minGas) {
|
43744
44070
|
const { consensusParameters } = chainInfo;
|
43745
|
-
const { gasPerByte } = consensusParameters;
|
44071
|
+
const { gasPerByte, maxGasPerTx } = consensusParameters;
|
43746
44072
|
const witnessesLength = this.toTransaction().witnesses.reduce(
|
43747
44073
|
(acc, wit) => acc + wit.dataLength,
|
43748
44074
|
0
|
@@ -43752,7 +44078,8 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
43752
44078
|
minGas,
|
43753
44079
|
witnessesLength,
|
43754
44080
|
witnessLimit: this.witnessLimit,
|
43755
|
-
gasLimit: this.gasLimit
|
44081
|
+
gasLimit: this.gasLimit,
|
44082
|
+
maxGasPerTx
|
43756
44083
|
});
|
43757
44084
|
}
|
43758
44085
|
/**
|
@@ -43825,13 +44152,29 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
43825
44152
|
}
|
43826
44153
|
}
|
43827
44154
|
};
|
44155
|
+
var cacheTxInputsFromOwner = (inputs, owner) => inputs.reduce(
|
44156
|
+
(acc, input) => {
|
44157
|
+
if (input.type === InputType.Coin && input.owner === owner) {
|
44158
|
+
acc.utxos.push(input.id);
|
44159
|
+
}
|
44160
|
+
if (input.type === InputType.Message && input.recipient === owner) {
|
44161
|
+
acc.messages.push(input.nonce);
|
44162
|
+
}
|
44163
|
+
return acc;
|
44164
|
+
},
|
44165
|
+
{
|
44166
|
+
utxos: [],
|
44167
|
+
messages: []
|
44168
|
+
}
|
44169
|
+
);
|
43828
44170
|
|
43829
44171
|
// src/providers/transaction-summary/calculate-transaction-fee.ts
|
43830
44172
|
var calculateTransactionFee = (params) => {
|
43831
44173
|
const {
|
43832
|
-
|
44174
|
+
gasPrice,
|
43833
44175
|
rawPayload,
|
43834
|
-
|
44176
|
+
tip,
|
44177
|
+
consensusParameters: { gasCosts, feeParams, maxGasPerTx }
|
43835
44178
|
} = params;
|
43836
44179
|
const gasPerByte = bn(feeParams.gasPerByte);
|
43837
44180
|
const gasPriceFactor = bn(feeParams.gasPriceFactor);
|
@@ -43841,8 +44184,7 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
43841
44184
|
return {
|
43842
44185
|
fee: bn(0),
|
43843
44186
|
minFee: bn(0),
|
43844
|
-
maxFee: bn(0)
|
43845
|
-
feeFromGasUsed: bn(0)
|
44187
|
+
maxFee: bn(0)
|
43846
44188
|
};
|
43847
44189
|
}
|
43848
44190
|
const { type: type3, witnesses, inputs, policies } = transaction;
|
@@ -43874,7 +44216,6 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
43874
44216
|
metadataGas,
|
43875
44217
|
txBytesSize: transactionBytes.length
|
43876
44218
|
});
|
43877
|
-
const gasPrice = bn(policies.find((policy) => policy.type === PolicyType.GasPrice)?.data);
|
43878
44219
|
const witnessLimit = policies.find((policy) => policy.type === PolicyType.WitnessLimit)?.data;
|
43879
44220
|
const witnessesLength = witnesses.reduce((acc, wit) => acc + wit.dataLength, 0);
|
43880
44221
|
const maxGas = getMaxGas({
|
@@ -43882,17 +44223,25 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
43882
44223
|
minGas,
|
43883
44224
|
witnessesLength,
|
43884
44225
|
gasLimit,
|
43885
|
-
witnessLimit
|
44226
|
+
witnessLimit,
|
44227
|
+
maxGasPerTx
|
44228
|
+
});
|
44229
|
+
const minFee = calculateGasFee({
|
44230
|
+
gasPrice,
|
44231
|
+
gas: minGas,
|
44232
|
+
priceFactor: gasPriceFactor,
|
44233
|
+
tip
|
44234
|
+
});
|
44235
|
+
const maxFee = calculateGasFee({
|
44236
|
+
gasPrice,
|
44237
|
+
gas: maxGas,
|
44238
|
+
priceFactor: gasPriceFactor,
|
44239
|
+
tip
|
43886
44240
|
});
|
43887
|
-
const feeFromGasUsed = calculatePriceWithFactor(gasUsed, gasPrice, gasPriceFactor);
|
43888
|
-
const minFee = calculatePriceWithFactor(minGas, gasPrice, gasPriceFactor);
|
43889
|
-
const maxFee = calculatePriceWithFactor(maxGas, gasPrice, gasPriceFactor);
|
43890
|
-
const fee = minFee.add(feeFromGasUsed);
|
43891
44241
|
return {
|
43892
|
-
fee,
|
43893
44242
|
minFee,
|
43894
44243
|
maxFee,
|
43895
|
-
|
44244
|
+
fee: maxFee
|
43896
44245
|
};
|
43897
44246
|
};
|
43898
44247
|
|
@@ -44446,7 +44795,9 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
44446
44795
|
gqlTransactionStatus,
|
44447
44796
|
abiMap = {},
|
44448
44797
|
maxInputs,
|
44449
|
-
gasCosts
|
44798
|
+
gasCosts,
|
44799
|
+
maxGasPerTx,
|
44800
|
+
gasPrice
|
44450
44801
|
} = params;
|
44451
44802
|
const gasUsed = getGasUsedFromReceipts(receipts);
|
44452
44803
|
const rawPayload = hexlify(transactionBytes);
|
@@ -44460,11 +44811,14 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
44460
44811
|
maxInputs
|
44461
44812
|
});
|
44462
44813
|
const typeName = getTransactionTypeName(transaction.type);
|
44814
|
+
const tip = bn(transaction.policies?.find((policy) => policy.type === PolicyType.Tip)?.data);
|
44463
44815
|
const { fee } = calculateTransactionFee({
|
44464
|
-
|
44816
|
+
gasPrice,
|
44465
44817
|
rawPayload,
|
44818
|
+
tip,
|
44466
44819
|
consensusParameters: {
|
44467
44820
|
gasCosts,
|
44821
|
+
maxGasPerTx,
|
44468
44822
|
feeParams: {
|
44469
44823
|
gasPerByte,
|
44470
44824
|
gasPriceFactor
|
@@ -44600,8 +44954,13 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
44600
44954
|
const decodedTransaction = this.decodeTransaction(
|
44601
44955
|
transaction
|
44602
44956
|
);
|
44603
|
-
|
44604
|
-
|
44957
|
+
let txReceipts = [];
|
44958
|
+
if (transaction?.status && "receipts" in transaction.status) {
|
44959
|
+
txReceipts = transaction.status.receipts;
|
44960
|
+
}
|
44961
|
+
const receipts = txReceipts.map(processGqlReceipt) || [];
|
44962
|
+
const { gasPerByte, gasPriceFactor, gasCosts, maxGasPerTx } = this.provider.getGasConfig();
|
44963
|
+
const gasPrice = await this.provider.getLatestGasPrice();
|
44605
44964
|
const maxInputs = this.provider.getChain().consensusParameters.maxInputs;
|
44606
44965
|
const transactionSummary = assembleTransactionSummary({
|
44607
44966
|
id: this.id,
|
@@ -44613,7 +44972,9 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
44613
44972
|
gasPriceFactor,
|
44614
44973
|
abiMap: contractsAbiMap,
|
44615
44974
|
maxInputs,
|
44616
|
-
gasCosts
|
44975
|
+
gasCosts,
|
44976
|
+
maxGasPerTx,
|
44977
|
+
gasPrice
|
44617
44978
|
});
|
44618
44979
|
return transactionSummary;
|
44619
44980
|
}
|
@@ -44757,13 +45118,12 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
44757
45118
|
gasPerByte: bn(feeParams.gasPerByte),
|
44758
45119
|
maxMessageDataLength: bn(predicateParams.maxMessageDataLength),
|
44759
45120
|
chainId: bn(consensusParameters.chainId),
|
44760
|
-
baseAssetId: consensusParameters.baseAssetId,
|
44761
45121
|
gasCosts
|
44762
45122
|
},
|
44763
45123
|
gasCosts,
|
44764
45124
|
latestBlock: {
|
44765
45125
|
id: latestBlock.id,
|
44766
|
-
height: bn(latestBlock.
|
45126
|
+
height: bn(latestBlock.height),
|
44767
45127
|
time: latestBlock.header.time,
|
44768
45128
|
transactions: latestBlock.transactions.map((i) => ({
|
44769
45129
|
id: i.id
|
@@ -44857,10 +45217,8 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
44857
45217
|
* Returns some helpful parameters related to gas fees.
|
44858
45218
|
*/
|
44859
45219
|
getGasConfig() {
|
44860
|
-
const { minGasPrice } = this.getNode();
|
44861
45220
|
const { maxGasPerTx, maxGasPerPredicate, gasPriceFactor, gasPerByte, gasCosts } = this.getChain().consensusParameters;
|
44862
45221
|
return {
|
44863
|
-
minGasPrice,
|
44864
45222
|
maxGasPerTx,
|
44865
45223
|
maxGasPerPredicate,
|
44866
45224
|
gasPriceFactor,
|
@@ -44958,7 +45316,7 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
44958
45316
|
*/
|
44959
45317
|
async getBlockNumber() {
|
44960
45318
|
const { chain } = await this.operations.getChain();
|
44961
|
-
return bn(chain.latestBlock.
|
45319
|
+
return bn(chain.latestBlock.height, 10);
|
44962
45320
|
}
|
44963
45321
|
/**
|
44964
45322
|
* Returns the chain information.
|
@@ -44970,11 +45328,9 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
44970
45328
|
const processedNodeInfo = {
|
44971
45329
|
maxDepth: bn(nodeInfo.maxDepth),
|
44972
45330
|
maxTx: bn(nodeInfo.maxTx),
|
44973
|
-
minGasPrice: bn(nodeInfo.minGasPrice),
|
44974
45331
|
nodeVersion: nodeInfo.nodeVersion,
|
44975
45332
|
utxoValidation: nodeInfo.utxoValidation,
|
44976
|
-
vmBacktrace: nodeInfo.vmBacktrace
|
44977
|
-
peers: nodeInfo.peers
|
45333
|
+
vmBacktrace: nodeInfo.vmBacktrace
|
44978
45334
|
};
|
44979
45335
|
_Provider.nodeInfoCache[this.url] = processedNodeInfo;
|
44980
45336
|
return processedNodeInfo;
|
@@ -45000,17 +45356,6 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
45000
45356
|
} = this.getChain();
|
45001
45357
|
return chainId.toNumber();
|
45002
45358
|
}
|
45003
|
-
/**
|
45004
|
-
* Returns the base asset ID
|
45005
|
-
*
|
45006
|
-
* @returns A promise that resolves to the base asset ID
|
45007
|
-
*/
|
45008
|
-
getBaseAssetId() {
|
45009
|
-
const {
|
45010
|
-
consensusParameters: { baseAssetId }
|
45011
|
-
} = this.getChain();
|
45012
|
-
return baseAssetId;
|
45013
|
-
}
|
45014
45359
|
/**
|
45015
45360
|
* Submits a transaction to the chain to be executed.
|
45016
45361
|
*
|
@@ -45071,14 +45416,13 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
45071
45416
|
return this.estimateTxDependencies(transactionRequest);
|
45072
45417
|
}
|
45073
45418
|
const encodedTransaction = hexlify(transactionRequest.toTransactionBytes());
|
45074
|
-
const { dryRun:
|
45075
|
-
encodedTransaction,
|
45419
|
+
const { dryRun: dryRunStatuses } = await this.operations.dryRun({
|
45420
|
+
encodedTransactions: encodedTransaction,
|
45076
45421
|
utxoValidation: utxoValidation || false
|
45077
45422
|
});
|
45078
|
-
const receipts =
|
45079
|
-
|
45080
|
-
|
45081
|
-
};
|
45423
|
+
const [{ receipts: rawReceipts, status }] = dryRunStatuses;
|
45424
|
+
const receipts = rawReceipts.map(processGqlReceipt);
|
45425
|
+
return { receipts, dryrunStatus: status };
|
45082
45426
|
}
|
45083
45427
|
/**
|
45084
45428
|
* Verifies whether enough gas is available to complete transaction.
|
@@ -45117,9 +45461,6 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
45117
45461
|
* If there are missing variable outputs,
|
45118
45462
|
* `addVariableOutputs` is called on the transaction.
|
45119
45463
|
*
|
45120
|
-
* @privateRemarks
|
45121
|
-
* TODO: Investigate support for missing contract IDs
|
45122
|
-
* TODO: Add support for missing output messages
|
45123
45464
|
*
|
45124
45465
|
* @param transactionRequest - The transaction request object.
|
45125
45466
|
* @returns A promise.
|
@@ -45132,16 +45473,19 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
45132
45473
|
missingContractIds: []
|
45133
45474
|
};
|
45134
45475
|
}
|
45135
|
-
await this.estimatePredicates(transactionRequest);
|
45136
45476
|
let receipts = [];
|
45137
45477
|
const missingContractIds = [];
|
45138
45478
|
let outputVariables = 0;
|
45479
|
+
let dryrunStatus;
|
45139
45480
|
for (let attempt = 0; attempt < MAX_RETRIES; attempt++) {
|
45140
|
-
const {
|
45141
|
-
|
45481
|
+
const {
|
45482
|
+
dryRun: [{ receipts: rawReceipts, status }]
|
45483
|
+
} = await this.operations.dryRun({
|
45484
|
+
encodedTransactions: [hexlify(transactionRequest.toTransactionBytes())],
|
45142
45485
|
utxoValidation: false
|
45143
45486
|
});
|
45144
|
-
receipts =
|
45487
|
+
receipts = rawReceipts.map(processGqlReceipt);
|
45488
|
+
dryrunStatus = status;
|
45145
45489
|
const { missingOutputVariables, missingOutputContractIds } = getReceiptsWithMissingData(receipts);
|
45146
45490
|
const hasMissingOutputs = missingOutputVariables.length !== 0 || missingOutputContractIds.length !== 0;
|
45147
45491
|
if (hasMissingOutputs) {
|
@@ -45151,6 +45495,10 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
45151
45495
|
transactionRequest.addContractInputAndOutput(Address.fromString(contractId));
|
45152
45496
|
missingContractIds.push(contractId);
|
45153
45497
|
});
|
45498
|
+
const { maxFee } = await this.estimateTxGasAndFee({
|
45499
|
+
transactionRequest
|
45500
|
+
});
|
45501
|
+
transactionRequest.maxFee = maxFee;
|
45154
45502
|
} else {
|
45155
45503
|
break;
|
45156
45504
|
}
|
@@ -45158,37 +45506,139 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
45158
45506
|
return {
|
45159
45507
|
receipts,
|
45160
45508
|
outputVariables,
|
45161
|
-
missingContractIds
|
45509
|
+
missingContractIds,
|
45510
|
+
dryrunStatus
|
45162
45511
|
};
|
45163
45512
|
}
|
45513
|
+
/**
|
45514
|
+
* Dry runs multiple transactions and checks for missing dependencies in batches.
|
45515
|
+
*
|
45516
|
+
* Transactions are dry run in batches. After each dry run, transactions requiring
|
45517
|
+
* further modifications are identified. The method iteratively updates these transactions
|
45518
|
+
* and performs subsequent dry runs until all dependencies for each transaction are satisfied.
|
45519
|
+
*
|
45520
|
+
* @param transactionRequests - Array of transaction request objects.
|
45521
|
+
* @returns A promise that resolves to an array of results for each transaction.
|
45522
|
+
*/
|
45523
|
+
async estimateMultipleTxDependencies(transactionRequests) {
|
45524
|
+
const results = transactionRequests.map(() => ({
|
45525
|
+
receipts: [],
|
45526
|
+
outputVariables: 0,
|
45527
|
+
missingContractIds: [],
|
45528
|
+
dryrunStatus: void 0
|
45529
|
+
}));
|
45530
|
+
const allRequests = clone_default(transactionRequests);
|
45531
|
+
const serializedTransactionsMap = /* @__PURE__ */ new Map();
|
45532
|
+
allRequests.forEach((req, index) => {
|
45533
|
+
if (req.type === TransactionType.Script) {
|
45534
|
+
serializedTransactionsMap.set(index, hexlify(req.toTransactionBytes()));
|
45535
|
+
}
|
45536
|
+
});
|
45537
|
+
let transactionsToProcess = Array.from(serializedTransactionsMap.keys());
|
45538
|
+
let attempt = 0;
|
45539
|
+
while (transactionsToProcess.length > 0 && attempt < MAX_RETRIES) {
|
45540
|
+
const encodedTransactions = transactionsToProcess.map(
|
45541
|
+
(index) => serializedTransactionsMap.get(index)
|
45542
|
+
);
|
45543
|
+
const dryRunResults = await this.operations.dryRun({
|
45544
|
+
encodedTransactions,
|
45545
|
+
utxoValidation: false
|
45546
|
+
});
|
45547
|
+
const nextRoundTransactions = [];
|
45548
|
+
for (let i = 0; i < dryRunResults.dryRun.length; i++) {
|
45549
|
+
const currentResultIndex = transactionsToProcess[i];
|
45550
|
+
const { receipts: rawReceipts, status } = dryRunResults.dryRun[i];
|
45551
|
+
results[currentResultIndex].receipts = rawReceipts.map(processGqlReceipt);
|
45552
|
+
results[currentResultIndex].dryrunStatus = status;
|
45553
|
+
const { missingOutputVariables, missingOutputContractIds } = getReceiptsWithMissingData(
|
45554
|
+
results[currentResultIndex].receipts
|
45555
|
+
);
|
45556
|
+
const hasMissingOutputs = missingOutputVariables.length > 0 || missingOutputContractIds.length > 0;
|
45557
|
+
const requestToProcess = allRequests[currentResultIndex];
|
45558
|
+
if (hasMissingOutputs && requestToProcess?.type === TransactionType.Script) {
|
45559
|
+
results[currentResultIndex].outputVariables += missingOutputVariables.length;
|
45560
|
+
requestToProcess.addVariableOutputs(missingOutputVariables.length);
|
45561
|
+
missingOutputContractIds.forEach(({ contractId }) => {
|
45562
|
+
requestToProcess.addContractInputAndOutput(Address.fromString(contractId));
|
45563
|
+
results[currentResultIndex].missingContractIds.push(contractId);
|
45564
|
+
});
|
45565
|
+
const { maxFee } = await this.estimateTxGasAndFee({
|
45566
|
+
transactionRequest: requestToProcess
|
45567
|
+
});
|
45568
|
+
requestToProcess.maxFee = maxFee;
|
45569
|
+
serializedTransactionsMap.set(
|
45570
|
+
currentResultIndex,
|
45571
|
+
hexlify(requestToProcess.toTransactionBytes())
|
45572
|
+
);
|
45573
|
+
nextRoundTransactions.push(currentResultIndex);
|
45574
|
+
allRequests[currentResultIndex] = requestToProcess;
|
45575
|
+
}
|
45576
|
+
}
|
45577
|
+
transactionsToProcess = nextRoundTransactions;
|
45578
|
+
attempt += 1;
|
45579
|
+
}
|
45580
|
+
return results;
|
45581
|
+
}
|
45582
|
+
async dryRunMultipleTransactions(transactionRequests, { utxoValidation, estimateTxDependencies = true } = {}) {
|
45583
|
+
if (estimateTxDependencies) {
|
45584
|
+
return this.estimateMultipleTxDependencies(transactionRequests);
|
45585
|
+
}
|
45586
|
+
const encodedTransactions = transactionRequests.map((tx) => hexlify(tx.toTransactionBytes()));
|
45587
|
+
const { dryRun: dryRunStatuses } = await this.operations.dryRun({
|
45588
|
+
encodedTransactions,
|
45589
|
+
utxoValidation: utxoValidation || false
|
45590
|
+
});
|
45591
|
+
const results = dryRunStatuses.map(({ receipts: rawReceipts, status }) => {
|
45592
|
+
const receipts = rawReceipts.map(processGqlReceipt);
|
45593
|
+
return { receipts, dryrunStatus: status };
|
45594
|
+
});
|
45595
|
+
return results;
|
45596
|
+
}
|
45164
45597
|
/**
|
45165
45598
|
* Estimates the transaction gas and fee based on the provided transaction request.
|
45166
45599
|
* @param transactionRequest - The transaction request object.
|
45167
45600
|
* @returns An object containing the estimated minimum gas, minimum fee, maximum gas, and maximum fee.
|
45168
45601
|
*/
|
45169
|
-
estimateTxGasAndFee(params) {
|
45602
|
+
async estimateTxGasAndFee(params) {
|
45170
45603
|
const { transactionRequest } = params;
|
45171
|
-
|
45604
|
+
let { gasPrice } = params;
|
45172
45605
|
const chainInfo = this.getChain();
|
45173
|
-
const
|
45174
|
-
transactionRequest.gasPrice = gasPrice;
|
45606
|
+
const { gasPriceFactor, maxGasPerTx } = this.getGasConfig();
|
45175
45607
|
const minGas = transactionRequest.calculateMinGas(chainInfo);
|
45176
|
-
|
45608
|
+
if (!gasPrice) {
|
45609
|
+
gasPrice = await this.estimateGasPrice(10);
|
45610
|
+
}
|
45611
|
+
const minFee = calculateGasFee({
|
45612
|
+
gasPrice: bn(gasPrice),
|
45613
|
+
gas: minGas,
|
45614
|
+
priceFactor: gasPriceFactor,
|
45615
|
+
tip: transactionRequest.tip
|
45616
|
+
}).add(1);
|
45617
|
+
let gasLimit = bn(0);
|
45177
45618
|
if (transactionRequest.type === TransactionType.Script) {
|
45619
|
+
gasLimit = transactionRequest.gasLimit;
|
45178
45620
|
if (transactionRequest.gasLimit.eq(0)) {
|
45179
45621
|
transactionRequest.gasLimit = minGas;
|
45180
45622
|
transactionRequest.gasLimit = maxGasPerTx.sub(
|
45181
45623
|
transactionRequest.calculateMaxGas(chainInfo, minGas)
|
45182
45624
|
);
|
45625
|
+
gasLimit = transactionRequest.gasLimit;
|
45183
45626
|
}
|
45184
45627
|
}
|
45185
45628
|
const maxGas = transactionRequest.calculateMaxGas(chainInfo, minGas);
|
45186
|
-
const maxFee =
|
45629
|
+
const maxFee = calculateGasFee({
|
45630
|
+
gasPrice: bn(gasPrice),
|
45631
|
+
gas: maxGas,
|
45632
|
+
priceFactor: gasPriceFactor,
|
45633
|
+
tip: transactionRequest.tip
|
45634
|
+
}).add(1);
|
45187
45635
|
return {
|
45188
45636
|
minGas,
|
45189
45637
|
minFee,
|
45190
45638
|
maxGas,
|
45191
|
-
maxFee
|
45639
|
+
maxFee,
|
45640
|
+
gasPrice,
|
45641
|
+
gasLimit
|
45192
45642
|
};
|
45193
45643
|
}
|
45194
45644
|
/**
|
@@ -45206,15 +45656,17 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
45206
45656
|
if (estimateTxDependencies) {
|
45207
45657
|
return this.estimateTxDependencies(transactionRequest);
|
45208
45658
|
}
|
45209
|
-
const
|
45210
|
-
const { dryRun:
|
45211
|
-
|
45659
|
+
const encodedTransactions = [hexlify(transactionRequest.toTransactionBytes())];
|
45660
|
+
const { dryRun: dryRunStatuses } = await this.operations.dryRun({
|
45661
|
+
encodedTransactions,
|
45212
45662
|
utxoValidation: true
|
45213
45663
|
});
|
45214
|
-
const
|
45215
|
-
|
45216
|
-
receipts
|
45217
|
-
|
45664
|
+
const callResult = dryRunStatuses.map((dryRunStatus) => {
|
45665
|
+
const { id, receipts, status } = dryRunStatus;
|
45666
|
+
const processedReceipts = receipts.map(processGqlReceipt);
|
45667
|
+
return { id, receipts: processedReceipts, status };
|
45668
|
+
});
|
45669
|
+
return { receipts: callResult[0].receipts };
|
45218
45670
|
}
|
45219
45671
|
/**
|
45220
45672
|
* Returns a transaction cost to enable user
|
@@ -45231,77 +45683,79 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
45231
45683
|
* @param tolerance - The tolerance to add on top of the gasUsed.
|
45232
45684
|
* @returns A promise that resolves to the transaction cost object.
|
45233
45685
|
*/
|
45234
|
-
async getTransactionCost(transactionRequestLike,
|
45235
|
-
estimateTxDependencies = true,
|
45236
|
-
estimatePredicates = true,
|
45237
|
-
resourcesOwner,
|
45238
|
-
signatureCallback
|
45239
|
-
} = {}) {
|
45686
|
+
async getTransactionCost(transactionRequestLike, { resourcesOwner, signatureCallback, quantitiesToContract = [] } = {}) {
|
45240
45687
|
const txRequestClone = clone_default(transactionRequestify(transactionRequestLike));
|
45241
|
-
const { minGasPrice } = this.getGasConfig();
|
45242
|
-
const setGasPrice = max(txRequestClone.gasPrice, minGasPrice);
|
45243
45688
|
const isScriptTransaction = txRequestClone.type === TransactionType.Script;
|
45244
45689
|
const coinOutputsQuantities = txRequestClone.getCoinOutputsQuantities();
|
45245
|
-
const allQuantities = mergeQuantities(coinOutputsQuantities,
|
45690
|
+
const allQuantities = mergeQuantities(coinOutputsQuantities, quantitiesToContract);
|
45246
45691
|
txRequestClone.fundWithFakeUtxos(allQuantities, resourcesOwner?.address);
|
45692
|
+
txRequestClone.maxFee = bn(0);
|
45247
45693
|
if (isScriptTransaction) {
|
45248
45694
|
txRequestClone.gasLimit = bn(0);
|
45249
45695
|
}
|
45250
|
-
if (
|
45251
|
-
|
45252
|
-
resourcesOwner.populateTransactionPredicateData(txRequestClone);
|
45253
|
-
}
|
45254
|
-
await this.estimatePredicates(txRequestClone);
|
45696
|
+
if (resourcesOwner && "populateTransactionPredicateData" in resourcesOwner) {
|
45697
|
+
resourcesOwner.populateTransactionPredicateData(txRequestClone);
|
45255
45698
|
}
|
45699
|
+
const signedRequest = clone_default(txRequestClone);
|
45700
|
+
let addedSignatures = 0;
|
45256
45701
|
if (signatureCallback && isScriptTransaction) {
|
45257
|
-
|
45702
|
+
const lengthBefore = signedRequest.witnesses.length;
|
45703
|
+
await signatureCallback(signedRequest);
|
45704
|
+
addedSignatures = signedRequest.witnesses.length - lengthBefore;
|
45258
45705
|
}
|
45259
|
-
|
45260
|
-
|
45706
|
+
await this.estimatePredicates(signedRequest);
|
45707
|
+
let { maxFee, maxGas, minFee, minGas, gasPrice, gasLimit } = await this.estimateTxGasAndFee({
|
45708
|
+
transactionRequest: signedRequest
|
45261
45709
|
});
|
45262
45710
|
let receipts = [];
|
45263
45711
|
let missingContractIds = [];
|
45264
45712
|
let outputVariables = 0;
|
45265
45713
|
let gasUsed = bn(0);
|
45266
|
-
|
45267
|
-
|
45714
|
+
txRequestClone.updatePredicateGasUsed(signedRequest.inputs);
|
45715
|
+
txRequestClone.maxFee = maxFee;
|
45716
|
+
if (isScriptTransaction) {
|
45717
|
+
txRequestClone.gasLimit = gasLimit;
|
45718
|
+
if (signatureCallback) {
|
45719
|
+
await signatureCallback(txRequestClone);
|
45720
|
+
}
|
45268
45721
|
const result = await this.estimateTxDependencies(txRequestClone);
|
45269
45722
|
receipts = result.receipts;
|
45270
45723
|
outputVariables = result.outputVariables;
|
45271
45724
|
missingContractIds = result.missingContractIds;
|
45272
45725
|
gasUsed = isScriptTransaction ? getGasUsedFromReceipts(receipts) : gasUsed;
|
45273
45726
|
txRequestClone.gasLimit = gasUsed;
|
45274
|
-
|
45275
|
-
|
45276
|
-
|
45727
|
+
({ maxFee, maxGas, minFee, minGas, gasPrice } = await this.estimateTxGasAndFee({
|
45728
|
+
transactionRequest: txRequestClone,
|
45729
|
+
gasPrice
|
45277
45730
|
}));
|
45278
45731
|
}
|
45279
45732
|
return {
|
45280
45733
|
requiredQuantities: allQuantities,
|
45281
45734
|
receipts,
|
45282
45735
|
gasUsed,
|
45283
|
-
|
45284
|
-
gasPrice: setGasPrice,
|
45736
|
+
gasPrice,
|
45285
45737
|
minGas,
|
45286
45738
|
maxGas,
|
45287
45739
|
minFee,
|
45288
45740
|
maxFee,
|
45289
|
-
estimatedInputs: txRequestClone.inputs,
|
45290
45741
|
outputVariables,
|
45291
|
-
missingContractIds
|
45742
|
+
missingContractIds,
|
45743
|
+
addedSignatures,
|
45744
|
+
estimatedPredicates: txRequestClone.inputs
|
45292
45745
|
};
|
45293
45746
|
}
|
45294
|
-
async getResourcesForTransaction(owner, transactionRequestLike,
|
45747
|
+
async getResourcesForTransaction(owner, transactionRequestLike, quantitiesToContract = []) {
|
45295
45748
|
const ownerAddress = Address.fromAddressOrString(owner);
|
45296
45749
|
const transactionRequest = transactionRequestify(clone_default(transactionRequestLike));
|
45297
|
-
const transactionCost = await this.getTransactionCost(transactionRequest,
|
45750
|
+
const transactionCost = await this.getTransactionCost(transactionRequest, {
|
45751
|
+
quantitiesToContract
|
45752
|
+
});
|
45298
45753
|
transactionRequest.addResources(
|
45299
45754
|
await this.getResourcesToSpend(ownerAddress, transactionCost.requiredQuantities)
|
45300
45755
|
);
|
45301
|
-
const { requiredQuantities, ...txCost } = await this.getTransactionCost(
|
45302
|
-
|
45303
|
-
|
45304
|
-
);
|
45756
|
+
const { requiredQuantities, ...txCost } = await this.getTransactionCost(transactionRequest, {
|
45757
|
+
quantitiesToContract
|
45758
|
+
});
|
45305
45759
|
const resources = await this.getResourcesToSpend(ownerAddress, requiredQuantities);
|
45306
45760
|
return {
|
45307
45761
|
resources,
|
@@ -45325,7 +45779,6 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
45325
45779
|
assetId: coin.assetId,
|
45326
45780
|
amount: bn(coin.amount),
|
45327
45781
|
owner: Address.fromAddressOrString(coin.owner),
|
45328
|
-
maturity: bn(coin.maturity).toNumber(),
|
45329
45782
|
blockCreated: bn(coin.blockCreated),
|
45330
45783
|
txCreatedIdx: bn(coin.txCreatedIdx)
|
45331
45784
|
}));
|
@@ -45377,7 +45830,6 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
45377
45830
|
amount: bn(coin.amount),
|
45378
45831
|
assetId: coin.assetId,
|
45379
45832
|
owner: Address.fromAddressOrString(coin.owner),
|
45380
|
-
maturity: bn(coin.maturity).toNumber(),
|
45381
45833
|
blockCreated: bn(coin.blockCreated),
|
45382
45834
|
txCreatedIdx: bn(coin.txCreatedIdx)
|
45383
45835
|
};
|
@@ -45410,7 +45862,7 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
45410
45862
|
}
|
45411
45863
|
return {
|
45412
45864
|
id: block2.id,
|
45413
|
-
height: bn(block2.
|
45865
|
+
height: bn(block2.height),
|
45414
45866
|
time: block2.header.time,
|
45415
45867
|
transactionIds: block2.transactions.map((tx) => tx.id)
|
45416
45868
|
};
|
@@ -45425,7 +45877,7 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
45425
45877
|
const { blocks: fetchedData } = await this.operations.getBlocks(params);
|
45426
45878
|
const blocks = fetchedData.edges.map(({ node: block2 }) => ({
|
45427
45879
|
id: block2.id,
|
45428
|
-
height: bn(block2.
|
45880
|
+
height: bn(block2.height),
|
45429
45881
|
time: block2.header.time,
|
45430
45882
|
transactionIds: block2.transactions.map((tx) => tx.id)
|
45431
45883
|
}));
|
@@ -45452,7 +45904,7 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
45452
45904
|
}
|
45453
45905
|
return {
|
45454
45906
|
id: block2.id,
|
45455
|
-
height: bn(block2.
|
45907
|
+
height: bn(block2.height, 10),
|
45456
45908
|
time: block2.header.time,
|
45457
45909
|
transactionIds: block2.transactions.map((tx) => tx.id),
|
45458
45910
|
transactions: block2.transactions.map(
|
@@ -45632,8 +46084,11 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
45632
46084
|
prevRoot: messageBlockHeader.prevRoot,
|
45633
46085
|
time: messageBlockHeader.time,
|
45634
46086
|
applicationHash: messageBlockHeader.applicationHash,
|
45635
|
-
|
45636
|
-
|
46087
|
+
messageReceiptCount: bn(messageBlockHeader.messageReceiptCount),
|
46088
|
+
messageOutboxRoot: messageBlockHeader.messageOutboxRoot,
|
46089
|
+
consensusParametersVersion: messageBlockHeader.consensusParametersVersion,
|
46090
|
+
eventInboxRoot: messageBlockHeader.eventInboxRoot,
|
46091
|
+
stateTransitionBytecodeVersion: messageBlockHeader.stateTransitionBytecodeVersion
|
45637
46092
|
},
|
45638
46093
|
commitBlockHeader: {
|
45639
46094
|
id: commitBlockHeader.id,
|
@@ -45644,8 +46099,11 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
45644
46099
|
prevRoot: commitBlockHeader.prevRoot,
|
45645
46100
|
time: commitBlockHeader.time,
|
45646
46101
|
applicationHash: commitBlockHeader.applicationHash,
|
45647
|
-
|
45648
|
-
|
46102
|
+
messageReceiptCount: bn(commitBlockHeader.messageReceiptCount),
|
46103
|
+
messageOutboxRoot: commitBlockHeader.messageOutboxRoot,
|
46104
|
+
consensusParametersVersion: commitBlockHeader.consensusParametersVersion,
|
46105
|
+
eventInboxRoot: commitBlockHeader.eventInboxRoot,
|
46106
|
+
stateTransitionBytecodeVersion: commitBlockHeader.stateTransitionBytecodeVersion
|
45649
46107
|
},
|
45650
46108
|
sender: Address.fromAddressOrString(sender),
|
45651
46109
|
recipient: Address.fromAddressOrString(recipient),
|
@@ -45654,6 +46112,16 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
45654
46112
|
data
|
45655
46113
|
};
|
45656
46114
|
}
|
46115
|
+
async getLatestGasPrice() {
|
46116
|
+
const { latestGasPrice } = await this.operations.getLatestGasPrice();
|
46117
|
+
return bn(latestGasPrice.gasPrice);
|
46118
|
+
}
|
46119
|
+
async estimateGasPrice(blockHorizon) {
|
46120
|
+
const { estimateGasPrice } = await this.operations.estimateGasPrice({
|
46121
|
+
blockHorizon: String(blockHorizon)
|
46122
|
+
});
|
46123
|
+
return bn(estimateGasPrice.gasPrice);
|
46124
|
+
}
|
45657
46125
|
/**
|
45658
46126
|
* Returns Message Proof for given transaction id and the message id from MessageOut receipt.
|
45659
46127
|
*
|
@@ -45899,9 +46367,8 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
45899
46367
|
* @param assetId - The asset ID to check the balance for.
|
45900
46368
|
* @returns A promise that resolves to the balance amount.
|
45901
46369
|
*/
|
45902
|
-
async getBalance(assetId) {
|
45903
|
-
const
|
45904
|
-
const amount = await this.provider.getBalance(this.address, assetIdToFetch);
|
46370
|
+
async getBalance(assetId = BaseAssetId) {
|
46371
|
+
const amount = await this.provider.getBalance(this.address, assetId);
|
45905
46372
|
return amount;
|
45906
46373
|
}
|
45907
46374
|
/**
|
@@ -45938,37 +46405,33 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
45938
46405
|
* @param fee - The estimated transaction fee.
|
45939
46406
|
* @returns A promise that resolves when the resources are added to the transaction.
|
45940
46407
|
*/
|
45941
|
-
async fund(request,
|
45942
|
-
const
|
45943
|
-
const
|
46408
|
+
async fund(request, params) {
|
46409
|
+
const { addedSignatures, estimatedPredicates, maxFee: fee, requiredQuantities } = params;
|
46410
|
+
const txRequest = request;
|
46411
|
+
const requiredQuantitiesWithFee = addAmountToCoinQuantities({
|
45944
46412
|
amount: bn(fee),
|
45945
|
-
assetId:
|
45946
|
-
coinQuantities
|
46413
|
+
assetId: BaseAssetId,
|
46414
|
+
coinQuantities: requiredQuantities
|
45947
46415
|
});
|
45948
46416
|
const quantitiesDict = {};
|
45949
|
-
|
46417
|
+
requiredQuantitiesWithFee.forEach(({ amount, assetId }) => {
|
45950
46418
|
quantitiesDict[assetId] = {
|
45951
46419
|
required: amount,
|
45952
46420
|
owned: bn(0)
|
45953
46421
|
};
|
45954
46422
|
});
|
45955
|
-
|
45956
|
-
const cachedMessages = [];
|
45957
|
-
const owner = this.address.toB256();
|
45958
|
-
request.inputs.forEach((input) => {
|
46423
|
+
txRequest.inputs.forEach((input) => {
|
45959
46424
|
const isResource = "amount" in input;
|
45960
46425
|
if (isResource) {
|
45961
46426
|
const isCoin2 = "owner" in input;
|
45962
46427
|
if (isCoin2) {
|
45963
46428
|
const assetId = String(input.assetId);
|
45964
|
-
if (
|
46429
|
+
if (quantitiesDict[assetId]) {
|
45965
46430
|
const amount = bn(input.amount);
|
45966
46431
|
quantitiesDict[assetId].owned = quantitiesDict[assetId].owned.add(amount);
|
45967
|
-
cachedUtxos.push(input.id);
|
45968
46432
|
}
|
45969
|
-
} else if (input.
|
45970
|
-
quantitiesDict[
|
45971
|
-
cachedMessages.push(input.nonce);
|
46433
|
+
} else if (input.amount && quantitiesDict[BaseAssetId]) {
|
46434
|
+
quantitiesDict[BaseAssetId].owned = quantitiesDict[BaseAssetId].owned.add(input.amount);
|
45972
46435
|
}
|
45973
46436
|
}
|
45974
46437
|
});
|
@@ -45983,12 +46446,23 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
45983
46446
|
});
|
45984
46447
|
const needsToBeFunded = missingQuantities.length;
|
45985
46448
|
if (needsToBeFunded) {
|
45986
|
-
const
|
45987
|
-
|
45988
|
-
|
45989
|
-
|
45990
|
-
|
46449
|
+
const excludedIds = cacheTxInputsFromOwner(txRequest.inputs, this.address.toB256());
|
46450
|
+
const resources = await this.getResourcesToSpend(missingQuantities, excludedIds);
|
46451
|
+
txRequest.addResources(resources);
|
46452
|
+
}
|
46453
|
+
txRequest.shiftPredicateData();
|
46454
|
+
txRequest.updatePredicateGasUsed(estimatedPredicates);
|
46455
|
+
const requestToBeReEstimate = clone_default(txRequest);
|
46456
|
+
if (addedSignatures) {
|
46457
|
+
Array.from({ length: addedSignatures }).forEach(
|
46458
|
+
() => requestToBeReEstimate.addEmptyWitness()
|
46459
|
+
);
|
45991
46460
|
}
|
46461
|
+
const { maxFee } = await this.provider.estimateTxGasAndFee({
|
46462
|
+
transactionRequest: requestToBeReEstimate
|
46463
|
+
});
|
46464
|
+
txRequest.maxFee = maxFee;
|
46465
|
+
return txRequest;
|
45992
46466
|
}
|
45993
46467
|
/**
|
45994
46468
|
* A helper that creates a transfer transaction request and returns it.
|
@@ -45996,30 +46470,25 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
45996
46470
|
* @param destination - The address of the destination.
|
45997
46471
|
* @param amount - The amount of coins to transfer.
|
45998
46472
|
* @param assetId - The asset ID of the coins to transfer.
|
45999
|
-
* @param txParams - The transaction parameters (gasLimit,
|
46473
|
+
* @param txParams - The transaction parameters (gasLimit, tip, maturity, maxFee, witnessLimit).
|
46000
46474
|
* @returns A promise that resolves to the prepared transaction request.
|
46001
46475
|
*/
|
46002
|
-
async createTransfer(destination, amount, assetId, txParams = {}) {
|
46003
|
-
const
|
46004
|
-
|
46005
|
-
const
|
46006
|
-
const params = { gasPrice: minGasPrice, baseAssetId, ...txParams };
|
46007
|
-
const request = new ScriptTransactionRequest(params);
|
46008
|
-
request.addCoinOutput(Address.fromAddressOrString(destination), amount, assetIdToTransfer);
|
46009
|
-
const { maxFee, requiredQuantities, gasUsed, estimatedInputs } = await this.provider.getTransactionCost(request, [], {
|
46476
|
+
async createTransfer(destination, amount, assetId = BaseAssetId, txParams = {}) {
|
46477
|
+
const request = new ScriptTransactionRequest(txParams);
|
46478
|
+
request.addCoinOutput(Address.fromAddressOrString(destination), amount, assetId);
|
46479
|
+
const txCost = await this.provider.getTransactionCost(request, {
|
46010
46480
|
estimateTxDependencies: true,
|
46011
46481
|
resourcesOwner: this
|
46012
46482
|
});
|
46013
|
-
|
46014
|
-
|
46015
|
-
|
46016
|
-
|
46017
|
-
|
46018
|
-
|
46019
|
-
|
46020
|
-
|
46021
|
-
await this.fund(request,
|
46022
|
-
request.updatePredicateInputs(estimatedInputs);
|
46483
|
+
if ("gasLimit" in txParams) {
|
46484
|
+
this.validateGas({
|
46485
|
+
gasUsed: txCost.gasUsed,
|
46486
|
+
gasLimit: request.gasLimit
|
46487
|
+
});
|
46488
|
+
}
|
46489
|
+
request.gasLimit = txCost.gasUsed;
|
46490
|
+
request.maxFee = txCost.maxFee;
|
46491
|
+
await this.fund(request, txCost);
|
46023
46492
|
return request;
|
46024
46493
|
}
|
46025
46494
|
/**
|
@@ -46031,15 +46500,14 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
46031
46500
|
* @param txParams - The transaction parameters (gasLimit, gasPrice, maturity).
|
46032
46501
|
* @returns A promise that resolves to the transaction response.
|
46033
46502
|
*/
|
46034
|
-
async transfer(destination, amount, assetId, txParams = {}) {
|
46503
|
+
async transfer(destination, amount, assetId = BaseAssetId, txParams = {}) {
|
46035
46504
|
if (bn(amount).lte(0)) {
|
46036
46505
|
throw new FuelError(
|
46037
46506
|
ErrorCode.INVALID_TRANSFER_AMOUNT,
|
46038
46507
|
"Transfer amount must be a positive number."
|
46039
46508
|
);
|
46040
46509
|
}
|
46041
|
-
const
|
46042
|
-
const request = await this.createTransfer(destination, amount, assetIdToTransfer, txParams);
|
46510
|
+
const request = await this.createTransfer(destination, amount, assetId, txParams);
|
46043
46511
|
return this.sendTransaction(request, { estimateTxDependencies: false });
|
46044
46512
|
}
|
46045
46513
|
/**
|
@@ -46051,7 +46519,7 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
46051
46519
|
* @param txParams - The optional transaction parameters.
|
46052
46520
|
* @returns A promise that resolves to the transaction response.
|
46053
46521
|
*/
|
46054
|
-
async transferToContract(contractId, amount, assetId, txParams = {}) {
|
46522
|
+
async transferToContract(contractId, amount, assetId = BaseAssetId, txParams = {}) {
|
46055
46523
|
if (bn(amount).lte(0)) {
|
46056
46524
|
throw new FuelError(
|
46057
46525
|
ErrorCode.INVALID_TRANSFER_AMOUNT,
|
@@ -46059,33 +46527,30 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
46059
46527
|
);
|
46060
46528
|
}
|
46061
46529
|
const contractAddress = Address.fromAddressOrString(contractId);
|
46062
|
-
const { minGasPrice } = this.provider.getGasConfig();
|
46063
|
-
const baseAssetId = this.provider.getBaseAssetId();
|
46064
|
-
const assetIdToTransfer = assetId ?? this.provider.getBaseAssetId();
|
46065
|
-
const params = { gasPrice: minGasPrice, baseAssetId, ...txParams };
|
46066
46530
|
const { script, scriptData } = await assembleTransferToContractScript({
|
46067
46531
|
hexlifiedContractId: contractAddress.toB256(),
|
46068
46532
|
amountToTransfer: bn(amount),
|
46069
|
-
assetId
|
46533
|
+
assetId
|
46070
46534
|
});
|
46071
46535
|
const request = new ScriptTransactionRequest({
|
46072
|
-
...
|
46536
|
+
...txParams,
|
46073
46537
|
script,
|
46074
46538
|
scriptData
|
46075
46539
|
});
|
46076
46540
|
request.addContractInputAndOutput(contractAddress);
|
46077
|
-
const
|
46078
|
-
|
46079
|
-
[{ amount: bn(amount), assetId: String(
|
46080
|
-
);
|
46081
|
-
request.gasLimit = bn(params.gasLimit ?? gasUsed);
|
46082
|
-
this.validateGas({
|
46083
|
-
gasUsed,
|
46084
|
-
gasPrice: request.gasPrice,
|
46085
|
-
gasLimit: request.gasLimit,
|
46086
|
-
minGasPrice
|
46541
|
+
const txCost = await this.provider.getTransactionCost(request, {
|
46542
|
+
resourcesOwner: this,
|
46543
|
+
quantitiesToContract: [{ amount: bn(amount), assetId: String(assetId) }]
|
46087
46544
|
});
|
46088
|
-
|
46545
|
+
if (txParams.gasLimit) {
|
46546
|
+
this.validateGas({
|
46547
|
+
gasUsed: txCost.gasUsed,
|
46548
|
+
gasLimit: request.gasLimit
|
46549
|
+
});
|
46550
|
+
}
|
46551
|
+
request.gasLimit = txCost.gasUsed;
|
46552
|
+
request.maxFee = txCost.maxFee;
|
46553
|
+
await this.fund(request, txCost);
|
46089
46554
|
return this.sendTransaction(request);
|
46090
46555
|
}
|
46091
46556
|
/**
|
@@ -46097,8 +46562,6 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
46097
46562
|
* @returns A promise that resolves to the transaction response.
|
46098
46563
|
*/
|
46099
46564
|
async withdrawToBaseLayer(recipient, amount, txParams = {}) {
|
46100
|
-
const { minGasPrice } = this.provider.getGasConfig();
|
46101
|
-
const baseAssetId = this.provider.getBaseAssetId();
|
46102
46565
|
const recipientAddress = Address.fromAddressOrString(recipient);
|
46103
46566
|
const recipientDataArray = arrayify(
|
46104
46567
|
"0x".concat(recipientAddress.toHexString().substring(2).padStart(64, "0"))
|
@@ -46111,26 +46574,19 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
46111
46574
|
...recipientDataArray,
|
46112
46575
|
...amountDataArray
|
46113
46576
|
]);
|
46114
|
-
const params = {
|
46115
|
-
script,
|
46116
|
-
gasPrice: minGasPrice,
|
46117
|
-
baseAssetId,
|
46118
|
-
...txParams
|
46119
|
-
};
|
46577
|
+
const params = { script, ...txParams };
|
46120
46578
|
const request = new ScriptTransactionRequest(params);
|
46121
|
-
const
|
46122
|
-
const
|
46123
|
-
|
46124
|
-
|
46125
|
-
|
46126
|
-
|
46127
|
-
|
46128
|
-
|
46129
|
-
|
46130
|
-
|
46131
|
-
|
46132
|
-
});
|
46133
|
-
await this.fund(request, requiredQuantities, maxFee);
|
46579
|
+
const quantitiesToContract = [{ amount: bn(amount), assetId: BaseAssetId }];
|
46580
|
+
const txCost = await this.provider.getTransactionCost(request, { quantitiesToContract });
|
46581
|
+
if (txParams.gasLimit) {
|
46582
|
+
this.validateGas({
|
46583
|
+
gasUsed: txCost.gasUsed,
|
46584
|
+
gasLimit: request.gasLimit
|
46585
|
+
});
|
46586
|
+
}
|
46587
|
+
request.maxFee = txCost.maxFee;
|
46588
|
+
request.gasLimit = txCost.gasUsed;
|
46589
|
+
await this.fund(request, txCost);
|
46134
46590
|
return this.sendTransaction(request);
|
46135
46591
|
}
|
46136
46592
|
async signMessage(message) {
|
@@ -46188,18 +46644,7 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
46188
46644
|
}
|
46189
46645
|
return this.provider.simulate(transactionRequest, { estimateTxDependencies: false });
|
46190
46646
|
}
|
46191
|
-
validateGas({
|
46192
|
-
gasUsed,
|
46193
|
-
gasPrice,
|
46194
|
-
gasLimit,
|
46195
|
-
minGasPrice
|
46196
|
-
}) {
|
46197
|
-
if (minGasPrice.gt(gasPrice)) {
|
46198
|
-
throw new FuelError(
|
46199
|
-
ErrorCode.GAS_PRICE_TOO_LOW,
|
46200
|
-
`Gas price '${gasPrice}' is lower than the required: '${minGasPrice}'.`
|
46201
|
-
);
|
46202
|
-
}
|
46647
|
+
validateGas({ gasUsed, gasLimit }) {
|
46203
46648
|
if (gasUsed.gt(gasLimit)) {
|
46204
46649
|
throw new FuelError(
|
46205
46650
|
ErrorCode.GAS_LIMIT_TOO_LOW,
|
@@ -47582,12 +48027,12 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
47582
48027
|
};
|
47583
48028
|
|
47584
48029
|
// ../../node_modules/.pnpm/uuid@9.0.0/node_modules/uuid/dist/esm-node/rng.js
|
47585
|
-
var
|
48030
|
+
var import_crypto17 = __toESM(__require("crypto"));
|
47586
48031
|
var rnds8Pool = new Uint8Array(256);
|
47587
48032
|
var poolPtr = rnds8Pool.length;
|
47588
48033
|
function rng() {
|
47589
48034
|
if (poolPtr > rnds8Pool.length - 16) {
|
47590
|
-
|
48035
|
+
import_crypto17.default.randomFillSync(rnds8Pool);
|
47591
48036
|
poolPtr = 0;
|
47592
48037
|
}
|
47593
48038
|
return rnds8Pool.slice(poolPtr, poolPtr += 16);
|
@@ -47603,9 +48048,9 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
47603
48048
|
}
|
47604
48049
|
|
47605
48050
|
// ../../node_modules/.pnpm/uuid@9.0.0/node_modules/uuid/dist/esm-node/native.js
|
47606
|
-
var
|
48051
|
+
var import_crypto18 = __toESM(__require("crypto"));
|
47607
48052
|
var native_default = {
|
47608
|
-
randomUUID:
|
48053
|
+
randomUUID: import_crypto18.default.randomUUID
|
47609
48054
|
};
|
47610
48055
|
|
47611
48056
|
// ../../node_modules/.pnpm/uuid@9.0.0/node_modules/uuid/dist/esm-node/v4.js
|
@@ -47788,7 +48233,7 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
47788
48233
|
* @param transactionRequestLike - The transaction request to send.
|
47789
48234
|
* @returns A promise that resolves to the TransactionResponse object.
|
47790
48235
|
*/
|
47791
|
-
async sendTransaction(transactionRequestLike, { estimateTxDependencies =
|
48236
|
+
async sendTransaction(transactionRequestLike, { estimateTxDependencies = false, awaitExecution } = {}) {
|
47792
48237
|
const transactionRequest = transactionRequestify(transactionRequestLike);
|
47793
48238
|
if (estimateTxDependencies) {
|
47794
48239
|
await this.provider.estimateTxDependencies(transactionRequest);
|
@@ -50548,16 +50993,15 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
50548
50993
|
process.env.GENESIS_SECRET || randomBytes22(32),
|
50549
50994
|
wallet.provider
|
50550
50995
|
);
|
50551
|
-
const
|
50552
|
-
|
50553
|
-
|
50554
|
-
|
50555
|
-
baseAssetId,
|
50556
|
-
gasLimit: 1e4,
|
50557
|
-
gasPrice: minGasPrice
|
50996
|
+
const request = new ScriptTransactionRequest();
|
50997
|
+
quantities.forEach((quantity) => {
|
50998
|
+
const { amount, assetId } = coinQuantityfy(quantity);
|
50999
|
+
request.addCoinOutput(wallet.address, amount, assetId);
|
50558
51000
|
});
|
50559
|
-
|
50560
|
-
|
51001
|
+
const txCost = await genesisWallet.provider.getTransactionCost(request);
|
51002
|
+
request.gasLimit = txCost.gasUsed;
|
51003
|
+
request.maxFee = txCost.maxFee;
|
51004
|
+
await genesisWallet.fund(request, txCost);
|
50561
51005
|
await genesisWallet.sendTransaction(request, { awaitExecution: true });
|
50562
51006
|
};
|
50563
51007
|
|
@@ -50587,7 +51031,7 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
50587
51031
|
|
50588
51032
|
// src/test-utils/launchNode.ts
|
50589
51033
|
var import_child_process = __require("child_process");
|
50590
|
-
var
|
51034
|
+
var import_crypto22 = __require("crypto");
|
50591
51035
|
var import_fs2 = __require("fs");
|
50592
51036
|
var import_os = __toESM(__require("os"));
|
50593
51037
|
var import_path8 = __toESM(__require("path"));
|
@@ -50636,12 +51080,12 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
50636
51080
|
// eslint-disable-next-line no-async-promise-executor
|
50637
51081
|
new Promise(async (resolve, reject) => {
|
50638
51082
|
const remainingArgs = extractRemainingArgs(args, [
|
50639
|
-
"--
|
51083
|
+
"--snapshot",
|
50640
51084
|
"--consensus-key",
|
50641
51085
|
"--db-type",
|
50642
51086
|
"--poa-instant"
|
50643
51087
|
]);
|
50644
|
-
const chainConfigPath = getFlagValueFromArgs(args, "--
|
51088
|
+
const chainConfigPath = getFlagValueFromArgs(args, "--snapshot");
|
50645
51089
|
const consensusKey = getFlagValueFromArgs(args, "--consensus-key") || defaultConsensusKey;
|
50646
51090
|
const dbTypeFlagValue = getFlagValueFromArgs(args, "--db-type");
|
50647
51091
|
const useInMemoryDb = dbTypeFlagValue === "in-memory" || dbTypeFlagValue === void 0;
|
@@ -50659,37 +51103,55 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
50659
51103
|
})).toString();
|
50660
51104
|
let chainConfigPathToUse;
|
50661
51105
|
const prefix = basePath || import_os.default.tmpdir();
|
50662
|
-
const suffix = basePath ? "" : (0,
|
50663
|
-
const tempDirPath = import_path8.default.join(prefix, ".fuels", suffix);
|
51106
|
+
const suffix = basePath ? "" : (0, import_crypto22.randomUUID)();
|
51107
|
+
const tempDirPath = import_path8.default.join(prefix, ".fuels", suffix, "chainConfigs");
|
50664
51108
|
if (chainConfigPath) {
|
50665
51109
|
chainConfigPathToUse = chainConfigPath;
|
50666
51110
|
} else {
|
50667
51111
|
if (!(0, import_fs2.existsSync)(tempDirPath)) {
|
50668
51112
|
(0, import_fs2.mkdirSync)(tempDirPath, { recursive: true });
|
50669
51113
|
}
|
50670
|
-
|
50671
|
-
|
51114
|
+
let { stateConfigJson } = defaultChainConfigs;
|
51115
|
+
const { chainConfigJson, metadataJson } = defaultChainConfigs;
|
51116
|
+
stateConfigJson = {
|
51117
|
+
...stateConfigJson,
|
51118
|
+
coins: [
|
51119
|
+
...stateConfigJson.coins.map((coin) => ({
|
51120
|
+
...coin,
|
51121
|
+
amount: "18446744073709551615"
|
51122
|
+
}))
|
51123
|
+
],
|
51124
|
+
messages: stateConfigJson.messages.map((message) => ({
|
51125
|
+
...message,
|
51126
|
+
amount: "18446744073709551615"
|
51127
|
+
}))
|
51128
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
51129
|
+
};
|
50672
51130
|
if (!process.env.GENESIS_SECRET) {
|
50673
51131
|
const pk = Signer.generatePrivateKey();
|
50674
51132
|
const signer = new Signer(pk);
|
50675
51133
|
process.env.GENESIS_SECRET = hexlify(pk);
|
50676
|
-
|
50677
|
-
|
50678
|
-
|
50679
|
-
|
50680
|
-
|
50681
|
-
|
50682
|
-
|
50683
|
-
|
50684
|
-
|
50685
|
-
|
50686
|
-
}
|
50687
|
-
]
|
50688
|
-
}
|
50689
|
-
};
|
51134
|
+
stateConfigJson.coins.push({
|
51135
|
+
tx_id: hexlify(randomBytes3(34)),
|
51136
|
+
owner: signer.address.toHexString(),
|
51137
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
51138
|
+
amount: "18446744073709551615",
|
51139
|
+
asset_id: BaseAssetId,
|
51140
|
+
output_index: 0,
|
51141
|
+
tx_pointer_block_height: 0,
|
51142
|
+
tx_pointer_tx_idx: 0
|
51143
|
+
});
|
50690
51144
|
}
|
50691
|
-
|
50692
|
-
|
51145
|
+
let fixedStateConfigJSON = JSON.stringify(stateConfigJson);
|
51146
|
+
const regexMakeNumber = /("amount":)"(\d+)"/gm;
|
51147
|
+
fixedStateConfigJSON = fixedStateConfigJSON.replace(regexMakeNumber, "$1$2");
|
51148
|
+
const chainConfigWritePath = import_path8.default.join(tempDirPath, "chainConfig.json");
|
51149
|
+
const stateConfigWritePath = import_path8.default.join(tempDirPath, "stateConfig.json");
|
51150
|
+
const metadataWritePath = import_path8.default.join(tempDirPath, "metadata.json");
|
51151
|
+
(0, import_fs2.writeFileSync)(chainConfigWritePath, JSON.stringify(chainConfigJson), "utf8");
|
51152
|
+
(0, import_fs2.writeFileSync)(stateConfigWritePath, fixedStateConfigJSON, "utf8");
|
51153
|
+
(0, import_fs2.writeFileSync)(metadataWritePath, JSON.stringify(metadataJson), "utf8");
|
51154
|
+
chainConfigPathToUse = tempDirPath;
|
50693
51155
|
}
|
50694
51156
|
const child = (0, import_child_process.spawn)(
|
50695
51157
|
command,
|
@@ -50698,10 +51160,10 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
50698
51160
|
["--ip", ipToUse],
|
50699
51161
|
["--port", portToUse],
|
50700
51162
|
useInMemoryDb ? ["--db-type", "in-memory"] : ["--db-path", tempDirPath],
|
50701
|
-
["--min-gas-price", "
|
51163
|
+
["--min-gas-price", "1"],
|
50702
51164
|
poaInstant ? ["--poa-instant", "true"] : [],
|
50703
51165
|
["--consensus-key", consensusKey],
|
50704
|
-
["--
|
51166
|
+
["--snapshot", chainConfigPathToUse],
|
50705
51167
|
"--vm-backtrace",
|
50706
51168
|
"--utxo-validation",
|
50707
51169
|
"--debug",
|
@@ -50748,10 +51210,9 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
50748
51210
|
})
|
50749
51211
|
);
|
50750
51212
|
var generateWallets = async (count, provider) => {
|
50751
|
-
const baseAssetId = provider.getBaseAssetId();
|
50752
51213
|
const wallets = [];
|
50753
51214
|
for (let i = 0; i < count; i += 1) {
|
50754
|
-
const wallet = await generateTestWallet(provider, [[1e3,
|
51215
|
+
const wallet = await generateTestWallet(provider, [[1e3, BaseAssetId]]);
|
50755
51216
|
wallets.push(wallet);
|
50756
51217
|
}
|
50757
51218
|
return wallets;
|
@@ -50761,7 +51222,7 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
50761
51222
|
walletCount = 10
|
50762
51223
|
} = {}) => {
|
50763
51224
|
const { cleanup: closeNode, ip, port } = await launchNode(launchNodeOptions || {});
|
50764
|
-
const provider = await Provider.create(`http://${ip}:${port}/graphql`);
|
51225
|
+
const provider = await Provider.create(`http://${ip}:${port}/v1/graphql`);
|
50765
51226
|
const wallets = await generateWallets(walletCount, provider);
|
50766
51227
|
const cleanup = () => {
|
50767
51228
|
closeNode();
|