@fuel-ts/account 0.0.0-rc-2037-20240423134048 → 0.0.0-rc-2021-20240423134551
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 +829 -600
- package/dist/index.global.js.map +1 -1
- package/dist/index.js +857 -637
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +680 -455
- package/dist/index.mjs.map +1 -1
- package/dist/predicate/predicate.d.ts +11 -18
- package/dist/predicate/predicate.d.ts.map +1 -1
- package/dist/providers/__generated__/operations.d.ts +822 -328
- package/dist/providers/__generated__/operations.d.ts.map +1 -1
- package/dist/providers/coin-quantity.d.ts +1 -1
- package/dist/providers/coin-quantity.d.ts.map +1 -1
- package/dist/providers/coin.d.ts +2 -1
- package/dist/providers/coin.d.ts.map +1 -1
- package/dist/providers/message.d.ts +6 -1
- package/dist/providers/message.d.ts.map +1 -1
- package/dist/providers/provider.d.ts +37 -27
- package/dist/providers/provider.d.ts.map +1 -1
- package/dist/providers/transaction-request/create-transaction-request.d.ts.map +1 -1
- package/dist/providers/transaction-request/index.d.ts +0 -1
- package/dist/providers/transaction-request/index.d.ts.map +1 -1
- package/dist/providers/transaction-request/input.d.ts +2 -2
- package/dist/providers/transaction-request/input.d.ts.map +1 -1
- package/dist/providers/transaction-request/script-transaction-request.d.ts.map +1 -1
- package/dist/providers/transaction-request/transaction-request.d.ts +6 -7
- 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/index.d.ts +0 -1
- package/dist/test-utils/index.d.ts.map +1 -1
- package/dist/test-utils/launchNode.d.ts.map +1 -1
- package/dist/test-utils/seedTestWallet.d.ts +1 -1
- package/dist/test-utils/seedTestWallet.d.ts.map +1 -1
- package/dist/test-utils.global.js +1545 -1076
- package/dist/test-utils.global.js.map +1 -1
- package/dist/test-utils.js +837 -612
- package/dist/test-utils.js.map +1 -1
- package/dist/test-utils.mjs +674 -446
- package/dist/test-utils.mjs.map +1 -1
- package/dist/wallet/base-wallet-unlocked.d.ts +2 -2
- package/dist/wallet/base-wallet-unlocked.d.ts.map +1 -1
- package/package.json +16 -16
- package/dist/providers/transaction-request/helpers.d.ts +0 -10
- package/dist/providers/transaction-request/helpers.d.ts.map +0 -1
- package/dist/test-utils/resources.d.ts +0 -4
- package/dist/test-utils/resources.d.ts.map +0 -1
- package/dist/test-utils/transactionRequest.d.ts +0 -5
- package/dist/test-utils/transactionRequest.d.ts.map +0 -1
@@ -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,520 +32193,753 @@ 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
|
-
|
32489
|
-
|
32490
|
-
|
32491
|
-
|
32492
|
-
|
32493
|
-
|
32494
|
-
aloc: 1,
|
32495
|
-
and: 1,
|
32496
|
-
andi: 1,
|
32497
|
-
bal: 13,
|
32498
|
-
bhei: 1,
|
32499
|
-
bhsh: 1,
|
32500
|
-
burn: 132,
|
32501
|
-
cb: 1,
|
32502
|
-
cfei: 1,
|
32503
|
-
cfsi: 1,
|
32504
|
-
croo: 16,
|
32505
|
-
div: 1,
|
32506
|
-
divi: 1,
|
32507
|
-
ecr1: 3e3,
|
32508
|
-
eck1: 951,
|
32509
|
-
ed19: 3e3,
|
32510
|
-
eq: 1,
|
32511
|
-
exp: 1,
|
32512
|
-
expi: 1,
|
32513
|
-
flag: 1,
|
32514
|
-
gm: 1,
|
32515
|
-
gt: 1,
|
32516
|
-
gtf: 1,
|
32517
|
-
ji: 1,
|
32518
|
-
jmp: 1,
|
32519
|
-
jne: 1,
|
32520
|
-
jnei: 1,
|
32521
|
-
jnzi: 1,
|
32522
|
-
jmpf: 1,
|
32523
|
-
jmpb: 1,
|
32524
|
-
jnzf: 1,
|
32525
|
-
jnzb: 1,
|
32526
|
-
jnef: 1,
|
32527
|
-
jneb: 1,
|
32528
|
-
lb: 1,
|
32529
|
-
log: 9,
|
32530
|
-
lt: 1,
|
32531
|
-
lw: 1,
|
32532
|
-
mint: 135,
|
32533
|
-
mlog: 1,
|
32534
|
-
modOp: 1,
|
32535
|
-
modi: 1,
|
32536
|
-
moveOp: 1,
|
32537
|
-
movi: 1,
|
32538
|
-
mroo: 2,
|
32539
|
-
mul: 1,
|
32540
|
-
muli: 1,
|
32541
|
-
mldv: 1,
|
32542
|
-
noop: 1,
|
32543
|
-
not: 1,
|
32544
|
-
or: 1,
|
32545
|
-
ori: 1,
|
32546
|
-
poph: 2,
|
32547
|
-
popl: 2,
|
32548
|
-
pshh: 2,
|
32549
|
-
pshl: 2,
|
32550
|
-
ret: 13,
|
32551
|
-
rvrt: 13,
|
32552
|
-
sb: 1,
|
32553
|
-
sll: 1,
|
32554
|
-
slli: 1,
|
32555
|
-
srl: 1,
|
32556
|
-
srli: 1,
|
32557
|
-
srw: 12,
|
32558
|
-
sub: 1,
|
32559
|
-
subi: 1,
|
32560
|
-
sw: 1,
|
32561
|
-
sww: 67,
|
32562
|
-
time: 1,
|
32563
|
-
tr: 105,
|
32564
|
-
tro: 60,
|
32565
|
-
wdcm: 1,
|
32566
|
-
wqcm: 1,
|
32567
|
-
wdop: 1,
|
32568
|
-
wqop: 1,
|
32569
|
-
wdml: 1,
|
32570
|
-
wqml: 1,
|
32571
|
-
wddv: 1,
|
32572
|
-
wqdv: 2,
|
32573
|
-
wdmd: 3,
|
32574
|
-
wqmd: 4,
|
32575
|
-
wdam: 2,
|
32576
|
-
wqam: 3,
|
32577
|
-
wdmm: 3,
|
32578
|
-
wqmm: 3,
|
32579
|
-
xor: 1,
|
32580
|
-
xori: 1,
|
32581
|
-
call: {
|
32582
|
-
LightOperation: {
|
32583
|
-
base: 144,
|
32584
|
-
units_per_gas: 214
|
32585
|
-
}
|
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"
|
32586
32518
|
},
|
32587
|
-
|
32588
|
-
|
32589
|
-
|
32590
|
-
|
32591
|
-
|
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"
|
32592
32527
|
},
|
32593
|
-
|
32594
|
-
|
32595
|
-
|
32596
|
-
|
32597
|
-
|
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"
|
32598
32536
|
},
|
32599
|
-
|
32600
|
-
|
32601
|
-
|
32602
|
-
|
32603
|
-
|
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"
|
32604
32545
|
},
|
32605
|
-
|
32606
|
-
|
32607
|
-
|
32608
|
-
|
32609
|
-
|
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"
|
32610
32554
|
},
|
32611
|
-
|
32612
|
-
|
32613
|
-
|
32614
|
-
|
32615
|
-
|
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"
|
32616
32563
|
},
|
32617
|
-
|
32618
|
-
|
32619
|
-
|
32620
|
-
|
32621
|
-
|
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"
|
32622
32572
|
},
|
32623
|
-
|
32624
|
-
|
32625
|
-
|
32626
|
-
|
32627
|
-
|
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"
|
32628
32581
|
},
|
32629
|
-
|
32630
|
-
|
32631
|
-
|
32632
|
-
|
32633
|
-
|
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"
|
32634
32590
|
},
|
32635
|
-
|
32636
|
-
|
32637
|
-
|
32638
|
-
|
32639
|
-
|
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"
|
32640
32599
|
},
|
32641
|
-
|
32642
|
-
|
32643
|
-
|
32644
|
-
|
32645
|
-
|
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"
|
32646
32608
|
},
|
32647
|
-
|
32648
|
-
|
32649
|
-
|
32650
|
-
|
32651
|
-
|
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"
|
32652
32617
|
},
|
32653
|
-
|
32654
|
-
|
32655
|
-
|
32656
|
-
|
32657
|
-
|
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"
|
32658
32626
|
},
|
32659
|
-
|
32660
|
-
|
32661
|
-
|
32662
|
-
|
32663
|
-
|
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"
|
32664
32635
|
},
|
32665
|
-
|
32666
|
-
|
32667
|
-
|
32668
|
-
|
32669
|
-
|
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"
|
32670
32644
|
},
|
32671
|
-
|
32672
|
-
|
32673
|
-
|
32674
|
-
|
32675
|
-
|
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"
|
32676
32653
|
},
|
32677
|
-
|
32678
|
-
|
32679
|
-
|
32680
|
-
|
32681
|
-
|
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"
|
32682
32662
|
},
|
32683
|
-
|
32684
|
-
|
32685
|
-
|
32686
|
-
|
32687
|
-
|
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"
|
32688
32671
|
},
|
32689
|
-
|
32690
|
-
|
32691
|
-
|
32692
|
-
|
32693
|
-
|
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"
|
32694
32680
|
},
|
32695
|
-
|
32696
|
-
|
32697
|
-
|
32698
|
-
|
32699
|
-
|
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"
|
32700
32689
|
},
|
32701
|
-
|
32702
|
-
|
32703
|
-
|
32704
|
-
|
32705
|
-
|
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"
|
32698
|
+
},
|
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"
|
32706
32914
|
}
|
32707
|
-
|
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
|
32708
32942
|
};
|
32709
|
-
var defaultChainConfig = chainConfig_default;
|
32710
32943
|
var defaultConsensusKey = "0xa449b1ffee0e2205fa924c6740cc48b3b473aa28587df6dab12abc245d1f5298";
|
32711
32944
|
|
32712
32945
|
// ../crypto/dist/index.mjs
|
@@ -34978,32 +35211,182 @@ This unreleased fuel-core build may include features and updates not yet support
|
|
34978
35211
|
function toBytes3(value, bytesPadding) {
|
34979
35212
|
return bn(value).toBytes(bytesPadding);
|
34980
35213
|
}
|
34981
|
-
|
34982
|
-
|
35214
|
+
|
35215
|
+
// ../../node_modules/.pnpm/ramda@0.29.0/node_modules/ramda/es/internal/_isPlaceholder.js
|
35216
|
+
function _isPlaceholder(a) {
|
35217
|
+
return a != null && typeof a === "object" && a["@@functional/placeholder"] === true;
|
35218
|
+
}
|
35219
|
+
|
35220
|
+
// ../../node_modules/.pnpm/ramda@0.29.0/node_modules/ramda/es/internal/_curry1.js
|
35221
|
+
function _curry1(fn) {
|
35222
|
+
return function f1(a) {
|
35223
|
+
if (arguments.length === 0 || _isPlaceholder(a)) {
|
35224
|
+
return f1;
|
35225
|
+
} else {
|
35226
|
+
return fn.apply(this, arguments);
|
35227
|
+
}
|
35228
|
+
};
|
34983
35229
|
}
|
34984
35230
|
|
35231
|
+
// ../../node_modules/.pnpm/ramda@0.29.0/node_modules/ramda/es/internal/_isArray.js
|
35232
|
+
var isArray_default = Array.isArray || function _isArray(val) {
|
35233
|
+
return val != null && val.length >= 0 && Object.prototype.toString.call(val) === "[object Array]";
|
35234
|
+
};
|
35235
|
+
|
35236
|
+
// ../../node_modules/.pnpm/ramda@0.29.0/node_modules/ramda/es/type.js
|
35237
|
+
var type = /* @__PURE__ */ _curry1(function type2(val) {
|
35238
|
+
return val === null ? "Null" : val === void 0 ? "Undefined" : Object.prototype.toString.call(val).slice(8, -1);
|
35239
|
+
});
|
35240
|
+
var type_default = type;
|
35241
|
+
|
35242
|
+
// ../../node_modules/.pnpm/ramda@0.29.0/node_modules/ramda/es/internal/_toISOString.js
|
35243
|
+
var pad = function pad2(n) {
|
35244
|
+
return (n < 10 ? "0" : "") + n;
|
35245
|
+
};
|
35246
|
+
var _toISOString = typeof Date.prototype.toISOString === "function" ? function _toISOString2(d) {
|
35247
|
+
return d.toISOString();
|
35248
|
+
} : function _toISOString3(d) {
|
35249
|
+
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";
|
35250
|
+
};
|
35251
|
+
|
35252
|
+
// ../../node_modules/.pnpm/ramda@0.29.0/node_modules/ramda/es/internal/_isInteger.js
|
35253
|
+
var isInteger_default = Number.isInteger || function _isInteger(n) {
|
35254
|
+
return n << 0 === n;
|
35255
|
+
};
|
35256
|
+
|
35257
|
+
// ../../node_modules/.pnpm/ramda@0.29.0/node_modules/ramda/es/internal/_cloneRegExp.js
|
35258
|
+
function _cloneRegExp(pattern) {
|
35259
|
+
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" : ""));
|
35260
|
+
}
|
35261
|
+
|
35262
|
+
// ../../node_modules/.pnpm/ramda@0.29.0/node_modules/ramda/es/internal/_clone.js
|
35263
|
+
function _clone(value, deep, map) {
|
35264
|
+
map || (map = new _ObjectMap());
|
35265
|
+
if (_isPrimitive(value)) {
|
35266
|
+
return value;
|
35267
|
+
}
|
35268
|
+
var copy = function copy2(copiedValue) {
|
35269
|
+
var cachedCopy = map.get(value);
|
35270
|
+
if (cachedCopy) {
|
35271
|
+
return cachedCopy;
|
35272
|
+
}
|
35273
|
+
map.set(value, copiedValue);
|
35274
|
+
for (var key in value) {
|
35275
|
+
if (Object.prototype.hasOwnProperty.call(value, key)) {
|
35276
|
+
copiedValue[key] = deep ? _clone(value[key], true, map) : value[key];
|
35277
|
+
}
|
35278
|
+
}
|
35279
|
+
return copiedValue;
|
35280
|
+
};
|
35281
|
+
switch (type_default(value)) {
|
35282
|
+
case "Object":
|
35283
|
+
return copy(Object.create(Object.getPrototypeOf(value)));
|
35284
|
+
case "Array":
|
35285
|
+
return copy([]);
|
35286
|
+
case "Date":
|
35287
|
+
return new Date(value.valueOf());
|
35288
|
+
case "RegExp":
|
35289
|
+
return _cloneRegExp(value);
|
35290
|
+
case "Int8Array":
|
35291
|
+
case "Uint8Array":
|
35292
|
+
case "Uint8ClampedArray":
|
35293
|
+
case "Int16Array":
|
35294
|
+
case "Uint16Array":
|
35295
|
+
case "Int32Array":
|
35296
|
+
case "Uint32Array":
|
35297
|
+
case "Float32Array":
|
35298
|
+
case "Float64Array":
|
35299
|
+
case "BigInt64Array":
|
35300
|
+
case "BigUint64Array":
|
35301
|
+
return value.slice();
|
35302
|
+
default:
|
35303
|
+
return value;
|
35304
|
+
}
|
35305
|
+
}
|
35306
|
+
function _isPrimitive(param) {
|
35307
|
+
var type3 = typeof param;
|
35308
|
+
return param == null || type3 != "object" && type3 != "function";
|
35309
|
+
}
|
35310
|
+
var _ObjectMap = /* @__PURE__ */ function() {
|
35311
|
+
function _ObjectMap2() {
|
35312
|
+
this.map = {};
|
35313
|
+
this.length = 0;
|
35314
|
+
}
|
35315
|
+
_ObjectMap2.prototype.set = function(key, value) {
|
35316
|
+
const hashedKey = this.hash(key);
|
35317
|
+
let bucket = this.map[hashedKey];
|
35318
|
+
if (!bucket) {
|
35319
|
+
this.map[hashedKey] = bucket = [];
|
35320
|
+
}
|
35321
|
+
bucket.push([key, value]);
|
35322
|
+
this.length += 1;
|
35323
|
+
};
|
35324
|
+
_ObjectMap2.prototype.hash = function(key) {
|
35325
|
+
let hashedKey = [];
|
35326
|
+
for (var value in key) {
|
35327
|
+
hashedKey.push(Object.prototype.toString.call(key[value]));
|
35328
|
+
}
|
35329
|
+
return hashedKey.join();
|
35330
|
+
};
|
35331
|
+
_ObjectMap2.prototype.get = function(key) {
|
35332
|
+
if (this.length <= 180) {
|
35333
|
+
for (const p in this.map) {
|
35334
|
+
const bucket2 = this.map[p];
|
35335
|
+
for (let i = 0; i < bucket2.length; i += 1) {
|
35336
|
+
const element = bucket2[i];
|
35337
|
+
if (element[0] === key) {
|
35338
|
+
return element[1];
|
35339
|
+
}
|
35340
|
+
}
|
35341
|
+
}
|
35342
|
+
return;
|
35343
|
+
}
|
35344
|
+
const hashedKey = this.hash(key);
|
35345
|
+
const bucket = this.map[hashedKey];
|
35346
|
+
if (!bucket) {
|
35347
|
+
return;
|
35348
|
+
}
|
35349
|
+
for (let i = 0; i < bucket.length; i += 1) {
|
35350
|
+
const element = bucket[i];
|
35351
|
+
if (element[0] === key) {
|
35352
|
+
return element[1];
|
35353
|
+
}
|
35354
|
+
}
|
35355
|
+
};
|
35356
|
+
return _ObjectMap2;
|
35357
|
+
}();
|
35358
|
+
|
35359
|
+
// ../../node_modules/.pnpm/ramda@0.29.0/node_modules/ramda/es/clone.js
|
35360
|
+
var clone = /* @__PURE__ */ _curry1(function clone2(value) {
|
35361
|
+
return value != null && typeof value.clone === "function" ? value.clone() : _clone(value, true);
|
35362
|
+
});
|
35363
|
+
var clone_default = clone;
|
35364
|
+
|
35365
|
+
// ../../node_modules/.pnpm/ramda@0.29.0/node_modules/ramda/es/trim.js
|
35366
|
+
var hasProtoTrim = typeof String.prototype.trim === "function";
|
35367
|
+
|
34985
35368
|
// src/providers/coin-quantity.ts
|
34986
35369
|
var coinQuantityfy = (coinQuantityLike) => {
|
34987
35370
|
let assetId;
|
34988
35371
|
let amount;
|
34989
|
-
let
|
35372
|
+
let max;
|
34990
35373
|
if (Array.isArray(coinQuantityLike)) {
|
34991
35374
|
amount = coinQuantityLike[0];
|
34992
35375
|
assetId = coinQuantityLike[1] ?? BaseAssetId;
|
34993
|
-
|
35376
|
+
max = coinQuantityLike[2] ?? void 0;
|
34994
35377
|
} else {
|
34995
35378
|
amount = coinQuantityLike.amount;
|
34996
35379
|
assetId = coinQuantityLike.assetId ?? BaseAssetId;
|
34997
|
-
|
35380
|
+
max = coinQuantityLike.max ?? void 0;
|
34998
35381
|
}
|
34999
35382
|
const bnAmount = bn(amount);
|
35000
35383
|
return {
|
35001
35384
|
assetId: hexlify(assetId),
|
35002
35385
|
amount: bnAmount.lt(1) ? bn(1) : bnAmount,
|
35003
|
-
max:
|
35386
|
+
max: max ? bn(max) : void 0
|
35004
35387
|
};
|
35005
35388
|
};
|
35006
|
-
var
|
35389
|
+
var addAmountToCoinQuantities = (params) => {
|
35007
35390
|
const { amount, assetId } = params;
|
35008
35391
|
const coinQuantities = [...params.coinQuantities];
|
35009
35392
|
const assetIdx = coinQuantities.findIndex((coinQuantity) => coinQuantity.assetId === assetId);
|
@@ -35070,7 +35453,7 @@ This unreleased fuel-core build may include features and updates not yet support
|
|
35070
35453
|
var ENCODING_V1 = "1";
|
35071
35454
|
var WORD_SIZE = 8;
|
35072
35455
|
var BYTES_32 = 32;
|
35073
|
-
var UTXO_ID_LEN = BYTES_32 +
|
35456
|
+
var UTXO_ID_LEN = BYTES_32 + 2;
|
35074
35457
|
var ASSET_ID_LEN = BYTES_32;
|
35075
35458
|
var ADDRESS_LEN = BYTES_32;
|
35076
35459
|
var NONCE_LEN = BYTES_32;
|
@@ -35078,9 +35461,9 @@ This unreleased fuel-core build may include features and updates not yet support
|
|
35078
35461
|
var TX_POINTER_LEN = WORD_SIZE * 2;
|
35079
35462
|
var MAX_BYTES = 2 ** 32 - 1;
|
35080
35463
|
var calculateVmTxMemory = ({ maxInputs }) => BYTES_32 + // Tx ID
|
35081
|
-
|
35464
|
+
ASSET_ID_LEN + // Base asset ID
|
35082
35465
|
// Asset ID/Balance coin input pairs
|
35083
|
-
maxInputs * (ASSET_ID_LEN + WORD_SIZE);
|
35466
|
+
maxInputs * (ASSET_ID_LEN + WORD_SIZE) + WORD_SIZE;
|
35084
35467
|
var SCRIPT_FIXED_SIZE = WORD_SIZE + // Identifier
|
35085
35468
|
WORD_SIZE + // Gas limit
|
35086
35469
|
WORD_SIZE + // Script size
|
@@ -35098,7 +35481,6 @@ This unreleased fuel-core build may include features and updates not yet support
|
|
35098
35481
|
ASSET_ID_LEN + // Asset id
|
35099
35482
|
TX_POINTER_LEN + // TxPointer
|
35100
35483
|
WORD_SIZE + // Witnesses index
|
35101
|
-
WORD_SIZE + // Maturity
|
35102
35484
|
WORD_SIZE + // Predicate size
|
35103
35485
|
WORD_SIZE + // Predicate data size
|
35104
35486
|
WORD_SIZE;
|
@@ -35420,7 +35802,7 @@ This unreleased fuel-core build may include features and updates not yet support
|
|
35420
35802
|
constructor(name, coders) {
|
35421
35803
|
const caseIndexCoder = new BigNumberCoder("u64");
|
35422
35804
|
const encodedValueSize = Object.values(coders).reduce(
|
35423
|
-
(
|
35805
|
+
(max, coder) => Math.max(max, coder.encodedLength),
|
35424
35806
|
0
|
35425
35807
|
);
|
35426
35808
|
super(`enum ${name}`, `enum ${name}`, caseIndexCoder.encodedLength + encodedValueSize);
|
@@ -36138,7 +36520,7 @@ This unreleased fuel-core build may include features and updates not yet support
|
|
36138
36520
|
constructor(name, coders) {
|
36139
36521
|
const caseIndexCoder = new BigNumberCoder("u64");
|
36140
36522
|
const encodedValueSize = Object.values(coders).reduce(
|
36141
|
-
(
|
36523
|
+
(max, coder) => Math.max(max, coder.encodedLength),
|
36142
36524
|
0
|
36143
36525
|
);
|
36144
36526
|
super(`enum ${name}`, `enum ${name}`, caseIndexCoder.encodedLength + encodedValueSize);
|
@@ -36852,18 +37234,19 @@ This unreleased fuel-core build may include features and updates not yet support
|
|
36852
37234
|
encode(value) {
|
36853
37235
|
const parts = [];
|
36854
37236
|
parts.push(new B256Coder().encode(value.txID));
|
36855
|
-
parts.push(new NumberCoder("
|
37237
|
+
parts.push(new NumberCoder("u16").encode(value.outputIndex));
|
36856
37238
|
parts.push(new B256Coder().encode(value.owner));
|
36857
37239
|
parts.push(new BigNumberCoder("u64").encode(value.amount));
|
36858
37240
|
parts.push(new B256Coder().encode(value.assetId));
|
36859
37241
|
parts.push(new TxPointerCoder().encode(value.txPointer));
|
36860
|
-
parts.push(new NumberCoder("
|
36861
|
-
parts.push(new NumberCoder("u32").encode(value.maturity));
|
37242
|
+
parts.push(new NumberCoder("u16").encode(value.witnessIndex));
|
36862
37243
|
parts.push(new BigNumberCoder("u64").encode(value.predicateGasUsed));
|
36863
|
-
parts.push(new
|
36864
|
-
parts.push(new
|
36865
|
-
parts.push(new ByteArrayCoder(value.predicateLength).encode(value.predicate));
|
36866
|
-
parts.push(
|
37244
|
+
parts.push(new BigNumberCoder("u64").encode(value.predicateLength));
|
37245
|
+
parts.push(new BigNumberCoder("u64").encode(value.predicateDataLength));
|
37246
|
+
parts.push(new ByteArrayCoder(value.predicateLength.toNumber()).encode(value.predicate));
|
37247
|
+
parts.push(
|
37248
|
+
new ByteArrayCoder(value.predicateDataLength.toNumber()).encode(value.predicateData)
|
37249
|
+
);
|
36867
37250
|
return concat(parts);
|
36868
37251
|
}
|
36869
37252
|
decode(data, offset) {
|
@@ -36871,7 +37254,7 @@ This unreleased fuel-core build may include features and updates not yet support
|
|
36871
37254
|
let o = offset;
|
36872
37255
|
[decoded, o] = new B256Coder().decode(data, o);
|
36873
37256
|
const txID = decoded;
|
36874
|
-
[decoded, o] = new NumberCoder("
|
37257
|
+
[decoded, o] = new NumberCoder("u16").decode(data, o);
|
36875
37258
|
const outputIndex = decoded;
|
36876
37259
|
[decoded, o] = new B256Coder().decode(data, o);
|
36877
37260
|
const owner = decoded;
|
@@ -36881,19 +37264,17 @@ This unreleased fuel-core build may include features and updates not yet support
|
|
36881
37264
|
const assetId = decoded;
|
36882
37265
|
[decoded, o] = new TxPointerCoder().decode(data, o);
|
36883
37266
|
const txPointer = decoded;
|
36884
|
-
[decoded, o] = new NumberCoder("
|
37267
|
+
[decoded, o] = new NumberCoder("u16").decode(data, o);
|
36885
37268
|
const witnessIndex = Number(decoded);
|
36886
|
-
[decoded, o] = new NumberCoder("u32").decode(data, o);
|
36887
|
-
const maturity = decoded;
|
36888
37269
|
[decoded, o] = new BigNumberCoder("u64").decode(data, o);
|
36889
37270
|
const predicateGasUsed = decoded;
|
36890
|
-
[decoded, o] = new
|
37271
|
+
[decoded, o] = new BigNumberCoder("u64").decode(data, o);
|
36891
37272
|
const predicateLength = decoded;
|
36892
|
-
[decoded, o] = new
|
37273
|
+
[decoded, o] = new BigNumberCoder("u64").decode(data, o);
|
36893
37274
|
const predicateDataLength = decoded;
|
36894
|
-
[decoded, o] = new ByteArrayCoder(predicateLength).decode(data, o);
|
37275
|
+
[decoded, o] = new ByteArrayCoder(predicateLength.toNumber()).decode(data, o);
|
36895
37276
|
const predicate = decoded;
|
36896
|
-
[decoded, o] = new ByteArrayCoder(predicateDataLength).decode(data, o);
|
37277
|
+
[decoded, o] = new ByteArrayCoder(predicateDataLength.toNumber()).decode(data, o);
|
36897
37278
|
const predicateData = decoded;
|
36898
37279
|
return [
|
36899
37280
|
{
|
@@ -36905,7 +37286,6 @@ This unreleased fuel-core build may include features and updates not yet support
|
|
36905
37286
|
assetId,
|
36906
37287
|
txPointer,
|
36907
37288
|
witnessIndex,
|
36908
|
-
maturity,
|
36909
37289
|
predicateGasUsed,
|
36910
37290
|
predicateLength,
|
36911
37291
|
predicateDataLength,
|
@@ -36923,7 +37303,7 @@ This unreleased fuel-core build may include features and updates not yet support
|
|
36923
37303
|
encode(value) {
|
36924
37304
|
const parts = [];
|
36925
37305
|
parts.push(new B256Coder().encode(value.txID));
|
36926
|
-
parts.push(new NumberCoder("
|
37306
|
+
parts.push(new NumberCoder("u16").encode(value.outputIndex));
|
36927
37307
|
parts.push(new B256Coder().encode(value.balanceRoot));
|
36928
37308
|
parts.push(new B256Coder().encode(value.stateRoot));
|
36929
37309
|
parts.push(new TxPointerCoder().encode(value.txPointer));
|
@@ -36935,7 +37315,7 @@ This unreleased fuel-core build may include features and updates not yet support
|
|
36935
37315
|
let o = offset;
|
36936
37316
|
[decoded, o] = new B256Coder().decode(data, o);
|
36937
37317
|
const txID = decoded;
|
36938
|
-
[decoded, o] = new NumberCoder("
|
37318
|
+
[decoded, o] = new NumberCoder("u16").decode(data, o);
|
36939
37319
|
const outputIndex = decoded;
|
36940
37320
|
[decoded, o] = new B256Coder().decode(data, o);
|
36941
37321
|
const balanceRoot = decoded;
|
@@ -36984,14 +37364,16 @@ This unreleased fuel-core build may include features and updates not yet support
|
|
36984
37364
|
parts.push(new ByteArrayCoder(32).encode(value.recipient));
|
36985
37365
|
parts.push(new BigNumberCoder("u64").encode(value.amount));
|
36986
37366
|
parts.push(new ByteArrayCoder(32).encode(value.nonce));
|
36987
|
-
parts.push(new NumberCoder("
|
37367
|
+
parts.push(new NumberCoder("u16").encode(value.witnessIndex));
|
36988
37368
|
parts.push(new BigNumberCoder("u64").encode(value.predicateGasUsed));
|
36989
|
-
parts.push(new
|
36990
|
-
parts.push(new
|
36991
|
-
parts.push(new
|
37369
|
+
parts.push(new BigNumberCoder("u64").encode(data.length));
|
37370
|
+
parts.push(new BigNumberCoder("u64").encode(value.predicateLength));
|
37371
|
+
parts.push(new BigNumberCoder("u64").encode(value.predicateDataLength));
|
36992
37372
|
parts.push(new ByteArrayCoder(data.length).encode(data));
|
36993
|
-
parts.push(new ByteArrayCoder(value.predicateLength).encode(value.predicate));
|
36994
|
-
parts.push(
|
37373
|
+
parts.push(new ByteArrayCoder(value.predicateLength.toNumber()).encode(value.predicate));
|
37374
|
+
parts.push(
|
37375
|
+
new ByteArrayCoder(value.predicateDataLength.toNumber()).encode(value.predicateData)
|
37376
|
+
);
|
36995
37377
|
return concat(parts);
|
36996
37378
|
}
|
36997
37379
|
static decodeData(messageData) {
|
@@ -37011,21 +37393,21 @@ This unreleased fuel-core build may include features and updates not yet support
|
|
37011
37393
|
const amount = decoded;
|
37012
37394
|
[decoded, o] = new B256Coder().decode(data, o);
|
37013
37395
|
const nonce = decoded;
|
37014
|
-
[decoded, o] = new NumberCoder("
|
37396
|
+
[decoded, o] = new NumberCoder("u16").decode(data, o);
|
37015
37397
|
const witnessIndex = Number(decoded);
|
37016
37398
|
[decoded, o] = new BigNumberCoder("u64").decode(data, o);
|
37017
37399
|
const predicateGasUsed = decoded;
|
37018
37400
|
[decoded, o] = new NumberCoder("u32").decode(data, o);
|
37019
37401
|
const dataLength2 = decoded;
|
37020
|
-
[decoded, o] = new
|
37402
|
+
[decoded, o] = new BigNumberCoder("u64").decode(data, o);
|
37021
37403
|
const predicateLength = decoded;
|
37022
|
-
[decoded, o] = new
|
37404
|
+
[decoded, o] = new BigNumberCoder("u64").decode(data, o);
|
37023
37405
|
const predicateDataLength = decoded;
|
37024
37406
|
[decoded, o] = new ByteArrayCoder(dataLength2).decode(data, o);
|
37025
37407
|
const messageData = decoded;
|
37026
|
-
[decoded, o] = new ByteArrayCoder(predicateLength).decode(data, o);
|
37408
|
+
[decoded, o] = new ByteArrayCoder(predicateLength.toNumber()).decode(data, o);
|
37027
37409
|
const predicate = decoded;
|
37028
|
-
[decoded, o] = new ByteArrayCoder(predicateDataLength).decode(data, o);
|
37410
|
+
[decoded, o] = new ByteArrayCoder(predicateDataLength.toNumber()).decode(data, o);
|
37029
37411
|
const predicateData = decoded;
|
37030
37412
|
return [
|
37031
37413
|
{
|
@@ -37337,7 +37719,7 @@ This unreleased fuel-core build may include features and updates not yet support
|
|
37337
37719
|
}
|
37338
37720
|
};
|
37339
37721
|
var PolicyType = /* @__PURE__ */ ((PolicyType2) => {
|
37340
|
-
PolicyType2[PolicyType2["
|
37722
|
+
PolicyType2[PolicyType2["Tip"] = 1] = "Tip";
|
37341
37723
|
PolicyType2[PolicyType2["WitnessLimit"] = 2] = "WitnessLimit";
|
37342
37724
|
PolicyType2[PolicyType2["Maturity"] = 4] = "Maturity";
|
37343
37725
|
PolicyType2[PolicyType2["MaxFee"] = 8] = "MaxFee";
|
@@ -37385,9 +37767,9 @@ This unreleased fuel-core build may include features and updates not yet support
|
|
37385
37767
|
let o = offset;
|
37386
37768
|
const policies = [];
|
37387
37769
|
if (policyTypes & 1) {
|
37388
|
-
const [
|
37770
|
+
const [tip, nextOffset] = new BigNumberCoder("u64").decode(data, o);
|
37389
37771
|
o = nextOffset;
|
37390
|
-
policies.push({ type: 1, data:
|
37772
|
+
policies.push({ type: 1, data: tip });
|
37391
37773
|
}
|
37392
37774
|
if (policyTypes & 2) {
|
37393
37775
|
const [witnessLimit, nextOffset] = new BigNumberCoder("u64").decode(data, o);
|
@@ -37619,15 +38001,15 @@ This unreleased fuel-core build may include features and updates not yet support
|
|
37619
38001
|
encode(value) {
|
37620
38002
|
const parts = [];
|
37621
38003
|
parts.push(new BigNumberCoder("u64").encode(value.scriptGasLimit));
|
37622
|
-
parts.push(new NumberCoder("u32").encode(value.scriptLength));
|
37623
|
-
parts.push(new NumberCoder("u32").encode(value.scriptDataLength));
|
37624
|
-
parts.push(new NumberCoder("u32").encode(value.policyTypes));
|
37625
|
-
parts.push(new NumberCoder("u8").encode(value.inputsCount));
|
37626
|
-
parts.push(new NumberCoder("u8").encode(value.outputsCount));
|
37627
|
-
parts.push(new NumberCoder("u8").encode(value.witnessesCount));
|
37628
38004
|
parts.push(new B256Coder().encode(value.receiptsRoot));
|
37629
|
-
parts.push(new
|
37630
|
-
parts.push(new
|
38005
|
+
parts.push(new BigNumberCoder("u64").encode(value.scriptLength));
|
38006
|
+
parts.push(new BigNumberCoder("u64").encode(value.scriptDataLength));
|
38007
|
+
parts.push(new NumberCoder("u32").encode(value.policyTypes));
|
38008
|
+
parts.push(new NumberCoder("u16").encode(value.inputsCount));
|
38009
|
+
parts.push(new NumberCoder("u16").encode(value.outputsCount));
|
38010
|
+
parts.push(new NumberCoder("u16").encode(value.witnessesCount));
|
38011
|
+
parts.push(new ByteArrayCoder(value.scriptLength.toNumber()).encode(value.script));
|
38012
|
+
parts.push(new ByteArrayCoder(value.scriptDataLength.toNumber()).encode(value.scriptData));
|
37631
38013
|
parts.push(new PoliciesCoder().encode(value.policies));
|
37632
38014
|
parts.push(new ArrayCoder(new InputCoder(), value.inputsCount).encode(value.inputs));
|
37633
38015
|
parts.push(new ArrayCoder(new OutputCoder(), value.outputsCount).encode(value.outputs));
|
@@ -37639,23 +38021,23 @@ This unreleased fuel-core build may include features and updates not yet support
|
|
37639
38021
|
let o = offset;
|
37640
38022
|
[decoded, o] = new BigNumberCoder("u64").decode(data, o);
|
37641
38023
|
const scriptGasLimit = decoded;
|
37642
|
-
[decoded, o] = new
|
38024
|
+
[decoded, o] = new B256Coder().decode(data, o);
|
38025
|
+
const receiptsRoot = decoded;
|
38026
|
+
[decoded, o] = new BigNumberCoder("u64").decode(data, o);
|
37643
38027
|
const scriptLength = decoded;
|
37644
|
-
[decoded, o] = new
|
38028
|
+
[decoded, o] = new BigNumberCoder("u64").decode(data, o);
|
37645
38029
|
const scriptDataLength = decoded;
|
37646
38030
|
[decoded, o] = new NumberCoder("u32").decode(data, o);
|
37647
38031
|
const policyTypes = decoded;
|
37648
|
-
[decoded, o] = new NumberCoder("
|
38032
|
+
[decoded, o] = new NumberCoder("u16").decode(data, o);
|
37649
38033
|
const inputsCount = decoded;
|
37650
|
-
[decoded, o] = new NumberCoder("
|
38034
|
+
[decoded, o] = new NumberCoder("u16").decode(data, o);
|
37651
38035
|
const outputsCount = decoded;
|
37652
|
-
[decoded, o] = new NumberCoder("
|
38036
|
+
[decoded, o] = new NumberCoder("u16").decode(data, o);
|
37653
38037
|
const witnessesCount = decoded;
|
37654
|
-
[decoded, o] = new
|
37655
|
-
const receiptsRoot = decoded;
|
37656
|
-
[decoded, o] = new ByteArrayCoder(scriptLength).decode(data, o);
|
38038
|
+
[decoded, o] = new ByteArrayCoder(scriptLength.toNumber()).decode(data, o);
|
37657
38039
|
const script = decoded;
|
37658
|
-
[decoded, o] = new ByteArrayCoder(scriptDataLength).decode(data, o);
|
38040
|
+
[decoded, o] = new ByteArrayCoder(scriptDataLength.toNumber()).decode(data, o);
|
37659
38041
|
const scriptData = decoded;
|
37660
38042
|
[decoded, o] = new PoliciesCoder().decode(data, o, policyTypes);
|
37661
38043
|
const policies = decoded;
|
@@ -37693,18 +38075,19 @@ This unreleased fuel-core build may include features and updates not yet support
|
|
37693
38075
|
}
|
37694
38076
|
encode(value) {
|
37695
38077
|
const parts = [];
|
37696
|
-
parts.push(new NumberCoder("
|
37697
|
-
parts.push(new NumberCoder("u8").encode(value.bytecodeWitnessIndex));
|
37698
|
-
parts.push(new NumberCoder("u32").encode(value.policyTypes));
|
37699
|
-
parts.push(new NumberCoder("u16").encode(value.storageSlotsCount));
|
37700
|
-
parts.push(new NumberCoder("u8").encode(value.inputsCount));
|
37701
|
-
parts.push(new NumberCoder("u8").encode(value.outputsCount));
|
37702
|
-
parts.push(new NumberCoder("u8").encode(value.witnessesCount));
|
38078
|
+
parts.push(new NumberCoder("u16").encode(value.bytecodeWitnessIndex));
|
37703
38079
|
parts.push(new B256Coder().encode(value.salt));
|
37704
|
-
parts.push(new
|
38080
|
+
parts.push(new BigNumberCoder("u64").encode(value.storageSlotsCount));
|
38081
|
+
parts.push(new NumberCoder("u32").encode(value.policyTypes));
|
38082
|
+
parts.push(new NumberCoder("u16").encode(value.inputsCount));
|
38083
|
+
parts.push(new NumberCoder("u16").encode(value.outputsCount));
|
38084
|
+
parts.push(new NumberCoder("u16").encode(value.witnessesCount));
|
37705
38085
|
parts.push(
|
37706
|
-
new ArrayCoder(new StorageSlotCoder(), value.storageSlotsCount).encode(
|
38086
|
+
new ArrayCoder(new StorageSlotCoder(), value.storageSlotsCount.toNumber()).encode(
|
38087
|
+
value.storageSlots
|
38088
|
+
)
|
37707
38089
|
);
|
38090
|
+
parts.push(new PoliciesCoder().encode(value.policies));
|
37708
38091
|
parts.push(new ArrayCoder(new InputCoder(), value.inputsCount).encode(value.inputs));
|
37709
38092
|
parts.push(new ArrayCoder(new OutputCoder(), value.outputsCount).encode(value.outputs));
|
37710
38093
|
parts.push(new ArrayCoder(new WitnessCoder(), value.witnessesCount).encode(value.witnesses));
|
@@ -37713,26 +38096,27 @@ This unreleased fuel-core build may include features and updates not yet support
|
|
37713
38096
|
decode(data, offset) {
|
37714
38097
|
let decoded;
|
37715
38098
|
let o = offset;
|
37716
|
-
[decoded, o] = new NumberCoder("
|
37717
|
-
const bytecodeLength = decoded;
|
37718
|
-
[decoded, o] = new NumberCoder("u8").decode(data, o);
|
38099
|
+
[decoded, o] = new NumberCoder("u16").decode(data, o);
|
37719
38100
|
const bytecodeWitnessIndex = decoded;
|
38101
|
+
[decoded, o] = new B256Coder().decode(data, o);
|
38102
|
+
const salt = decoded;
|
38103
|
+
[decoded, o] = new BigNumberCoder("u64").decode(data, o);
|
38104
|
+
const storageSlotsCount = decoded;
|
37720
38105
|
[decoded, o] = new NumberCoder("u32").decode(data, o);
|
37721
38106
|
const policyTypes = decoded;
|
37722
38107
|
[decoded, o] = new NumberCoder("u16").decode(data, o);
|
37723
|
-
const storageSlotsCount = decoded;
|
37724
|
-
[decoded, o] = new NumberCoder("u8").decode(data, o);
|
37725
38108
|
const inputsCount = decoded;
|
37726
|
-
[decoded, o] = new NumberCoder("
|
38109
|
+
[decoded, o] = new NumberCoder("u16").decode(data, o);
|
37727
38110
|
const outputsCount = decoded;
|
37728
|
-
[decoded, o] = new NumberCoder("
|
38111
|
+
[decoded, o] = new NumberCoder("u16").decode(data, o);
|
37729
38112
|
const witnessesCount = decoded;
|
37730
|
-
[decoded, o] = new
|
37731
|
-
|
38113
|
+
[decoded, o] = new ArrayCoder(new StorageSlotCoder(), storageSlotsCount.toNumber()).decode(
|
38114
|
+
data,
|
38115
|
+
o
|
38116
|
+
);
|
38117
|
+
const storageSlots = decoded;
|
37732
38118
|
[decoded, o] = new PoliciesCoder().decode(data, o, policyTypes);
|
37733
38119
|
const policies = decoded;
|
37734
|
-
[decoded, o] = new ArrayCoder(new StorageSlotCoder(), storageSlotsCount).decode(data, o);
|
37735
|
-
const storageSlots = decoded;
|
37736
38120
|
[decoded, o] = new ArrayCoder(new InputCoder(), inputsCount).decode(data, o);
|
37737
38121
|
const inputs = decoded;
|
37738
38122
|
[decoded, o] = new ArrayCoder(new OutputCoder(), outputsCount).decode(data, o);
|
@@ -37742,7 +38126,6 @@ This unreleased fuel-core build may include features and updates not yet support
|
|
37742
38126
|
return [
|
37743
38127
|
{
|
37744
38128
|
type: 1,
|
37745
|
-
bytecodeLength,
|
37746
38129
|
bytecodeWitnessIndex,
|
37747
38130
|
policyTypes,
|
37748
38131
|
storageSlotsCount,
|
@@ -37771,6 +38154,7 @@ This unreleased fuel-core build may include features and updates not yet support
|
|
37771
38154
|
parts.push(new OutputContractCoder().encode(value.outputContract));
|
37772
38155
|
parts.push(new BigNumberCoder("u64").encode(value.mintAmount));
|
37773
38156
|
parts.push(new B256Coder().encode(value.mintAssetId));
|
38157
|
+
parts.push(new BigNumberCoder("u64").encode(value.gasPrice));
|
37774
38158
|
return concat(parts);
|
37775
38159
|
}
|
37776
38160
|
decode(data, offset) {
|
@@ -37786,6 +38170,8 @@ This unreleased fuel-core build may include features and updates not yet support
|
|
37786
38170
|
const mintAmount = decoded;
|
37787
38171
|
[decoded, o] = new B256Coder().decode(data, o);
|
37788
38172
|
const mintAssetId = decoded;
|
38173
|
+
[decoded, o] = new BigNumberCoder("u64").decode(data, o);
|
38174
|
+
const gasPrice = decoded;
|
37789
38175
|
return [
|
37790
38176
|
{
|
37791
38177
|
type: 2,
|
@@ -37793,7 +38179,8 @@ This unreleased fuel-core build may include features and updates not yet support
|
|
37793
38179
|
inputContract,
|
37794
38180
|
outputContract,
|
37795
38181
|
mintAmount,
|
37796
|
-
mintAssetId
|
38182
|
+
mintAssetId,
|
38183
|
+
gasPrice
|
37797
38184
|
},
|
37798
38185
|
o
|
37799
38186
|
];
|
@@ -38100,159 +38487,6 @@ This unreleased fuel-core build may include features and updates not yet support
|
|
38100
38487
|
// src/providers/provider.ts
|
38101
38488
|
var import_graphql_request = __toESM(require_dist2());
|
38102
38489
|
|
38103
|
-
// ../../node_modules/.pnpm/ramda@0.29.0/node_modules/ramda/es/internal/_isPlaceholder.js
|
38104
|
-
function _isPlaceholder(a) {
|
38105
|
-
return a != null && typeof a === "object" && a["@@functional/placeholder"] === true;
|
38106
|
-
}
|
38107
|
-
|
38108
|
-
// ../../node_modules/.pnpm/ramda@0.29.0/node_modules/ramda/es/internal/_curry1.js
|
38109
|
-
function _curry1(fn) {
|
38110
|
-
return function f1(a) {
|
38111
|
-
if (arguments.length === 0 || _isPlaceholder(a)) {
|
38112
|
-
return f1;
|
38113
|
-
} else {
|
38114
|
-
return fn.apply(this, arguments);
|
38115
|
-
}
|
38116
|
-
};
|
38117
|
-
}
|
38118
|
-
|
38119
|
-
// ../../node_modules/.pnpm/ramda@0.29.0/node_modules/ramda/es/internal/_isArray.js
|
38120
|
-
var isArray_default = Array.isArray || function _isArray(val) {
|
38121
|
-
return val != null && val.length >= 0 && Object.prototype.toString.call(val) === "[object Array]";
|
38122
|
-
};
|
38123
|
-
|
38124
|
-
// ../../node_modules/.pnpm/ramda@0.29.0/node_modules/ramda/es/type.js
|
38125
|
-
var type = /* @__PURE__ */ _curry1(function type2(val) {
|
38126
|
-
return val === null ? "Null" : val === void 0 ? "Undefined" : Object.prototype.toString.call(val).slice(8, -1);
|
38127
|
-
});
|
38128
|
-
var type_default = type;
|
38129
|
-
|
38130
|
-
// ../../node_modules/.pnpm/ramda@0.29.0/node_modules/ramda/es/internal/_toISOString.js
|
38131
|
-
var pad = function pad2(n) {
|
38132
|
-
return (n < 10 ? "0" : "") + n;
|
38133
|
-
};
|
38134
|
-
var _toISOString = typeof Date.prototype.toISOString === "function" ? function _toISOString2(d) {
|
38135
|
-
return d.toISOString();
|
38136
|
-
} : function _toISOString3(d) {
|
38137
|
-
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";
|
38138
|
-
};
|
38139
|
-
|
38140
|
-
// ../../node_modules/.pnpm/ramda@0.29.0/node_modules/ramda/es/internal/_isInteger.js
|
38141
|
-
var isInteger_default = Number.isInteger || function _isInteger(n) {
|
38142
|
-
return n << 0 === n;
|
38143
|
-
};
|
38144
|
-
|
38145
|
-
// ../../node_modules/.pnpm/ramda@0.29.0/node_modules/ramda/es/internal/_cloneRegExp.js
|
38146
|
-
function _cloneRegExp(pattern) {
|
38147
|
-
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" : ""));
|
38148
|
-
}
|
38149
|
-
|
38150
|
-
// ../../node_modules/.pnpm/ramda@0.29.0/node_modules/ramda/es/internal/_clone.js
|
38151
|
-
function _clone(value, deep, map) {
|
38152
|
-
map || (map = new _ObjectMap());
|
38153
|
-
if (_isPrimitive(value)) {
|
38154
|
-
return value;
|
38155
|
-
}
|
38156
|
-
var copy = function copy2(copiedValue) {
|
38157
|
-
var cachedCopy = map.get(value);
|
38158
|
-
if (cachedCopy) {
|
38159
|
-
return cachedCopy;
|
38160
|
-
}
|
38161
|
-
map.set(value, copiedValue);
|
38162
|
-
for (var key in value) {
|
38163
|
-
if (Object.prototype.hasOwnProperty.call(value, key)) {
|
38164
|
-
copiedValue[key] = deep ? _clone(value[key], true, map) : value[key];
|
38165
|
-
}
|
38166
|
-
}
|
38167
|
-
return copiedValue;
|
38168
|
-
};
|
38169
|
-
switch (type_default(value)) {
|
38170
|
-
case "Object":
|
38171
|
-
return copy(Object.create(Object.getPrototypeOf(value)));
|
38172
|
-
case "Array":
|
38173
|
-
return copy([]);
|
38174
|
-
case "Date":
|
38175
|
-
return new Date(value.valueOf());
|
38176
|
-
case "RegExp":
|
38177
|
-
return _cloneRegExp(value);
|
38178
|
-
case "Int8Array":
|
38179
|
-
case "Uint8Array":
|
38180
|
-
case "Uint8ClampedArray":
|
38181
|
-
case "Int16Array":
|
38182
|
-
case "Uint16Array":
|
38183
|
-
case "Int32Array":
|
38184
|
-
case "Uint32Array":
|
38185
|
-
case "Float32Array":
|
38186
|
-
case "Float64Array":
|
38187
|
-
case "BigInt64Array":
|
38188
|
-
case "BigUint64Array":
|
38189
|
-
return value.slice();
|
38190
|
-
default:
|
38191
|
-
return value;
|
38192
|
-
}
|
38193
|
-
}
|
38194
|
-
function _isPrimitive(param) {
|
38195
|
-
var type3 = typeof param;
|
38196
|
-
return param == null || type3 != "object" && type3 != "function";
|
38197
|
-
}
|
38198
|
-
var _ObjectMap = /* @__PURE__ */ function() {
|
38199
|
-
function _ObjectMap2() {
|
38200
|
-
this.map = {};
|
38201
|
-
this.length = 0;
|
38202
|
-
}
|
38203
|
-
_ObjectMap2.prototype.set = function(key, value) {
|
38204
|
-
const hashedKey = this.hash(key);
|
38205
|
-
let bucket = this.map[hashedKey];
|
38206
|
-
if (!bucket) {
|
38207
|
-
this.map[hashedKey] = bucket = [];
|
38208
|
-
}
|
38209
|
-
bucket.push([key, value]);
|
38210
|
-
this.length += 1;
|
38211
|
-
};
|
38212
|
-
_ObjectMap2.prototype.hash = function(key) {
|
38213
|
-
let hashedKey = [];
|
38214
|
-
for (var value in key) {
|
38215
|
-
hashedKey.push(Object.prototype.toString.call(key[value]));
|
38216
|
-
}
|
38217
|
-
return hashedKey.join();
|
38218
|
-
};
|
38219
|
-
_ObjectMap2.prototype.get = function(key) {
|
38220
|
-
if (this.length <= 180) {
|
38221
|
-
for (const p in this.map) {
|
38222
|
-
const bucket2 = this.map[p];
|
38223
|
-
for (let i = 0; i < bucket2.length; i += 1) {
|
38224
|
-
const element = bucket2[i];
|
38225
|
-
if (element[0] === key) {
|
38226
|
-
return element[1];
|
38227
|
-
}
|
38228
|
-
}
|
38229
|
-
}
|
38230
|
-
return;
|
38231
|
-
}
|
38232
|
-
const hashedKey = this.hash(key);
|
38233
|
-
const bucket = this.map[hashedKey];
|
38234
|
-
if (!bucket) {
|
38235
|
-
return;
|
38236
|
-
}
|
38237
|
-
for (let i = 0; i < bucket.length; i += 1) {
|
38238
|
-
const element = bucket[i];
|
38239
|
-
if (element[0] === key) {
|
38240
|
-
return element[1];
|
38241
|
-
}
|
38242
|
-
}
|
38243
|
-
};
|
38244
|
-
return _ObjectMap2;
|
38245
|
-
}();
|
38246
|
-
|
38247
|
-
// ../../node_modules/.pnpm/ramda@0.29.0/node_modules/ramda/es/clone.js
|
38248
|
-
var clone2 = /* @__PURE__ */ _curry1(function clone3(value) {
|
38249
|
-
return value != null && typeof value.clone === "function" ? value.clone() : _clone(value, true);
|
38250
|
-
});
|
38251
|
-
var clone_default = clone2;
|
38252
|
-
|
38253
|
-
// ../../node_modules/.pnpm/ramda@0.29.0/node_modules/ramda/es/trim.js
|
38254
|
-
var hasProtoTrim = typeof String.prototype.trim === "function";
|
38255
|
-
|
38256
38490
|
// ../../node_modules/.pnpm/tslib@2.6.0/node_modules/tslib/tslib.es6.mjs
|
38257
38491
|
var __assign = function() {
|
38258
38492
|
__assign = Object.assign || function __assign2(t) {
|
@@ -41418,16 +41652,40 @@ spurious results.`);
|
|
41418
41652
|
var lib_default2 = gql;
|
41419
41653
|
|
41420
41654
|
// src/providers/__generated__/operations.ts
|
41655
|
+
var TransactionStatusSubscriptionFragmentFragmentDoc = lib_default2`
|
41656
|
+
fragment transactionStatusSubscriptionFragment on TransactionStatus {
|
41657
|
+
type: __typename
|
41658
|
+
... on SubmittedStatus {
|
41659
|
+
time
|
41660
|
+
}
|
41661
|
+
... on SuccessStatus {
|
41662
|
+
block {
|
41663
|
+
id
|
41664
|
+
}
|
41665
|
+
time
|
41666
|
+
programState {
|
41667
|
+
returnType
|
41668
|
+
data
|
41669
|
+
}
|
41670
|
+
}
|
41671
|
+
... on FailureStatus {
|
41672
|
+
block {
|
41673
|
+
id
|
41674
|
+
}
|
41675
|
+
time
|
41676
|
+
reason
|
41677
|
+
}
|
41678
|
+
... on SqueezedOutStatus {
|
41679
|
+
reason
|
41680
|
+
}
|
41681
|
+
}
|
41682
|
+
`;
|
41421
41683
|
var ReceiptFragmentFragmentDoc = lib_default2`
|
41422
41684
|
fragment receiptFragment on Receipt {
|
41423
|
-
|
41424
|
-
id
|
41425
|
-
}
|
41685
|
+
id
|
41426
41686
|
pc
|
41427
41687
|
is
|
41428
|
-
to
|
41429
|
-
id
|
41430
|
-
}
|
41688
|
+
to
|
41431
41689
|
toAddress
|
41432
41690
|
amount
|
41433
41691
|
assetId
|
@@ -41465,10 +41723,16 @@ spurious results.`);
|
|
41465
41723
|
id
|
41466
41724
|
}
|
41467
41725
|
time
|
41726
|
+
receipts {
|
41727
|
+
...receiptFragment
|
41728
|
+
}
|
41468
41729
|
programState {
|
41469
41730
|
returnType
|
41470
41731
|
data
|
41471
41732
|
}
|
41733
|
+
receipts {
|
41734
|
+
...receiptFragment
|
41735
|
+
}
|
41472
41736
|
}
|
41473
41737
|
... on FailureStatus {
|
41474
41738
|
block {
|
@@ -41476,26 +41740,24 @@ spurious results.`);
|
|
41476
41740
|
}
|
41477
41741
|
time
|
41478
41742
|
reason
|
41743
|
+
receipts {
|
41744
|
+
...receiptFragment
|
41745
|
+
}
|
41479
41746
|
}
|
41480
41747
|
... on SqueezedOutStatus {
|
41481
41748
|
reason
|
41482
41749
|
}
|
41483
41750
|
}
|
41484
|
-
`;
|
41751
|
+
${ReceiptFragmentFragmentDoc}`;
|
41485
41752
|
var TransactionFragmentFragmentDoc = lib_default2`
|
41486
41753
|
fragment transactionFragment on Transaction {
|
41487
41754
|
id
|
41488
41755
|
rawPayload
|
41489
|
-
gasPrice
|
41490
|
-
receipts {
|
41491
|
-
...receiptFragment
|
41492
|
-
}
|
41493
41756
|
status {
|
41494
41757
|
...transactionStatusFragment
|
41495
41758
|
}
|
41496
41759
|
}
|
41497
|
-
${
|
41498
|
-
${TransactionStatusFragmentFragmentDoc}`;
|
41760
|
+
${TransactionStatusFragmentFragmentDoc}`;
|
41499
41761
|
var InputEstimatePredicatesFragmentFragmentDoc = lib_default2`
|
41500
41762
|
fragment inputEstimatePredicatesFragment on Input {
|
41501
41763
|
... on InputCoin {
|
@@ -41513,6 +41775,46 @@ ${TransactionStatusFragmentFragmentDoc}`;
|
|
41513
41775
|
}
|
41514
41776
|
}
|
41515
41777
|
${InputEstimatePredicatesFragmentFragmentDoc}`;
|
41778
|
+
var DryRunFailureStatusFragmentFragmentDoc = lib_default2`
|
41779
|
+
fragment dryRunFailureStatusFragment on DryRunFailureStatus {
|
41780
|
+
reason
|
41781
|
+
programState {
|
41782
|
+
returnType
|
41783
|
+
data
|
41784
|
+
}
|
41785
|
+
}
|
41786
|
+
`;
|
41787
|
+
var DryRunSuccessStatusFragmentFragmentDoc = lib_default2`
|
41788
|
+
fragment dryRunSuccessStatusFragment on DryRunSuccessStatus {
|
41789
|
+
programState {
|
41790
|
+
returnType
|
41791
|
+
data
|
41792
|
+
}
|
41793
|
+
}
|
41794
|
+
`;
|
41795
|
+
var DryRunTransactionStatusFragmentFragmentDoc = lib_default2`
|
41796
|
+
fragment dryRunTransactionStatusFragment on DryRunTransactionStatus {
|
41797
|
+
... on DryRunFailureStatus {
|
41798
|
+
...dryRunFailureStatusFragment
|
41799
|
+
}
|
41800
|
+
... on DryRunSuccessStatus {
|
41801
|
+
...dryRunSuccessStatusFragment
|
41802
|
+
}
|
41803
|
+
}
|
41804
|
+
${DryRunFailureStatusFragmentFragmentDoc}
|
41805
|
+
${DryRunSuccessStatusFragmentFragmentDoc}`;
|
41806
|
+
var DryRunTransactionExecutionStatusFragmentFragmentDoc = lib_default2`
|
41807
|
+
fragment dryRunTransactionExecutionStatusFragment on DryRunTransactionExecutionStatus {
|
41808
|
+
id
|
41809
|
+
status {
|
41810
|
+
...dryRunTransactionStatusFragment
|
41811
|
+
}
|
41812
|
+
receipts {
|
41813
|
+
...receiptFragment
|
41814
|
+
}
|
41815
|
+
}
|
41816
|
+
${DryRunTransactionStatusFragmentFragmentDoc}
|
41817
|
+
${ReceiptFragmentFragmentDoc}`;
|
41516
41818
|
var CoinFragmentFragmentDoc = lib_default2`
|
41517
41819
|
fragment coinFragment on Coin {
|
41518
41820
|
__typename
|
@@ -41520,7 +41822,6 @@ ${TransactionStatusFragmentFragmentDoc}`;
|
|
41520
41822
|
owner
|
41521
41823
|
amount
|
41522
41824
|
assetId
|
41523
|
-
maturity
|
41524
41825
|
blockCreated
|
41525
41826
|
txCreatedIdx
|
41526
41827
|
}
|
@@ -41559,26 +41860,32 @@ ${TransactionStatusFragmentFragmentDoc}`;
|
|
41559
41860
|
messageBlockHeader {
|
41560
41861
|
id
|
41561
41862
|
daHeight
|
41863
|
+
consensusParametersVersion
|
41864
|
+
stateTransitionBytecodeVersion
|
41562
41865
|
transactionsCount
|
41866
|
+
messageReceiptCount
|
41563
41867
|
transactionsRoot
|
41868
|
+
messageOutboxRoot
|
41869
|
+
eventInboxRoot
|
41564
41870
|
height
|
41565
41871
|
prevRoot
|
41566
41872
|
time
|
41567
41873
|
applicationHash
|
41568
|
-
messageReceiptRoot
|
41569
|
-
messageReceiptCount
|
41570
41874
|
}
|
41571
41875
|
commitBlockHeader {
|
41572
41876
|
id
|
41573
41877
|
daHeight
|
41878
|
+
consensusParametersVersion
|
41879
|
+
stateTransitionBytecodeVersion
|
41574
41880
|
transactionsCount
|
41881
|
+
messageReceiptCount
|
41575
41882
|
transactionsRoot
|
41883
|
+
messageOutboxRoot
|
41884
|
+
eventInboxRoot
|
41576
41885
|
height
|
41577
41886
|
prevRoot
|
41578
41887
|
time
|
41579
41888
|
applicationHash
|
41580
|
-
messageReceiptRoot
|
41581
|
-
messageReceiptCount
|
41582
41889
|
}
|
41583
41890
|
sender
|
41584
41891
|
recipient
|
@@ -41597,8 +41904,8 @@ ${TransactionStatusFragmentFragmentDoc}`;
|
|
41597
41904
|
var BlockFragmentFragmentDoc = lib_default2`
|
41598
41905
|
fragment blockFragment on Block {
|
41599
41906
|
id
|
41907
|
+
height
|
41600
41908
|
header {
|
41601
|
-
height
|
41602
41909
|
time
|
41603
41910
|
}
|
41604
41911
|
transactions {
|
@@ -41656,6 +41963,11 @@ ${TransactionStatusFragmentFragmentDoc}`;
|
|
41656
41963
|
`;
|
41657
41964
|
var GasCostsFragmentFragmentDoc = lib_default2`
|
41658
41965
|
fragment GasCostsFragment on GasCosts {
|
41966
|
+
version {
|
41967
|
+
... on Version {
|
41968
|
+
value
|
41969
|
+
}
|
41970
|
+
}
|
41659
41971
|
add
|
41660
41972
|
addi
|
41661
41973
|
aloc
|
@@ -41668,7 +41980,6 @@ ${TransactionStatusFragmentFragmentDoc}`;
|
|
41668
41980
|
cb
|
41669
41981
|
cfei
|
41670
41982
|
cfsi
|
41671
|
-
croo
|
41672
41983
|
div
|
41673
41984
|
divi
|
41674
41985
|
ecr1
|
@@ -41751,6 +42062,9 @@ ${TransactionStatusFragmentFragmentDoc}`;
|
|
41751
42062
|
ccp {
|
41752
42063
|
...DependentCostFragment
|
41753
42064
|
}
|
42065
|
+
croo {
|
42066
|
+
...DependentCostFragment
|
42067
|
+
}
|
41754
42068
|
csiz {
|
41755
42069
|
...DependentCostFragment
|
41756
42070
|
}
|
@@ -41810,6 +42124,11 @@ ${TransactionStatusFragmentFragmentDoc}`;
|
|
41810
42124
|
${DependentCostFragmentFragmentDoc}`;
|
41811
42125
|
var ConsensusParametersFragmentFragmentDoc = lib_default2`
|
41812
42126
|
fragment consensusParametersFragment on ConsensusParameters {
|
42127
|
+
version {
|
42128
|
+
... on Version {
|
42129
|
+
value
|
42130
|
+
}
|
42131
|
+
}
|
41813
42132
|
txParams {
|
41814
42133
|
...TxParametersFragment
|
41815
42134
|
}
|
@@ -41869,18 +42188,9 @@ ${ConsensusParametersFragmentFragmentDoc}`;
|
|
41869
42188
|
fragment nodeInfoFragment on NodeInfo {
|
41870
42189
|
utxoValidation
|
41871
42190
|
vmBacktrace
|
41872
|
-
minGasPrice
|
41873
42191
|
maxTx
|
41874
42192
|
maxDepth
|
41875
42193
|
nodeVersion
|
41876
|
-
peers {
|
41877
|
-
id
|
41878
|
-
addresses
|
41879
|
-
clientVersion
|
41880
|
-
blockHeight
|
41881
|
-
lastHeartbeatMs
|
41882
|
-
appScore
|
41883
|
-
}
|
41884
42194
|
}
|
41885
42195
|
`;
|
41886
42196
|
var GetVersionDocument = lib_default2`
|
@@ -41915,13 +42225,9 @@ ${ConsensusParametersFragmentFragmentDoc}`;
|
|
41915
42225
|
query getTransactionWithReceipts($transactionId: TransactionId!) {
|
41916
42226
|
transaction(id: $transactionId) {
|
41917
42227
|
...transactionFragment
|
41918
|
-
receipts {
|
41919
|
-
...receiptFragment
|
41920
|
-
}
|
41921
42228
|
}
|
41922
42229
|
}
|
41923
|
-
${TransactionFragmentFragmentDoc}
|
41924
|
-
${ReceiptFragmentFragmentDoc}`;
|
42230
|
+
${TransactionFragmentFragmentDoc}`;
|
41925
42231
|
var GetTransactionsDocument = lib_default2`
|
41926
42232
|
query getTransactions($after: String, $before: String, $first: Int, $last: Int) {
|
41927
42233
|
transactions(after: $after, before: $before, first: $first, last: $last) {
|
@@ -42049,6 +42355,20 @@ ${MessageCoinFragmentFragmentDoc}`;
|
|
42049
42355
|
}
|
42050
42356
|
}
|
42051
42357
|
${BalanceFragmentFragmentDoc}`;
|
42358
|
+
var GetLatestGasPriceDocument = lib_default2`
|
42359
|
+
query getLatestGasPrice {
|
42360
|
+
latestGasPrice {
|
42361
|
+
gasPrice
|
42362
|
+
}
|
42363
|
+
}
|
42364
|
+
`;
|
42365
|
+
var EstimateGasPriceDocument = lib_default2`
|
42366
|
+
query estimateGasPrice($blockHorizon: U32!) {
|
42367
|
+
estimateGasPrice(blockHorizon: $blockHorizon) {
|
42368
|
+
gasPrice
|
42369
|
+
}
|
42370
|
+
}
|
42371
|
+
`;
|
42052
42372
|
var GetBalancesDocument = lib_default2`
|
42053
42373
|
query getBalances($filter: BalanceFilterInput!, $after: String, $before: String, $first: Int, $last: Int) {
|
42054
42374
|
balances(
|
@@ -42103,12 +42423,12 @@ ${MessageCoinFragmentFragmentDoc}`;
|
|
42103
42423
|
}
|
42104
42424
|
`;
|
42105
42425
|
var DryRunDocument = lib_default2`
|
42106
|
-
mutation dryRun($
|
42107
|
-
dryRun(
|
42108
|
-
...
|
42426
|
+
mutation dryRun($encodedTransactions: [HexString!]!, $utxoValidation: Boolean) {
|
42427
|
+
dryRun(txs: $encodedTransactions, utxoValidation: $utxoValidation) {
|
42428
|
+
...dryRunTransactionExecutionStatusFragment
|
42109
42429
|
}
|
42110
42430
|
}
|
42111
|
-
${
|
42431
|
+
${DryRunTransactionExecutionStatusFragmentFragmentDoc}`;
|
42112
42432
|
var SubmitDocument = lib_default2`
|
42113
42433
|
mutation submit($encodedTransaction: HexString!) {
|
42114
42434
|
submit(tx: $encodedTransaction) {
|
@@ -42127,17 +42447,17 @@ ${MessageCoinFragmentFragmentDoc}`;
|
|
42127
42447
|
var SubmitAndAwaitDocument = lib_default2`
|
42128
42448
|
subscription submitAndAwait($encodedTransaction: HexString!) {
|
42129
42449
|
submitAndAwait(tx: $encodedTransaction) {
|
42130
|
-
...
|
42450
|
+
...transactionStatusSubscriptionFragment
|
42131
42451
|
}
|
42132
42452
|
}
|
42133
|
-
${
|
42453
|
+
${TransactionStatusSubscriptionFragmentFragmentDoc}`;
|
42134
42454
|
var StatusChangeDocument = lib_default2`
|
42135
42455
|
subscription statusChange($transactionId: TransactionId!) {
|
42136
42456
|
statusChange(id: $transactionId) {
|
42137
|
-
...
|
42457
|
+
...transactionStatusSubscriptionFragment
|
42138
42458
|
}
|
42139
42459
|
}
|
42140
|
-
${
|
42460
|
+
${TransactionStatusSubscriptionFragmentFragmentDoc}`;
|
42141
42461
|
function getSdk(requester) {
|
42142
42462
|
return {
|
42143
42463
|
getVersion(variables, options) {
|
@@ -42191,6 +42511,12 @@ ${MessageCoinFragmentFragmentDoc}`;
|
|
42191
42511
|
getBalance(variables, options) {
|
42192
42512
|
return requester(GetBalanceDocument, variables, options);
|
42193
42513
|
},
|
42514
|
+
getLatestGasPrice(variables, options) {
|
42515
|
+
return requester(GetLatestGasPriceDocument, variables, options);
|
42516
|
+
},
|
42517
|
+
estimateGasPrice(variables, options) {
|
42518
|
+
return requester(EstimateGasPriceDocument, variables, options);
|
42519
|
+
},
|
42194
42520
|
getBalances(variables, options) {
|
42195
42521
|
return requester(GetBalancesDocument, variables, options);
|
42196
42522
|
},
|
@@ -42374,10 +42700,9 @@ ${MessageCoinFragmentFragmentDoc}`;
|
|
42374
42700
|
txIndex: toNumber2(arrayify(value.txPointer).slice(8, 16))
|
42375
42701
|
},
|
42376
42702
|
witnessIndex: value.witnessIndex,
|
42377
|
-
maturity: value.maturity ?? 0,
|
42378
42703
|
predicateGasUsed: bn(value.predicateGasUsed),
|
42379
|
-
predicateLength: predicate.length,
|
42380
|
-
predicateDataLength: predicateData.length,
|
42704
|
+
predicateLength: bn(predicate.length),
|
42705
|
+
predicateDataLength: bn(predicateData.length),
|
42381
42706
|
predicate: hexlify(predicate),
|
42382
42707
|
predicateData: hexlify(predicateData)
|
42383
42708
|
};
|
@@ -42408,8 +42733,8 @@ ${MessageCoinFragmentFragmentDoc}`;
|
|
42408
42733
|
nonce: hexlify(value.nonce),
|
42409
42734
|
witnessIndex: value.witnessIndex,
|
42410
42735
|
predicateGasUsed: bn(value.predicateGasUsed),
|
42411
|
-
predicateLength: predicate.length,
|
42412
|
-
predicateDataLength: predicateData.length,
|
42736
|
+
predicateLength: bn(predicate.length),
|
42737
|
+
predicateDataLength: bn(predicateData.length),
|
42413
42738
|
predicate: hexlify(predicate),
|
42414
42739
|
predicateData: hexlify(predicateData),
|
42415
42740
|
data: hexlify(data),
|
@@ -42566,8 +42891,8 @@ ${MessageCoinFragmentFragmentDoc}`;
|
|
42566
42891
|
case "CALL" /* Call */: {
|
42567
42892
|
const callReceipt = {
|
42568
42893
|
type: ReceiptType.Call,
|
42569
|
-
from: hexOrZero(receipt.
|
42570
|
-
to: hexOrZero(receipt?.to
|
42894
|
+
from: hexOrZero(receipt.id || receipt.contractId),
|
42895
|
+
to: hexOrZero(receipt?.to),
|
42571
42896
|
amount: bn(receipt.amount),
|
42572
42897
|
assetId: hexOrZero(receipt.assetId),
|
42573
42898
|
gas: bn(receipt.gas),
|
@@ -42581,7 +42906,7 @@ ${MessageCoinFragmentFragmentDoc}`;
|
|
42581
42906
|
case "RETURN" /* Return */: {
|
42582
42907
|
const returnReceipt = {
|
42583
42908
|
type: ReceiptType.Return,
|
42584
|
-
id: hexOrZero(receipt.
|
42909
|
+
id: hexOrZero(receipt.id || receipt.contractId),
|
42585
42910
|
val: bn(receipt.val),
|
42586
42911
|
pc: bn(receipt.pc),
|
42587
42912
|
is: bn(receipt.is)
|
@@ -42591,7 +42916,7 @@ ${MessageCoinFragmentFragmentDoc}`;
|
|
42591
42916
|
case "RETURN_DATA" /* ReturnData */: {
|
42592
42917
|
const returnDataReceipt = {
|
42593
42918
|
type: ReceiptType.ReturnData,
|
42594
|
-
id: hexOrZero(receipt.
|
42919
|
+
id: hexOrZero(receipt.id || receipt.contractId),
|
42595
42920
|
ptr: bn(receipt.ptr),
|
42596
42921
|
len: bn(receipt.len),
|
42597
42922
|
digest: hexOrZero(receipt.digest),
|
@@ -42603,7 +42928,7 @@ ${MessageCoinFragmentFragmentDoc}`;
|
|
42603
42928
|
case "PANIC" /* Panic */: {
|
42604
42929
|
const panicReceipt = {
|
42605
42930
|
type: ReceiptType.Panic,
|
42606
|
-
id: hexOrZero(receipt.
|
42931
|
+
id: hexOrZero(receipt.id),
|
42607
42932
|
reason: bn(receipt.reason),
|
42608
42933
|
pc: bn(receipt.pc),
|
42609
42934
|
is: bn(receipt.is),
|
@@ -42614,7 +42939,7 @@ ${MessageCoinFragmentFragmentDoc}`;
|
|
42614
42939
|
case "REVERT" /* Revert */: {
|
42615
42940
|
const revertReceipt = {
|
42616
42941
|
type: ReceiptType.Revert,
|
42617
|
-
id: hexOrZero(receipt.
|
42942
|
+
id: hexOrZero(receipt.id || receipt.contractId),
|
42618
42943
|
val: bn(receipt.ra),
|
42619
42944
|
pc: bn(receipt.pc),
|
42620
42945
|
is: bn(receipt.is)
|
@@ -42624,7 +42949,7 @@ ${MessageCoinFragmentFragmentDoc}`;
|
|
42624
42949
|
case "LOG" /* Log */: {
|
42625
42950
|
const logReceipt = {
|
42626
42951
|
type: ReceiptType.Log,
|
42627
|
-
id: hexOrZero(receipt.
|
42952
|
+
id: hexOrZero(receipt.id || receipt.contractId),
|
42628
42953
|
val0: bn(receipt.ra),
|
42629
42954
|
val1: bn(receipt.rb),
|
42630
42955
|
val2: bn(receipt.rc),
|
@@ -42637,7 +42962,7 @@ ${MessageCoinFragmentFragmentDoc}`;
|
|
42637
42962
|
case "LOG_DATA" /* LogData */: {
|
42638
42963
|
const logDataReceipt = {
|
42639
42964
|
type: ReceiptType.LogData,
|
42640
|
-
id: hexOrZero(receipt.
|
42965
|
+
id: hexOrZero(receipt.id || receipt.contractId),
|
42641
42966
|
val0: bn(receipt.ra),
|
42642
42967
|
val1: bn(receipt.rb),
|
42643
42968
|
ptr: bn(receipt.ptr),
|
@@ -42651,8 +42976,8 @@ ${MessageCoinFragmentFragmentDoc}`;
|
|
42651
42976
|
case "TRANSFER" /* Transfer */: {
|
42652
42977
|
const transferReceipt = {
|
42653
42978
|
type: ReceiptType.Transfer,
|
42654
|
-
from: hexOrZero(receipt.
|
42655
|
-
to: hexOrZero(receipt.toAddress || receipt?.to
|
42979
|
+
from: hexOrZero(receipt.id || receipt.contractId),
|
42980
|
+
to: hexOrZero(receipt.toAddress || receipt?.to),
|
42656
42981
|
amount: bn(receipt.amount),
|
42657
42982
|
assetId: hexOrZero(receipt.assetId),
|
42658
42983
|
pc: bn(receipt.pc),
|
@@ -42663,8 +42988,8 @@ ${MessageCoinFragmentFragmentDoc}`;
|
|
42663
42988
|
case "TRANSFER_OUT" /* TransferOut */: {
|
42664
42989
|
const transferOutReceipt = {
|
42665
42990
|
type: ReceiptType.TransferOut,
|
42666
|
-
from: hexOrZero(receipt.
|
42667
|
-
to: hexOrZero(receipt.toAddress || receipt.to
|
42991
|
+
from: hexOrZero(receipt.id || receipt.contractId),
|
42992
|
+
to: hexOrZero(receipt.toAddress || receipt.to),
|
42668
42993
|
amount: bn(receipt.amount),
|
42669
42994
|
assetId: hexOrZero(receipt.assetId),
|
42670
42995
|
pc: bn(receipt.pc),
|
@@ -42707,7 +43032,7 @@ ${MessageCoinFragmentFragmentDoc}`;
|
|
42707
43032
|
return receiptMessageOut;
|
42708
43033
|
}
|
42709
43034
|
case "MINT" /* Mint */: {
|
42710
|
-
const contractId = hexOrZero(receipt.
|
43035
|
+
const contractId = hexOrZero(receipt.id || receipt.contractId);
|
42711
43036
|
const subId = hexOrZero(receipt.subId);
|
42712
43037
|
const assetId = ReceiptMintCoder.getAssetId(contractId, subId);
|
42713
43038
|
const mintReceipt = {
|
@@ -42722,7 +43047,7 @@ ${MessageCoinFragmentFragmentDoc}`;
|
|
42722
43047
|
return mintReceipt;
|
42723
43048
|
}
|
42724
43049
|
case "BURN" /* Burn */: {
|
42725
|
-
const contractId = hexOrZero(receipt.
|
43050
|
+
const contractId = hexOrZero(receipt.id || receipt.contractId);
|
42726
43051
|
const subId = hexOrZero(receipt.subId);
|
42727
43052
|
const assetId = ReceiptBurnCoder.getAssetId(contractId, subId);
|
42728
43053
|
const burnReceipt = {
|
@@ -42742,7 +43067,6 @@ ${MessageCoinFragmentFragmentDoc}`;
|
|
42742
43067
|
}
|
42743
43068
|
|
42744
43069
|
// src/providers/utils/gas.ts
|
42745
|
-
var calculatePriceWithFactor = (gas, gasPrice, priceFactor) => bn(Math.ceil(gas.mul(gasPrice).toNumber() / priceFactor.toNumber()));
|
42746
43070
|
var getGasUsedFromReceipts = (receipts) => {
|
42747
43071
|
const scriptResult = receipts.filter(
|
42748
43072
|
(receipt) => receipt.type === ReceiptType.ScriptResult
|
@@ -42763,18 +43087,28 @@ ${MessageCoinFragmentFragmentDoc}`;
|
|
42763
43087
|
}
|
42764
43088
|
function gasUsedByInputs(inputs, txBytesSize, gasCosts) {
|
42765
43089
|
const witnessCache = [];
|
42766
|
-
const
|
43090
|
+
const chargeableInputs = inputs.filter((input) => {
|
43091
|
+
const isCoinOrMessage = "owner" in input || "sender" in input;
|
43092
|
+
if (isCoinOrMessage) {
|
43093
|
+
if ("predicate" in input && input.predicate && input.predicate !== "0x") {
|
43094
|
+
return true;
|
43095
|
+
}
|
43096
|
+
if (!witnessCache.includes(input.witnessIndex)) {
|
43097
|
+
witnessCache.push(input.witnessIndex);
|
43098
|
+
return true;
|
43099
|
+
}
|
43100
|
+
}
|
43101
|
+
return false;
|
43102
|
+
});
|
43103
|
+
const vmInitializationCost = resolveGasDependentCosts(txBytesSize, gasCosts.vmInitialization);
|
43104
|
+
const totalGas = chargeableInputs.reduce((total, input) => {
|
42767
43105
|
if ("predicate" in input && input.predicate && input.predicate !== "0x") {
|
42768
43106
|
return total.add(
|
42769
|
-
|
43107
|
+
vmInitializationCost.add(resolveGasDependentCosts(arrayify(input.predicate).length, gasCosts.contractRoot)).add(bn(input.predicateGasUsed))
|
42770
43108
|
);
|
42771
43109
|
}
|
42772
|
-
|
42773
|
-
|
42774
|
-
return total.add(gasCosts.ecr1);
|
42775
|
-
}
|
42776
|
-
return total;
|
42777
|
-
}, bn());
|
43110
|
+
return total.add(gasCosts.ecr1);
|
43111
|
+
}, bn(0));
|
42778
43112
|
return totalGas;
|
42779
43113
|
}
|
42780
43114
|
function getMinGas(params) {
|
@@ -42786,12 +43120,20 @@ ${MessageCoinFragmentFragmentDoc}`;
|
|
42786
43120
|
return minGas;
|
42787
43121
|
}
|
42788
43122
|
function getMaxGas(params) {
|
42789
|
-
const {
|
43123
|
+
const {
|
43124
|
+
gasPerByte,
|
43125
|
+
witnessesLength,
|
43126
|
+
witnessLimit,
|
43127
|
+
minGas,
|
43128
|
+
gasLimit = bn(0),
|
43129
|
+
maxGasPerTx
|
43130
|
+
} = params;
|
42790
43131
|
let remainingAllowedWitnessGas = bn(0);
|
42791
43132
|
if (witnessLimit?.gt(0) && witnessLimit.gte(witnessesLength)) {
|
42792
43133
|
remainingAllowedWitnessGas = bn(witnessLimit).sub(witnessesLength).mul(gasPerByte);
|
42793
43134
|
}
|
42794
|
-
|
43135
|
+
const maxGas = remainingAllowedWitnessGas.add(minGas).add(gasLimit);
|
43136
|
+
return maxGas.gte(maxGasPerTx) ? maxGasPerTx : maxGas;
|
42795
43137
|
}
|
42796
43138
|
function calculateMetadataGasForTxCreate({
|
42797
43139
|
gasCosts,
|
@@ -42813,6 +43155,10 @@ ${MessageCoinFragmentFragmentDoc}`;
|
|
42813
43155
|
}) {
|
42814
43156
|
return resolveGasDependentCosts(txBytesSize, gasCosts.s256);
|
42815
43157
|
}
|
43158
|
+
var calculateGasFee = (params) => {
|
43159
|
+
const { gas, gasPrice, priceFactor, tip } = params;
|
43160
|
+
return gas.mul(gasPrice).div(priceFactor).add(tip);
|
43161
|
+
};
|
42816
43162
|
|
42817
43163
|
// src/providers/utils/json.ts
|
42818
43164
|
function normalize2(object) {
|
@@ -42930,11 +43276,6 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
42930
43276
|
name = "NoWitnessAtIndexError";
|
42931
43277
|
};
|
42932
43278
|
|
42933
|
-
// src/providers/transaction-request/helpers.ts
|
42934
|
-
var isRequestInputCoin = (input) => input.type === InputType.Coin;
|
42935
|
-
var isRequestInputMessage = (input) => input.type === InputType.Message;
|
42936
|
-
var isRequestInputResource = (input) => isRequestInputCoin(input) || isRequestInputMessage(input);
|
42937
|
-
|
42938
43279
|
// src/providers/transaction-request/witness.ts
|
42939
43280
|
var witnessify = (value) => {
|
42940
43281
|
const data = arrayify(value);
|
@@ -42947,7 +43288,7 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
42947
43288
|
// src/providers/transaction-request/transaction-request.ts
|
42948
43289
|
var BaseTransactionRequest = class {
|
42949
43290
|
/** Gas price for transaction */
|
42950
|
-
|
43291
|
+
tip;
|
42951
43292
|
/** Block until which tx cannot be included */
|
42952
43293
|
maturity;
|
42953
43294
|
/** The maximum fee payable by this transaction using BASE_ASSET. */
|
@@ -42966,7 +43307,7 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
42966
43307
|
* @param baseTransactionRequest - Optional object containing properties to initialize the transaction request.
|
42967
43308
|
*/
|
42968
43309
|
constructor({
|
42969
|
-
|
43310
|
+
tip,
|
42970
43311
|
maturity,
|
42971
43312
|
maxFee,
|
42972
43313
|
witnessLimit,
|
@@ -42974,7 +43315,7 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
42974
43315
|
outputs,
|
42975
43316
|
witnesses
|
42976
43317
|
} = {}) {
|
42977
|
-
this.
|
43318
|
+
this.tip = bn(tip);
|
42978
43319
|
this.maturity = maturity ?? 0;
|
42979
43320
|
this.witnessLimit = witnessLimit ? bn(witnessLimit) : void 0;
|
42980
43321
|
this.maxFee = maxFee ? bn(maxFee) : void 0;
|
@@ -42985,9 +43326,9 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
42985
43326
|
static getPolicyMeta(req) {
|
42986
43327
|
let policyTypes = 0;
|
42987
43328
|
const policies = [];
|
42988
|
-
if (req.
|
42989
|
-
policyTypes += PolicyType.
|
42990
|
-
policies.push({ data: req.
|
43329
|
+
if (req.tip) {
|
43330
|
+
policyTypes += PolicyType.Tip;
|
43331
|
+
policies.push({ data: req.tip, type: PolicyType.Tip });
|
42991
43332
|
}
|
42992
43333
|
if (req.witnessLimit) {
|
42993
43334
|
policyTypes += PolicyType.WitnessLimit;
|
@@ -43175,9 +43516,9 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
43175
43516
|
* @param predicateData - Predicate data bytes.
|
43176
43517
|
*/
|
43177
43518
|
addCoinInput(coin) {
|
43178
|
-
const { assetId, owner, amount
|
43519
|
+
const { assetId, owner, amount } = coin;
|
43179
43520
|
let witnessIndex;
|
43180
|
-
if (predicate) {
|
43521
|
+
if (coin.predicate) {
|
43181
43522
|
witnessIndex = 0;
|
43182
43523
|
} else {
|
43183
43524
|
witnessIndex = this.getCoinInputWitnessIndexByOwner(owner);
|
@@ -43186,14 +43527,13 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
43186
43527
|
}
|
43187
43528
|
}
|
43188
43529
|
const input = {
|
43189
|
-
|
43530
|
+
...coin,
|
43190
43531
|
type: InputType.Coin,
|
43191
43532
|
owner: owner.toB256(),
|
43192
43533
|
amount,
|
43193
43534
|
assetId,
|
43194
43535
|
txPointer: "0x00000000000000000000000000000000",
|
43195
|
-
witnessIndex
|
43196
|
-
predicate
|
43536
|
+
witnessIndex
|
43197
43537
|
};
|
43198
43538
|
this.pushInput(input);
|
43199
43539
|
this.addChangeOutput(owner, assetId);
|
@@ -43207,10 +43547,10 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
43207
43547
|
* @param predicateData - Predicate data bytes.
|
43208
43548
|
*/
|
43209
43549
|
addMessageInput(message) {
|
43210
|
-
const { recipient, sender, amount
|
43550
|
+
const { recipient, sender, amount } = message;
|
43211
43551
|
const assetId = BaseAssetId;
|
43212
43552
|
let witnessIndex;
|
43213
|
-
if (predicate) {
|
43553
|
+
if (message.predicate) {
|
43214
43554
|
witnessIndex = 0;
|
43215
43555
|
} else {
|
43216
43556
|
witnessIndex = this.getCoinInputWitnessIndexByOwner(recipient);
|
@@ -43219,13 +43559,12 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
43219
43559
|
}
|
43220
43560
|
}
|
43221
43561
|
const input = {
|
43222
|
-
|
43562
|
+
...message,
|
43223
43563
|
type: InputType.Message,
|
43224
43564
|
sender: sender.toB256(),
|
43225
43565
|
recipient: recipient.toB256(),
|
43226
43566
|
amount,
|
43227
|
-
witnessIndex
|
43228
|
-
predicate
|
43567
|
+
witnessIndex
|
43229
43568
|
};
|
43230
43569
|
this.pushInput(input);
|
43231
43570
|
this.addChangeOutput(recipient, assetId);
|
@@ -43335,7 +43674,7 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
43335
43674
|
}
|
43336
43675
|
calculateMaxGas(chainInfo, minGas) {
|
43337
43676
|
const { consensusParameters } = chainInfo;
|
43338
|
-
const { gasPerByte } = consensusParameters;
|
43677
|
+
const { gasPerByte, maxGasPerTx } = consensusParameters;
|
43339
43678
|
const witnessesLength = this.toTransaction().witnesses.reduce(
|
43340
43679
|
(acc, wit) => acc + wit.dataLength,
|
43341
43680
|
0
|
@@ -43344,7 +43683,8 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
43344
43683
|
gasPerByte,
|
43345
43684
|
minGas,
|
43346
43685
|
witnessesLength,
|
43347
|
-
witnessLimit: this.witnessLimit
|
43686
|
+
witnessLimit: this.witnessLimit,
|
43687
|
+
maxGasPerTx
|
43348
43688
|
});
|
43349
43689
|
}
|
43350
43690
|
/**
|
@@ -43362,17 +43702,20 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
43362
43702
|
});
|
43363
43703
|
const updateAssetInput = (assetId, quantity) => {
|
43364
43704
|
const assetInput = findAssetInput(assetId);
|
43705
|
+
let usedQuantity = quantity;
|
43706
|
+
if (assetId === BaseAssetId) {
|
43707
|
+
usedQuantity = bn("1000000000000000000");
|
43708
|
+
}
|
43365
43709
|
if (assetInput && "assetId" in assetInput) {
|
43366
43710
|
assetInput.id = hexlify(randomBytes22(UTXO_ID_LEN));
|
43367
|
-
assetInput.amount =
|
43711
|
+
assetInput.amount = usedQuantity;
|
43368
43712
|
} else {
|
43369
43713
|
this.addResources([
|
43370
43714
|
{
|
43371
43715
|
id: hexlify(randomBytes22(UTXO_ID_LEN)),
|
43372
|
-
amount:
|
43716
|
+
amount: usedQuantity,
|
43373
43717
|
assetId,
|
43374
43718
|
owner: resourcesOwner || Address.fromRandom(),
|
43375
|
-
maturity: 0,
|
43376
43719
|
blockCreated: bn(1),
|
43377
43720
|
txCreatedIdx: bn(1)
|
43378
43721
|
}
|
@@ -43404,11 +43747,7 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
43404
43747
|
toJSON() {
|
43405
43748
|
return normalizeJSON(this);
|
43406
43749
|
}
|
43407
|
-
|
43408
|
-
this.witnesses.splice(index, 1);
|
43409
|
-
this.adjustWitnessIndexes(index);
|
43410
|
-
}
|
43411
|
-
updatePredicateInputs(inputs) {
|
43750
|
+
updatePredicateGasUsed(inputs) {
|
43412
43751
|
this.inputs.forEach((i) => {
|
43413
43752
|
let correspondingInput;
|
43414
43753
|
switch (i.type) {
|
@@ -43430,10 +43769,12 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
43430
43769
|
}
|
43431
43770
|
});
|
43432
43771
|
}
|
43433
|
-
|
43434
|
-
this.inputs.
|
43435
|
-
if (input.
|
43436
|
-
input.
|
43772
|
+
shiftPredicateData() {
|
43773
|
+
this.inputs.forEach((input) => {
|
43774
|
+
if ("predicateData" in input && "paddPredicateData" in input && typeof input.paddPredicateData === "function") {
|
43775
|
+
input.predicateData = input.paddPredicateData(
|
43776
|
+
BaseTransactionRequest.getPolicyMeta(this).policies.length
|
43777
|
+
);
|
43437
43778
|
}
|
43438
43779
|
});
|
43439
43780
|
}
|
@@ -43570,9 +43911,8 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
43570
43911
|
return {
|
43571
43912
|
type: TransactionType.Create,
|
43572
43913
|
...baseTransaction,
|
43573
|
-
bytecodeLength: baseTransaction.witnesses[bytecodeWitnessIndex].dataLength / 4,
|
43574
43914
|
bytecodeWitnessIndex,
|
43575
|
-
storageSlotsCount: storageSlots.length,
|
43915
|
+
storageSlotsCount: bn(storageSlots.length),
|
43576
43916
|
salt: this.salt ? hexlify(this.salt) : ZeroBytes32,
|
43577
43917
|
storageSlots
|
43578
43918
|
};
|
@@ -43686,8 +44026,8 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
43686
44026
|
type: TransactionType.Script,
|
43687
44027
|
scriptGasLimit: this.gasLimit,
|
43688
44028
|
...super.getBaseTransaction(),
|
43689
|
-
scriptLength: script.length,
|
43690
|
-
scriptDataLength: scriptData.length,
|
44029
|
+
scriptLength: bn(script.length),
|
44030
|
+
scriptDataLength: bn(scriptData.length),
|
43691
44031
|
receiptsRoot: ZeroBytes32,
|
43692
44032
|
script: hexlify(script),
|
43693
44033
|
scriptData: hexlify(scriptData)
|
@@ -43751,7 +44091,7 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
43751
44091
|
}
|
43752
44092
|
calculateMaxGas(chainInfo, minGas) {
|
43753
44093
|
const { consensusParameters } = chainInfo;
|
43754
|
-
const { gasPerByte } = consensusParameters;
|
44094
|
+
const { gasPerByte, maxGasPerTx } = consensusParameters;
|
43755
44095
|
const witnessesLength = this.toTransaction().witnesses.reduce(
|
43756
44096
|
(acc, wit) => acc + wit.dataLength,
|
43757
44097
|
0
|
@@ -43761,7 +44101,8 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
43761
44101
|
minGas,
|
43762
44102
|
witnessesLength,
|
43763
44103
|
witnessLimit: this.witnessLimit,
|
43764
|
-
gasLimit: this.gasLimit
|
44104
|
+
gasLimit: this.gasLimit,
|
44105
|
+
maxGasPerTx
|
43765
44106
|
});
|
43766
44107
|
}
|
43767
44108
|
/**
|
@@ -43834,13 +44175,29 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
43834
44175
|
}
|
43835
44176
|
}
|
43836
44177
|
};
|
44178
|
+
var cacheTxInputsFromOwner = (inputs, owner) => inputs.reduce(
|
44179
|
+
(acc, input) => {
|
44180
|
+
if (input.type === InputType.Coin && input.owner === owner) {
|
44181
|
+
acc.utxos.push(input.id);
|
44182
|
+
}
|
44183
|
+
if (input.type === InputType.Message && input.recipient === owner) {
|
44184
|
+
acc.messages.push(input.nonce);
|
44185
|
+
}
|
44186
|
+
return acc;
|
44187
|
+
},
|
44188
|
+
{
|
44189
|
+
utxos: [],
|
44190
|
+
messages: []
|
44191
|
+
}
|
44192
|
+
);
|
43837
44193
|
|
43838
44194
|
// src/providers/transaction-summary/calculate-transaction-fee.ts
|
43839
44195
|
var calculateTransactionFee = (params) => {
|
43840
44196
|
const {
|
43841
|
-
|
44197
|
+
gasPrice,
|
43842
44198
|
rawPayload,
|
43843
|
-
|
44199
|
+
tip,
|
44200
|
+
consensusParameters: { gasCosts, feeParams, maxGasPerTx }
|
43844
44201
|
} = params;
|
43845
44202
|
const gasPerByte = bn(feeParams.gasPerByte);
|
43846
44203
|
const gasPriceFactor = bn(feeParams.gasPriceFactor);
|
@@ -43850,8 +44207,7 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
43850
44207
|
return {
|
43851
44208
|
fee: bn(0),
|
43852
44209
|
minFee: bn(0),
|
43853
|
-
maxFee: bn(0)
|
43854
|
-
feeFromGasUsed: bn(0)
|
44210
|
+
maxFee: bn(0)
|
43855
44211
|
};
|
43856
44212
|
}
|
43857
44213
|
const { type: type3, witnesses, inputs, policies } = transaction;
|
@@ -43883,7 +44239,6 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
43883
44239
|
metadataGas,
|
43884
44240
|
txBytesSize: transactionBytes.length
|
43885
44241
|
});
|
43886
|
-
const gasPrice = bn(policies.find((policy) => policy.type === PolicyType.GasPrice)?.data);
|
43887
44242
|
const witnessLimit = policies.find((policy) => policy.type === PolicyType.WitnessLimit)?.data;
|
43888
44243
|
const witnessesLength = witnesses.reduce((acc, wit) => acc + wit.dataLength, 0);
|
43889
44244
|
const maxGas = getMaxGas({
|
@@ -43891,17 +44246,25 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
43891
44246
|
minGas,
|
43892
44247
|
witnessesLength,
|
43893
44248
|
gasLimit,
|
43894
|
-
witnessLimit
|
44249
|
+
witnessLimit,
|
44250
|
+
maxGasPerTx
|
44251
|
+
});
|
44252
|
+
const minFee = calculateGasFee({
|
44253
|
+
gasPrice,
|
44254
|
+
gas: minGas,
|
44255
|
+
priceFactor: gasPriceFactor,
|
44256
|
+
tip
|
44257
|
+
});
|
44258
|
+
const maxFee = calculateGasFee({
|
44259
|
+
gasPrice,
|
44260
|
+
gas: maxGas,
|
44261
|
+
priceFactor: gasPriceFactor,
|
44262
|
+
tip
|
43895
44263
|
});
|
43896
|
-
const feeFromGasUsed = calculatePriceWithFactor(gasUsed, gasPrice, gasPriceFactor);
|
43897
|
-
const minFee = calculatePriceWithFactor(minGas, gasPrice, gasPriceFactor);
|
43898
|
-
const maxFee = calculatePriceWithFactor(maxGas, gasPrice, gasPriceFactor);
|
43899
|
-
const fee = minFee.add(feeFromGasUsed);
|
43900
44264
|
return {
|
43901
|
-
fee,
|
43902
44265
|
minFee,
|
43903
44266
|
maxFee,
|
43904
|
-
|
44267
|
+
fee: maxFee
|
43905
44268
|
};
|
43906
44269
|
};
|
43907
44270
|
|
@@ -44455,7 +44818,9 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
44455
44818
|
gqlTransactionStatus,
|
44456
44819
|
abiMap = {},
|
44457
44820
|
maxInputs,
|
44458
|
-
gasCosts
|
44821
|
+
gasCosts,
|
44822
|
+
maxGasPerTx,
|
44823
|
+
gasPrice
|
44459
44824
|
} = params;
|
44460
44825
|
const gasUsed = getGasUsedFromReceipts(receipts);
|
44461
44826
|
const rawPayload = hexlify(transactionBytes);
|
@@ -44469,11 +44834,14 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
44469
44834
|
maxInputs
|
44470
44835
|
});
|
44471
44836
|
const typeName = getTransactionTypeName(transaction.type);
|
44837
|
+
const tip = bn(transaction.policies?.find((policy) => policy.type === PolicyType.Tip)?.data);
|
44472
44838
|
const { fee } = calculateTransactionFee({
|
44473
|
-
|
44839
|
+
gasPrice,
|
44474
44840
|
rawPayload,
|
44841
|
+
tip,
|
44475
44842
|
consensusParameters: {
|
44476
44843
|
gasCosts,
|
44844
|
+
maxGasPerTx,
|
44477
44845
|
feeParams: {
|
44478
44846
|
gasPerByte,
|
44479
44847
|
gasPriceFactor
|
@@ -44609,8 +44977,13 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
44609
44977
|
const decodedTransaction = this.decodeTransaction(
|
44610
44978
|
transaction
|
44611
44979
|
);
|
44612
|
-
|
44613
|
-
|
44980
|
+
let txReceipts = [];
|
44981
|
+
if (transaction?.status && "receipts" in transaction.status) {
|
44982
|
+
txReceipts = transaction.status.receipts;
|
44983
|
+
}
|
44984
|
+
const receipts = txReceipts.map(processGqlReceipt) || [];
|
44985
|
+
const { gasPerByte, gasPriceFactor, gasCosts, maxGasPerTx } = this.provider.getGasConfig();
|
44986
|
+
const gasPrice = await this.provider.getLatestGasPrice();
|
44614
44987
|
const maxInputs = this.provider.getChain().consensusParameters.maxInputs;
|
44615
44988
|
const transactionSummary = assembleTransactionSummary({
|
44616
44989
|
id: this.id,
|
@@ -44622,7 +44995,9 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
44622
44995
|
gasPriceFactor,
|
44623
44996
|
abiMap: contractsAbiMap,
|
44624
44997
|
maxInputs,
|
44625
|
-
gasCosts
|
44998
|
+
gasCosts,
|
44999
|
+
maxGasPerTx,
|
45000
|
+
gasPrice
|
44626
45001
|
});
|
44627
45002
|
return transactionSummary;
|
44628
45003
|
}
|
@@ -44771,7 +45146,7 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
44771
45146
|
gasCosts,
|
44772
45147
|
latestBlock: {
|
44773
45148
|
id: latestBlock.id,
|
44774
|
-
height: bn(latestBlock.
|
45149
|
+
height: bn(latestBlock.height),
|
44775
45150
|
time: latestBlock.header.time,
|
44776
45151
|
transactions: latestBlock.transactions.map((i) => ({
|
44777
45152
|
id: i.id
|
@@ -44865,10 +45240,8 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
44865
45240
|
* Returns some helpful parameters related to gas fees.
|
44866
45241
|
*/
|
44867
45242
|
getGasConfig() {
|
44868
|
-
const { minGasPrice } = this.getNode();
|
44869
45243
|
const { maxGasPerTx, maxGasPerPredicate, gasPriceFactor, gasPerByte, gasCosts } = this.getChain().consensusParameters;
|
44870
45244
|
return {
|
44871
|
-
minGasPrice,
|
44872
45245
|
maxGasPerTx,
|
44873
45246
|
maxGasPerPredicate,
|
44874
45247
|
gasPriceFactor,
|
@@ -44966,7 +45339,7 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
44966
45339
|
*/
|
44967
45340
|
async getBlockNumber() {
|
44968
45341
|
const { chain } = await this.operations.getChain();
|
44969
|
-
return bn(chain.latestBlock.
|
45342
|
+
return bn(chain.latestBlock.height, 10);
|
44970
45343
|
}
|
44971
45344
|
/**
|
44972
45345
|
* Returns the chain information.
|
@@ -44978,11 +45351,9 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
44978
45351
|
const processedNodeInfo = {
|
44979
45352
|
maxDepth: bn(nodeInfo.maxDepth),
|
44980
45353
|
maxTx: bn(nodeInfo.maxTx),
|
44981
|
-
minGasPrice: bn(nodeInfo.minGasPrice),
|
44982
45354
|
nodeVersion: nodeInfo.nodeVersion,
|
44983
45355
|
utxoValidation: nodeInfo.utxoValidation,
|
44984
|
-
vmBacktrace: nodeInfo.vmBacktrace
|
44985
|
-
peers: nodeInfo.peers
|
45356
|
+
vmBacktrace: nodeInfo.vmBacktrace
|
44986
45357
|
};
|
44987
45358
|
_Provider.nodeInfoCache[this.url] = processedNodeInfo;
|
44988
45359
|
return processedNodeInfo;
|
@@ -45068,14 +45439,13 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
45068
45439
|
return this.estimateTxDependencies(transactionRequest);
|
45069
45440
|
}
|
45070
45441
|
const encodedTransaction = hexlify(transactionRequest.toTransactionBytes());
|
45071
|
-
const { dryRun:
|
45072
|
-
encodedTransaction,
|
45442
|
+
const { dryRun: dryRunStatuses } = await this.operations.dryRun({
|
45443
|
+
encodedTransactions: encodedTransaction,
|
45073
45444
|
utxoValidation: utxoValidation || false
|
45074
45445
|
});
|
45075
|
-
const receipts =
|
45076
|
-
|
45077
|
-
|
45078
|
-
};
|
45446
|
+
const [{ receipts: rawReceipts, status }] = dryRunStatuses;
|
45447
|
+
const receipts = rawReceipts.map(processGqlReceipt);
|
45448
|
+
return { receipts, dryrunStatus: status };
|
45079
45449
|
}
|
45080
45450
|
/**
|
45081
45451
|
* Verifies whether enough gas is available to complete transaction.
|
@@ -45114,9 +45484,6 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
45114
45484
|
* If there are missing variable outputs,
|
45115
45485
|
* `addVariableOutputs` is called on the transaction.
|
45116
45486
|
*
|
45117
|
-
* @privateRemarks
|
45118
|
-
* TODO: Investigate support for missing contract IDs
|
45119
|
-
* TODO: Add support for missing output messages
|
45120
45487
|
*
|
45121
45488
|
* @param transactionRequest - The transaction request object.
|
45122
45489
|
* @returns A promise.
|
@@ -45129,16 +45496,19 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
45129
45496
|
missingContractIds: []
|
45130
45497
|
};
|
45131
45498
|
}
|
45132
|
-
await this.estimatePredicates(transactionRequest);
|
45133
45499
|
let receipts = [];
|
45134
45500
|
const missingContractIds = [];
|
45135
45501
|
let outputVariables = 0;
|
45502
|
+
let dryrunStatus;
|
45136
45503
|
for (let attempt = 0; attempt < MAX_RETRIES; attempt++) {
|
45137
|
-
const {
|
45138
|
-
|
45504
|
+
const {
|
45505
|
+
dryRun: [{ receipts: rawReceipts, status }]
|
45506
|
+
} = await this.operations.dryRun({
|
45507
|
+
encodedTransactions: [hexlify(transactionRequest.toTransactionBytes())],
|
45139
45508
|
utxoValidation: false
|
45140
45509
|
});
|
45141
|
-
receipts =
|
45510
|
+
receipts = rawReceipts.map(processGqlReceipt);
|
45511
|
+
dryrunStatus = status;
|
45142
45512
|
const { missingOutputVariables, missingOutputContractIds } = getReceiptsWithMissingData(receipts);
|
45143
45513
|
const hasMissingOutputs = missingOutputVariables.length !== 0 || missingOutputContractIds.length !== 0;
|
45144
45514
|
if (hasMissingOutputs) {
|
@@ -45148,6 +45518,10 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
45148
45518
|
transactionRequest.addContractInputAndOutput(Address.fromString(contractId));
|
45149
45519
|
missingContractIds.push(contractId);
|
45150
45520
|
});
|
45521
|
+
const { maxFee } = await this.estimateTxGasAndFee({
|
45522
|
+
transactionRequest
|
45523
|
+
});
|
45524
|
+
transactionRequest.maxFee = maxFee;
|
45151
45525
|
} else {
|
45152
45526
|
break;
|
45153
45527
|
}
|
@@ -45155,37 +45529,139 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
45155
45529
|
return {
|
45156
45530
|
receipts,
|
45157
45531
|
outputVariables,
|
45158
|
-
missingContractIds
|
45532
|
+
missingContractIds,
|
45533
|
+
dryrunStatus
|
45159
45534
|
};
|
45160
45535
|
}
|
45536
|
+
/**
|
45537
|
+
* Dry runs multiple transactions and checks for missing dependencies in batches.
|
45538
|
+
*
|
45539
|
+
* Transactions are dry run in batches. After each dry run, transactions requiring
|
45540
|
+
* further modifications are identified. The method iteratively updates these transactions
|
45541
|
+
* and performs subsequent dry runs until all dependencies for each transaction are satisfied.
|
45542
|
+
*
|
45543
|
+
* @param transactionRequests - Array of transaction request objects.
|
45544
|
+
* @returns A promise that resolves to an array of results for each transaction.
|
45545
|
+
*/
|
45546
|
+
async estimateMultipleTxDependencies(transactionRequests) {
|
45547
|
+
const results = transactionRequests.map(() => ({
|
45548
|
+
receipts: [],
|
45549
|
+
outputVariables: 0,
|
45550
|
+
missingContractIds: [],
|
45551
|
+
dryrunStatus: void 0
|
45552
|
+
}));
|
45553
|
+
const allRequests = clone_default(transactionRequests);
|
45554
|
+
const serializedTransactionsMap = /* @__PURE__ */ new Map();
|
45555
|
+
allRequests.forEach((req, index) => {
|
45556
|
+
if (req.type === TransactionType.Script) {
|
45557
|
+
serializedTransactionsMap.set(index, hexlify(req.toTransactionBytes()));
|
45558
|
+
}
|
45559
|
+
});
|
45560
|
+
let transactionsToProcess = Array.from(serializedTransactionsMap.keys());
|
45561
|
+
let attempt = 0;
|
45562
|
+
while (transactionsToProcess.length > 0 && attempt < MAX_RETRIES) {
|
45563
|
+
const encodedTransactions = transactionsToProcess.map(
|
45564
|
+
(index) => serializedTransactionsMap.get(index)
|
45565
|
+
);
|
45566
|
+
const dryRunResults = await this.operations.dryRun({
|
45567
|
+
encodedTransactions,
|
45568
|
+
utxoValidation: false
|
45569
|
+
});
|
45570
|
+
const nextRoundTransactions = [];
|
45571
|
+
for (let i = 0; i < dryRunResults.dryRun.length; i++) {
|
45572
|
+
const currentResultIndex = transactionsToProcess[i];
|
45573
|
+
const { receipts: rawReceipts, status } = dryRunResults.dryRun[i];
|
45574
|
+
results[currentResultIndex].receipts = rawReceipts.map(processGqlReceipt);
|
45575
|
+
results[currentResultIndex].dryrunStatus = status;
|
45576
|
+
const { missingOutputVariables, missingOutputContractIds } = getReceiptsWithMissingData(
|
45577
|
+
results[currentResultIndex].receipts
|
45578
|
+
);
|
45579
|
+
const hasMissingOutputs = missingOutputVariables.length > 0 || missingOutputContractIds.length > 0;
|
45580
|
+
const requestToProcess = allRequests[currentResultIndex];
|
45581
|
+
if (hasMissingOutputs && requestToProcess?.type === TransactionType.Script) {
|
45582
|
+
results[currentResultIndex].outputVariables += missingOutputVariables.length;
|
45583
|
+
requestToProcess.addVariableOutputs(missingOutputVariables.length);
|
45584
|
+
missingOutputContractIds.forEach(({ contractId }) => {
|
45585
|
+
requestToProcess.addContractInputAndOutput(Address.fromString(contractId));
|
45586
|
+
results[currentResultIndex].missingContractIds.push(contractId);
|
45587
|
+
});
|
45588
|
+
const { maxFee } = await this.estimateTxGasAndFee({
|
45589
|
+
transactionRequest: requestToProcess
|
45590
|
+
});
|
45591
|
+
requestToProcess.maxFee = maxFee;
|
45592
|
+
serializedTransactionsMap.set(
|
45593
|
+
currentResultIndex,
|
45594
|
+
hexlify(requestToProcess.toTransactionBytes())
|
45595
|
+
);
|
45596
|
+
nextRoundTransactions.push(currentResultIndex);
|
45597
|
+
allRequests[currentResultIndex] = requestToProcess;
|
45598
|
+
}
|
45599
|
+
}
|
45600
|
+
transactionsToProcess = nextRoundTransactions;
|
45601
|
+
attempt += 1;
|
45602
|
+
}
|
45603
|
+
return results;
|
45604
|
+
}
|
45605
|
+
async dryRunMultipleTransactions(transactionRequests, { utxoValidation, estimateTxDependencies = true } = {}) {
|
45606
|
+
if (estimateTxDependencies) {
|
45607
|
+
return this.estimateMultipleTxDependencies(transactionRequests);
|
45608
|
+
}
|
45609
|
+
const encodedTransactions = transactionRequests.map((tx) => hexlify(tx.toTransactionBytes()));
|
45610
|
+
const { dryRun: dryRunStatuses } = await this.operations.dryRun({
|
45611
|
+
encodedTransactions,
|
45612
|
+
utxoValidation: utxoValidation || false
|
45613
|
+
});
|
45614
|
+
const results = dryRunStatuses.map(({ receipts: rawReceipts, status }) => {
|
45615
|
+
const receipts = rawReceipts.map(processGqlReceipt);
|
45616
|
+
return { receipts, dryrunStatus: status };
|
45617
|
+
});
|
45618
|
+
return results;
|
45619
|
+
}
|
45161
45620
|
/**
|
45162
45621
|
* Estimates the transaction gas and fee based on the provided transaction request.
|
45163
45622
|
* @param transactionRequest - The transaction request object.
|
45164
45623
|
* @returns An object containing the estimated minimum gas, minimum fee, maximum gas, and maximum fee.
|
45165
45624
|
*/
|
45166
|
-
estimateTxGasAndFee(params) {
|
45625
|
+
async estimateTxGasAndFee(params) {
|
45167
45626
|
const { transactionRequest } = params;
|
45168
|
-
|
45627
|
+
let { gasPrice } = params;
|
45169
45628
|
const chainInfo = this.getChain();
|
45170
|
-
const
|
45171
|
-
transactionRequest.gasPrice = gasPrice;
|
45629
|
+
const { gasPriceFactor, maxGasPerTx } = this.getGasConfig();
|
45172
45630
|
const minGas = transactionRequest.calculateMinGas(chainInfo);
|
45173
|
-
|
45631
|
+
if (!gasPrice) {
|
45632
|
+
gasPrice = await this.estimateGasPrice(10);
|
45633
|
+
}
|
45634
|
+
const minFee = calculateGasFee({
|
45635
|
+
gasPrice: bn(gasPrice),
|
45636
|
+
gas: minGas,
|
45637
|
+
priceFactor: gasPriceFactor,
|
45638
|
+
tip: transactionRequest.tip
|
45639
|
+
}).add(1);
|
45640
|
+
let gasLimit = bn(0);
|
45174
45641
|
if (transactionRequest.type === TransactionType.Script) {
|
45642
|
+
gasLimit = transactionRequest.gasLimit;
|
45175
45643
|
if (transactionRequest.gasLimit.eq(0)) {
|
45176
45644
|
transactionRequest.gasLimit = minGas;
|
45177
45645
|
transactionRequest.gasLimit = maxGasPerTx.sub(
|
45178
45646
|
transactionRequest.calculateMaxGas(chainInfo, minGas)
|
45179
45647
|
);
|
45648
|
+
gasLimit = transactionRequest.gasLimit;
|
45180
45649
|
}
|
45181
45650
|
}
|
45182
45651
|
const maxGas = transactionRequest.calculateMaxGas(chainInfo, minGas);
|
45183
|
-
const maxFee =
|
45652
|
+
const maxFee = calculateGasFee({
|
45653
|
+
gasPrice: bn(gasPrice),
|
45654
|
+
gas: maxGas,
|
45655
|
+
priceFactor: gasPriceFactor,
|
45656
|
+
tip: transactionRequest.tip
|
45657
|
+
}).add(1);
|
45184
45658
|
return {
|
45185
45659
|
minGas,
|
45186
45660
|
minFee,
|
45187
45661
|
maxGas,
|
45188
|
-
maxFee
|
45662
|
+
maxFee,
|
45663
|
+
gasPrice,
|
45664
|
+
gasLimit
|
45189
45665
|
};
|
45190
45666
|
}
|
45191
45667
|
/**
|
@@ -45203,15 +45679,17 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
45203
45679
|
if (estimateTxDependencies) {
|
45204
45680
|
return this.estimateTxDependencies(transactionRequest);
|
45205
45681
|
}
|
45206
|
-
const
|
45207
|
-
const { dryRun:
|
45208
|
-
|
45682
|
+
const encodedTransactions = [hexlify(transactionRequest.toTransactionBytes())];
|
45683
|
+
const { dryRun: dryRunStatuses } = await this.operations.dryRun({
|
45684
|
+
encodedTransactions,
|
45209
45685
|
utxoValidation: true
|
45210
45686
|
});
|
45211
|
-
const
|
45212
|
-
|
45213
|
-
receipts
|
45214
|
-
|
45687
|
+
const callResult = dryRunStatuses.map((dryRunStatus) => {
|
45688
|
+
const { id, receipts, status } = dryRunStatus;
|
45689
|
+
const processedReceipts = receipts.map(processGqlReceipt);
|
45690
|
+
return { id, receipts: processedReceipts, status };
|
45691
|
+
});
|
45692
|
+
return { receipts: callResult[0].receipts };
|
45215
45693
|
}
|
45216
45694
|
/**
|
45217
45695
|
* Returns a transaction cost to enable user
|
@@ -45228,77 +45706,79 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
45228
45706
|
* @param tolerance - The tolerance to add on top of the gasUsed.
|
45229
45707
|
* @returns A promise that resolves to the transaction cost object.
|
45230
45708
|
*/
|
45231
|
-
async getTransactionCost(transactionRequestLike,
|
45232
|
-
estimateTxDependencies = true,
|
45233
|
-
estimatePredicates = true,
|
45234
|
-
resourcesOwner,
|
45235
|
-
signatureCallback
|
45236
|
-
} = {}) {
|
45709
|
+
async getTransactionCost(transactionRequestLike, { resourcesOwner, signatureCallback, quantitiesToContract = [] } = {}) {
|
45237
45710
|
const txRequestClone = clone_default(transactionRequestify(transactionRequestLike));
|
45238
|
-
const { minGasPrice } = this.getGasConfig();
|
45239
|
-
const setGasPrice = max(txRequestClone.gasPrice, minGasPrice);
|
45240
45711
|
const isScriptTransaction = txRequestClone.type === TransactionType.Script;
|
45241
45712
|
const coinOutputsQuantities = txRequestClone.getCoinOutputsQuantities();
|
45242
|
-
const allQuantities = mergeQuantities(coinOutputsQuantities,
|
45713
|
+
const allQuantities = mergeQuantities(coinOutputsQuantities, quantitiesToContract);
|
45243
45714
|
txRequestClone.fundWithFakeUtxos(allQuantities, resourcesOwner?.address);
|
45715
|
+
txRequestClone.maxFee = bn(0);
|
45244
45716
|
if (isScriptTransaction) {
|
45245
45717
|
txRequestClone.gasLimit = bn(0);
|
45246
45718
|
}
|
45247
|
-
if (
|
45248
|
-
|
45249
|
-
resourcesOwner.populateTransactionPredicateData(txRequestClone);
|
45250
|
-
}
|
45251
|
-
await this.estimatePredicates(txRequestClone);
|
45719
|
+
if (resourcesOwner && "populateTransactionPredicateData" in resourcesOwner) {
|
45720
|
+
resourcesOwner.populateTransactionPredicateData(txRequestClone);
|
45252
45721
|
}
|
45722
|
+
const signedRequest = clone_default(txRequestClone);
|
45723
|
+
let addedSignatures = 0;
|
45253
45724
|
if (signatureCallback && isScriptTransaction) {
|
45254
|
-
|
45725
|
+
const lengthBefore = signedRequest.witnesses.length;
|
45726
|
+
await signatureCallback(signedRequest);
|
45727
|
+
addedSignatures = signedRequest.witnesses.length - lengthBefore;
|
45255
45728
|
}
|
45256
|
-
|
45257
|
-
|
45729
|
+
await this.estimatePredicates(signedRequest);
|
45730
|
+
let { maxFee, maxGas, minFee, minGas, gasPrice, gasLimit } = await this.estimateTxGasAndFee({
|
45731
|
+
transactionRequest: signedRequest
|
45258
45732
|
});
|
45259
45733
|
let receipts = [];
|
45260
45734
|
let missingContractIds = [];
|
45261
45735
|
let outputVariables = 0;
|
45262
45736
|
let gasUsed = bn(0);
|
45263
|
-
|
45264
|
-
|
45737
|
+
txRequestClone.updatePredicateGasUsed(signedRequest.inputs);
|
45738
|
+
txRequestClone.maxFee = maxFee;
|
45739
|
+
if (isScriptTransaction) {
|
45740
|
+
txRequestClone.gasLimit = gasLimit;
|
45741
|
+
if (signatureCallback) {
|
45742
|
+
await signatureCallback(txRequestClone);
|
45743
|
+
}
|
45265
45744
|
const result = await this.estimateTxDependencies(txRequestClone);
|
45266
45745
|
receipts = result.receipts;
|
45267
45746
|
outputVariables = result.outputVariables;
|
45268
45747
|
missingContractIds = result.missingContractIds;
|
45269
45748
|
gasUsed = isScriptTransaction ? getGasUsedFromReceipts(receipts) : gasUsed;
|
45270
45749
|
txRequestClone.gasLimit = gasUsed;
|
45271
|
-
|
45272
|
-
|
45273
|
-
|
45750
|
+
({ maxFee, maxGas, minFee, minGas, gasPrice } = await this.estimateTxGasAndFee({
|
45751
|
+
transactionRequest: txRequestClone,
|
45752
|
+
gasPrice
|
45274
45753
|
}));
|
45275
45754
|
}
|
45276
45755
|
return {
|
45277
45756
|
requiredQuantities: allQuantities,
|
45278
45757
|
receipts,
|
45279
45758
|
gasUsed,
|
45280
|
-
|
45281
|
-
gasPrice: setGasPrice,
|
45759
|
+
gasPrice,
|
45282
45760
|
minGas,
|
45283
45761
|
maxGas,
|
45284
45762
|
minFee,
|
45285
45763
|
maxFee,
|
45286
|
-
estimatedInputs: txRequestClone.inputs,
|
45287
45764
|
outputVariables,
|
45288
|
-
missingContractIds
|
45765
|
+
missingContractIds,
|
45766
|
+
addedSignatures,
|
45767
|
+
estimatedPredicates: txRequestClone.inputs
|
45289
45768
|
};
|
45290
45769
|
}
|
45291
|
-
async getResourcesForTransaction(owner, transactionRequestLike,
|
45770
|
+
async getResourcesForTransaction(owner, transactionRequestLike, quantitiesToContract = []) {
|
45292
45771
|
const ownerAddress = Address.fromAddressOrString(owner);
|
45293
45772
|
const transactionRequest = transactionRequestify(clone_default(transactionRequestLike));
|
45294
|
-
const transactionCost = await this.getTransactionCost(transactionRequest,
|
45773
|
+
const transactionCost = await this.getTransactionCost(transactionRequest, {
|
45774
|
+
quantitiesToContract
|
45775
|
+
});
|
45295
45776
|
transactionRequest.addResources(
|
45296
45777
|
await this.getResourcesToSpend(ownerAddress, transactionCost.requiredQuantities)
|
45297
45778
|
);
|
45298
|
-
const { requiredQuantities, ...txCost } = await this.getTransactionCost(
|
45299
|
-
|
45300
|
-
|
45301
|
-
);
|
45779
|
+
const { requiredQuantities, ...txCost } = await this.getTransactionCost(transactionRequest, {
|
45780
|
+
quantitiesToContract
|
45781
|
+
});
|
45302
45782
|
const resources = await this.getResourcesToSpend(ownerAddress, requiredQuantities);
|
45303
45783
|
return {
|
45304
45784
|
resources,
|
@@ -45322,7 +45802,6 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
45322
45802
|
assetId: coin.assetId,
|
45323
45803
|
amount: bn(coin.amount),
|
45324
45804
|
owner: Address.fromAddressOrString(coin.owner),
|
45325
|
-
maturity: bn(coin.maturity).toNumber(),
|
45326
45805
|
blockCreated: bn(coin.blockCreated),
|
45327
45806
|
txCreatedIdx: bn(coin.txCreatedIdx)
|
45328
45807
|
}));
|
@@ -45374,7 +45853,6 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
45374
45853
|
amount: bn(coin.amount),
|
45375
45854
|
assetId: coin.assetId,
|
45376
45855
|
owner: Address.fromAddressOrString(coin.owner),
|
45377
|
-
maturity: bn(coin.maturity).toNumber(),
|
45378
45856
|
blockCreated: bn(coin.blockCreated),
|
45379
45857
|
txCreatedIdx: bn(coin.txCreatedIdx)
|
45380
45858
|
};
|
@@ -45407,7 +45885,7 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
45407
45885
|
}
|
45408
45886
|
return {
|
45409
45887
|
id: block2.id,
|
45410
|
-
height: bn(block2.
|
45888
|
+
height: bn(block2.height),
|
45411
45889
|
time: block2.header.time,
|
45412
45890
|
transactionIds: block2.transactions.map((tx) => tx.id)
|
45413
45891
|
};
|
@@ -45422,7 +45900,7 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
45422
45900
|
const { blocks: fetchedData } = await this.operations.getBlocks(params);
|
45423
45901
|
const blocks = fetchedData.edges.map(({ node: block2 }) => ({
|
45424
45902
|
id: block2.id,
|
45425
|
-
height: bn(block2.
|
45903
|
+
height: bn(block2.height),
|
45426
45904
|
time: block2.header.time,
|
45427
45905
|
transactionIds: block2.transactions.map((tx) => tx.id)
|
45428
45906
|
}));
|
@@ -45449,7 +45927,7 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
45449
45927
|
}
|
45450
45928
|
return {
|
45451
45929
|
id: block2.id,
|
45452
|
-
height: bn(block2.
|
45930
|
+
height: bn(block2.height, 10),
|
45453
45931
|
time: block2.header.time,
|
45454
45932
|
transactionIds: block2.transactions.map((tx) => tx.id),
|
45455
45933
|
transactions: block2.transactions.map(
|
@@ -45629,8 +46107,11 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
45629
46107
|
prevRoot: messageBlockHeader.prevRoot,
|
45630
46108
|
time: messageBlockHeader.time,
|
45631
46109
|
applicationHash: messageBlockHeader.applicationHash,
|
45632
|
-
|
45633
|
-
|
46110
|
+
messageReceiptCount: bn(messageBlockHeader.messageReceiptCount),
|
46111
|
+
messageOutboxRoot: messageBlockHeader.messageOutboxRoot,
|
46112
|
+
consensusParametersVersion: messageBlockHeader.consensusParametersVersion,
|
46113
|
+
eventInboxRoot: messageBlockHeader.eventInboxRoot,
|
46114
|
+
stateTransitionBytecodeVersion: messageBlockHeader.stateTransitionBytecodeVersion
|
45634
46115
|
},
|
45635
46116
|
commitBlockHeader: {
|
45636
46117
|
id: commitBlockHeader.id,
|
@@ -45641,8 +46122,11 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
45641
46122
|
prevRoot: commitBlockHeader.prevRoot,
|
45642
46123
|
time: commitBlockHeader.time,
|
45643
46124
|
applicationHash: commitBlockHeader.applicationHash,
|
45644
|
-
|
45645
|
-
|
46125
|
+
messageReceiptCount: bn(commitBlockHeader.messageReceiptCount),
|
46126
|
+
messageOutboxRoot: commitBlockHeader.messageOutboxRoot,
|
46127
|
+
consensusParametersVersion: commitBlockHeader.consensusParametersVersion,
|
46128
|
+
eventInboxRoot: commitBlockHeader.eventInboxRoot,
|
46129
|
+
stateTransitionBytecodeVersion: commitBlockHeader.stateTransitionBytecodeVersion
|
45646
46130
|
},
|
45647
46131
|
sender: Address.fromAddressOrString(sender),
|
45648
46132
|
recipient: Address.fromAddressOrString(recipient),
|
@@ -45651,6 +46135,16 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
45651
46135
|
data
|
45652
46136
|
};
|
45653
46137
|
}
|
46138
|
+
async getLatestGasPrice() {
|
46139
|
+
const { latestGasPrice } = await this.operations.getLatestGasPrice();
|
46140
|
+
return bn(latestGasPrice.gasPrice);
|
46141
|
+
}
|
46142
|
+
async estimateGasPrice(blockHorizon) {
|
46143
|
+
const { estimateGasPrice } = await this.operations.estimateGasPrice({
|
46144
|
+
blockHorizon: String(blockHorizon)
|
46145
|
+
});
|
46146
|
+
return bn(estimateGasPrice.gasPrice);
|
46147
|
+
}
|
45654
46148
|
/**
|
45655
46149
|
* Returns Message Proof for given transaction id and the message id from MessageOut receipt.
|
45656
46150
|
*
|
@@ -45934,36 +46428,33 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
45934
46428
|
* @param fee - The estimated transaction fee.
|
45935
46429
|
* @returns A promise that resolves when the resources are added to the transaction.
|
45936
46430
|
*/
|
45937
|
-
async fund(request,
|
45938
|
-
const
|
46431
|
+
async fund(request, params) {
|
46432
|
+
const { addedSignatures, estimatedPredicates, maxFee: fee, requiredQuantities } = params;
|
46433
|
+
const txRequest = request;
|
46434
|
+
const requiredQuantitiesWithFee = addAmountToCoinQuantities({
|
45939
46435
|
amount: bn(fee),
|
45940
46436
|
assetId: BaseAssetId,
|
45941
|
-
coinQuantities
|
46437
|
+
coinQuantities: requiredQuantities
|
45942
46438
|
});
|
45943
46439
|
const quantitiesDict = {};
|
45944
|
-
|
46440
|
+
requiredQuantitiesWithFee.forEach(({ amount, assetId }) => {
|
45945
46441
|
quantitiesDict[assetId] = {
|
45946
46442
|
required: amount,
|
45947
46443
|
owned: bn(0)
|
45948
46444
|
};
|
45949
46445
|
});
|
45950
|
-
|
45951
|
-
const cachedMessages = [];
|
45952
|
-
const owner = this.address.toB256();
|
45953
|
-
request.inputs.forEach((input) => {
|
46446
|
+
txRequest.inputs.forEach((input) => {
|
45954
46447
|
const isResource = "amount" in input;
|
45955
46448
|
if (isResource) {
|
45956
46449
|
const isCoin2 = "owner" in input;
|
45957
46450
|
if (isCoin2) {
|
45958
46451
|
const assetId = String(input.assetId);
|
45959
|
-
if (
|
46452
|
+
if (quantitiesDict[assetId]) {
|
45960
46453
|
const amount = bn(input.amount);
|
45961
46454
|
quantitiesDict[assetId].owned = quantitiesDict[assetId].owned.add(amount);
|
45962
|
-
cachedUtxos.push(input.id);
|
45963
46455
|
}
|
45964
|
-
} else if (input.
|
46456
|
+
} else if (input.amount && quantitiesDict[BaseAssetId]) {
|
45965
46457
|
quantitiesDict[BaseAssetId].owned = quantitiesDict[BaseAssetId].owned.add(input.amount);
|
45966
|
-
cachedMessages.push(input.nonce);
|
45967
46458
|
}
|
45968
46459
|
}
|
45969
46460
|
});
|
@@ -45978,12 +46469,23 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
45978
46469
|
});
|
45979
46470
|
const needsToBeFunded = missingQuantities.length;
|
45980
46471
|
if (needsToBeFunded) {
|
45981
|
-
const
|
45982
|
-
|
45983
|
-
|
45984
|
-
|
45985
|
-
|
46472
|
+
const excludedIds = cacheTxInputsFromOwner(txRequest.inputs, this.address.toB256());
|
46473
|
+
const resources = await this.getResourcesToSpend(missingQuantities, excludedIds);
|
46474
|
+
txRequest.addResources(resources);
|
46475
|
+
}
|
46476
|
+
txRequest.shiftPredicateData();
|
46477
|
+
txRequest.updatePredicateGasUsed(estimatedPredicates);
|
46478
|
+
const requestToBeReEstimate = clone_default(txRequest);
|
46479
|
+
if (addedSignatures) {
|
46480
|
+
Array.from({ length: addedSignatures }).forEach(
|
46481
|
+
() => requestToBeReEstimate.addEmptyWitness()
|
46482
|
+
);
|
45986
46483
|
}
|
46484
|
+
const { maxFee } = await this.provider.estimateTxGasAndFee({
|
46485
|
+
transactionRequest: requestToBeReEstimate
|
46486
|
+
});
|
46487
|
+
txRequest.maxFee = maxFee;
|
46488
|
+
return txRequest;
|
45987
46489
|
}
|
45988
46490
|
/**
|
45989
46491
|
* A helper that creates a transfer transaction request and returns it.
|
@@ -45991,28 +46493,25 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
45991
46493
|
* @param destination - The address of the destination.
|
45992
46494
|
* @param amount - The amount of coins to transfer.
|
45993
46495
|
* @param assetId - The asset ID of the coins to transfer.
|
45994
|
-
* @param txParams - The transaction parameters (gasLimit,
|
46496
|
+
* @param txParams - The transaction parameters (gasLimit, tip, maturity, maxFee, witnessLimit).
|
45995
46497
|
* @returns A promise that resolves to the prepared transaction request.
|
45996
46498
|
*/
|
45997
46499
|
async createTransfer(destination, amount, assetId = BaseAssetId, txParams = {}) {
|
45998
|
-
const
|
45999
|
-
const params = { gasPrice: minGasPrice, ...txParams };
|
46000
|
-
const request = new ScriptTransactionRequest(params);
|
46500
|
+
const request = new ScriptTransactionRequest(txParams);
|
46001
46501
|
request.addCoinOutput(Address.fromAddressOrString(destination), amount, assetId);
|
46002
|
-
const
|
46502
|
+
const txCost = await this.provider.getTransactionCost(request, {
|
46003
46503
|
estimateTxDependencies: true,
|
46004
46504
|
resourcesOwner: this
|
46005
46505
|
});
|
46006
|
-
|
46007
|
-
|
46008
|
-
|
46009
|
-
|
46010
|
-
|
46011
|
-
|
46012
|
-
|
46013
|
-
|
46014
|
-
await this.fund(request,
|
46015
|
-
request.updatePredicateInputs(estimatedInputs);
|
46506
|
+
if ("gasLimit" in txParams) {
|
46507
|
+
this.validateGas({
|
46508
|
+
gasUsed: txCost.gasUsed,
|
46509
|
+
gasLimit: request.gasLimit
|
46510
|
+
});
|
46511
|
+
}
|
46512
|
+
request.gasLimit = txCost.gasUsed;
|
46513
|
+
request.maxFee = txCost.maxFee;
|
46514
|
+
await this.fund(request, txCost);
|
46016
46515
|
return request;
|
46017
46516
|
}
|
46018
46517
|
/**
|
@@ -46051,31 +46550,30 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
46051
46550
|
);
|
46052
46551
|
}
|
46053
46552
|
const contractAddress = Address.fromAddressOrString(contractId);
|
46054
|
-
const { minGasPrice } = this.provider.getGasConfig();
|
46055
|
-
const params = { gasPrice: minGasPrice, ...txParams };
|
46056
46553
|
const { script, scriptData } = await assembleTransferToContractScript({
|
46057
46554
|
hexlifiedContractId: contractAddress.toB256(),
|
46058
46555
|
amountToTransfer: bn(amount),
|
46059
46556
|
assetId
|
46060
46557
|
});
|
46061
46558
|
const request = new ScriptTransactionRequest({
|
46062
|
-
...
|
46559
|
+
...txParams,
|
46063
46560
|
script,
|
46064
46561
|
scriptData
|
46065
46562
|
});
|
46066
46563
|
request.addContractInputAndOutput(contractAddress);
|
46067
|
-
const
|
46068
|
-
|
46069
|
-
[{ amount: bn(amount), assetId: String(assetId) }]
|
46070
|
-
);
|
46071
|
-
request.gasLimit = bn(params.gasLimit ?? gasUsed);
|
46072
|
-
this.validateGas({
|
46073
|
-
gasUsed,
|
46074
|
-
gasPrice: request.gasPrice,
|
46075
|
-
gasLimit: request.gasLimit,
|
46076
|
-
minGasPrice
|
46564
|
+
const txCost = await this.provider.getTransactionCost(request, {
|
46565
|
+
resourcesOwner: this,
|
46566
|
+
quantitiesToContract: [{ amount: bn(amount), assetId: String(assetId) }]
|
46077
46567
|
});
|
46078
|
-
|
46568
|
+
if (txParams.gasLimit) {
|
46569
|
+
this.validateGas({
|
46570
|
+
gasUsed: txCost.gasUsed,
|
46571
|
+
gasLimit: request.gasLimit
|
46572
|
+
});
|
46573
|
+
}
|
46574
|
+
request.gasLimit = txCost.gasUsed;
|
46575
|
+
request.maxFee = txCost.maxFee;
|
46576
|
+
await this.fund(request, txCost);
|
46079
46577
|
return this.sendTransaction(request);
|
46080
46578
|
}
|
46081
46579
|
/**
|
@@ -46087,7 +46585,6 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
46087
46585
|
* @returns A promise that resolves to the transaction response.
|
46088
46586
|
*/
|
46089
46587
|
async withdrawToBaseLayer(recipient, amount, txParams = {}) {
|
46090
|
-
const { minGasPrice } = this.provider.getGasConfig();
|
46091
46588
|
const recipientAddress = Address.fromAddressOrString(recipient);
|
46092
46589
|
const recipientDataArray = arrayify(
|
46093
46590
|
"0x".concat(recipientAddress.toHexString().substring(2).padStart(64, "0"))
|
@@ -46100,21 +46597,19 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
46100
46597
|
...recipientDataArray,
|
46101
46598
|
...amountDataArray
|
46102
46599
|
]);
|
46103
|
-
const params = { script,
|
46600
|
+
const params = { script, ...txParams };
|
46104
46601
|
const request = new ScriptTransactionRequest(params);
|
46105
|
-
const
|
46106
|
-
const
|
46107
|
-
|
46108
|
-
|
46109
|
-
|
46110
|
-
|
46111
|
-
|
46112
|
-
|
46113
|
-
|
46114
|
-
|
46115
|
-
|
46116
|
-
});
|
46117
|
-
await this.fund(request, requiredQuantities, maxFee);
|
46602
|
+
const quantitiesToContract = [{ amount: bn(amount), assetId: BaseAssetId }];
|
46603
|
+
const txCost = await this.provider.getTransactionCost(request, { quantitiesToContract });
|
46604
|
+
if (txParams.gasLimit) {
|
46605
|
+
this.validateGas({
|
46606
|
+
gasUsed: txCost.gasUsed,
|
46607
|
+
gasLimit: request.gasLimit
|
46608
|
+
});
|
46609
|
+
}
|
46610
|
+
request.maxFee = txCost.maxFee;
|
46611
|
+
request.gasLimit = txCost.gasUsed;
|
46612
|
+
await this.fund(request, txCost);
|
46118
46613
|
return this.sendTransaction(request);
|
46119
46614
|
}
|
46120
46615
|
async signMessage(message) {
|
@@ -46172,18 +46667,7 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
46172
46667
|
}
|
46173
46668
|
return this.provider.simulate(transactionRequest, { estimateTxDependencies: false });
|
46174
46669
|
}
|
46175
|
-
validateGas({
|
46176
|
-
gasUsed,
|
46177
|
-
gasPrice,
|
46178
|
-
gasLimit,
|
46179
|
-
minGasPrice
|
46180
|
-
}) {
|
46181
|
-
if (minGasPrice.gt(gasPrice)) {
|
46182
|
-
throw new FuelError(
|
46183
|
-
ErrorCode.GAS_PRICE_TOO_LOW,
|
46184
|
-
`Gas price '${gasPrice}' is lower than the required: '${minGasPrice}'.`
|
46185
|
-
);
|
46186
|
-
}
|
46670
|
+
validateGas({ gasUsed, gasLimit }) {
|
46187
46671
|
if (gasUsed.gt(gasLimit)) {
|
46188
46672
|
throw new FuelError(
|
46189
46673
|
ErrorCode.GAS_LIMIT_TOO_LOW,
|
@@ -47772,7 +48256,7 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
47772
48256
|
* @param transactionRequestLike - The transaction request to send.
|
47773
48257
|
* @returns A promise that resolves to the TransactionResponse object.
|
47774
48258
|
*/
|
47775
|
-
async sendTransaction(transactionRequestLike, { estimateTxDependencies =
|
48259
|
+
async sendTransaction(transactionRequestLike, { estimateTxDependencies = false, awaitExecution } = {}) {
|
47776
48260
|
const transactionRequest = transactionRequestify(transactionRequestLike);
|
47777
48261
|
if (estimateTxDependencies) {
|
47778
48262
|
await this.provider.estimateTxDependencies(transactionRequest);
|
@@ -50527,26 +51011,20 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
50527
51011
|
__publicField(Wallet, "fromEncryptedJson", WalletUnlocked.fromEncryptedJson);
|
50528
51012
|
|
50529
51013
|
// src/test-utils/seedTestWallet.ts
|
50530
|
-
var seedTestWallet = async (wallet, quantities
|
50531
|
-
const toFundAccounts = Array.isArray(wallet) ? wallet : [wallet];
|
51014
|
+
var seedTestWallet = async (wallet, quantities) => {
|
50532
51015
|
const genesisWallet = new WalletUnlocked(
|
50533
51016
|
process.env.GENESIS_SECRET || randomBytes22(32),
|
50534
|
-
|
51017
|
+
wallet.provider
|
50535
51018
|
);
|
50536
|
-
const
|
50537
|
-
|
50538
|
-
|
50539
|
-
|
50540
|
-
gasPrice: minGasPrice
|
51019
|
+
const request = new ScriptTransactionRequest();
|
51020
|
+
quantities.forEach((quantity) => {
|
51021
|
+
const { amount, assetId } = coinQuantityfy(quantity);
|
51022
|
+
request.addCoinOutput(wallet.address, amount, assetId);
|
50541
51023
|
});
|
50542
|
-
|
50543
|
-
|
50544
|
-
|
50545
|
-
|
50546
|
-
request.addCoinOutput(address, amount.div(utxosAmount), assetId);
|
50547
|
-
}
|
50548
|
-
})
|
50549
|
-
);
|
51024
|
+
const txCost = await genesisWallet.provider.getTransactionCost(request);
|
51025
|
+
request.gasLimit = txCost.gasUsed;
|
51026
|
+
request.maxFee = txCost.maxFee;
|
51027
|
+
await genesisWallet.fund(request, txCost);
|
50550
51028
|
await genesisWallet.sendTransaction(request, { awaitExecution: true });
|
50551
51029
|
};
|
50552
51030
|
|
@@ -50625,12 +51103,12 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
50625
51103
|
// eslint-disable-next-line no-async-promise-executor
|
50626
51104
|
new Promise(async (resolve, reject) => {
|
50627
51105
|
const remainingArgs = extractRemainingArgs(args, [
|
50628
|
-
"--
|
51106
|
+
"--snapshot",
|
50629
51107
|
"--consensus-key",
|
50630
51108
|
"--db-type",
|
50631
51109
|
"--poa-instant"
|
50632
51110
|
]);
|
50633
|
-
const chainConfigPath = getFlagValueFromArgs(args, "--
|
51111
|
+
const chainConfigPath = getFlagValueFromArgs(args, "--snapshot");
|
50634
51112
|
const consensusKey = getFlagValueFromArgs(args, "--consensus-key") || defaultConsensusKey;
|
50635
51113
|
const dbTypeFlagValue = getFlagValueFromArgs(args, "--db-type");
|
50636
51114
|
const useInMemoryDb = dbTypeFlagValue === "in-memory" || dbTypeFlagValue === void 0;
|
@@ -50649,36 +51127,54 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
50649
51127
|
let chainConfigPathToUse;
|
50650
51128
|
const prefix = basePath || import_os.default.tmpdir();
|
50651
51129
|
const suffix = basePath ? "" : (0, import_crypto21.randomUUID)();
|
50652
|
-
const tempDirPath = import_path8.default.join(prefix, ".fuels", suffix);
|
51130
|
+
const tempDirPath = import_path8.default.join(prefix, ".fuels", suffix, "chainConfigs");
|
50653
51131
|
if (chainConfigPath) {
|
50654
51132
|
chainConfigPathToUse = chainConfigPath;
|
50655
51133
|
} else {
|
50656
51134
|
if (!(0, import_fs2.existsSync)(tempDirPath)) {
|
50657
51135
|
(0, import_fs2.mkdirSync)(tempDirPath, { recursive: true });
|
50658
51136
|
}
|
50659
|
-
|
50660
|
-
|
51137
|
+
let { stateConfigJson } = defaultChainConfigs;
|
51138
|
+
const { chainConfigJson, metadataJson } = defaultChainConfigs;
|
51139
|
+
stateConfigJson = {
|
51140
|
+
...stateConfigJson,
|
51141
|
+
coins: [
|
51142
|
+
...stateConfigJson.coins.map((coin) => ({
|
51143
|
+
...coin,
|
51144
|
+
amount: "18446744073709551615"
|
51145
|
+
}))
|
51146
|
+
],
|
51147
|
+
messages: stateConfigJson.messages.map((message) => ({
|
51148
|
+
...message,
|
51149
|
+
amount: "18446744073709551615"
|
51150
|
+
}))
|
51151
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
51152
|
+
};
|
50661
51153
|
if (!process.env.GENESIS_SECRET) {
|
50662
51154
|
const pk = Signer.generatePrivateKey();
|
50663
51155
|
const signer = new Signer(pk);
|
50664
51156
|
process.env.GENESIS_SECRET = hexlify(pk);
|
50665
|
-
|
50666
|
-
|
50667
|
-
|
50668
|
-
|
50669
|
-
|
50670
|
-
|
50671
|
-
|
50672
|
-
|
50673
|
-
|
50674
|
-
|
50675
|
-
}
|
50676
|
-
]
|
50677
|
-
}
|
50678
|
-
};
|
51157
|
+
stateConfigJson.coins.push({
|
51158
|
+
tx_id: hexlify(randomBytes22(UTXO_ID_LEN)),
|
51159
|
+
owner: signer.address.toHexString(),
|
51160
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
51161
|
+
amount: "18446744073709551615",
|
51162
|
+
asset_id: BaseAssetId,
|
51163
|
+
output_index: 0,
|
51164
|
+
tx_pointer_block_height: 0,
|
51165
|
+
tx_pointer_tx_idx: 0
|
51166
|
+
});
|
50679
51167
|
}
|
50680
|
-
|
50681
|
-
|
51168
|
+
let fixedStateConfigJSON = JSON.stringify(stateConfigJson);
|
51169
|
+
const regexMakeNumber = /("amount":)"(\d+)"/gm;
|
51170
|
+
fixedStateConfigJSON = fixedStateConfigJSON.replace(regexMakeNumber, "$1$2");
|
51171
|
+
const chainConfigWritePath = import_path8.default.join(tempDirPath, "chainConfig.json");
|
51172
|
+
const stateConfigWritePath = import_path8.default.join(tempDirPath, "stateConfig.json");
|
51173
|
+
const metadataWritePath = import_path8.default.join(tempDirPath, "metadata.json");
|
51174
|
+
(0, import_fs2.writeFileSync)(chainConfigWritePath, JSON.stringify(chainConfigJson), "utf8");
|
51175
|
+
(0, import_fs2.writeFileSync)(stateConfigWritePath, fixedStateConfigJSON, "utf8");
|
51176
|
+
(0, import_fs2.writeFileSync)(metadataWritePath, JSON.stringify(metadataJson), "utf8");
|
51177
|
+
chainConfigPathToUse = tempDirPath;
|
50682
51178
|
}
|
50683
51179
|
const child = (0, import_child_process.spawn)(
|
50684
51180
|
command,
|
@@ -50687,10 +51183,10 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
50687
51183
|
["--ip", ipToUse],
|
50688
51184
|
["--port", portToUse],
|
50689
51185
|
useInMemoryDb ? ["--db-type", "in-memory"] : ["--db-path", tempDirPath],
|
50690
|
-
["--min-gas-price", "
|
51186
|
+
["--min-gas-price", "1"],
|
50691
51187
|
poaInstant ? ["--poa-instant", "true"] : [],
|
50692
51188
|
["--consensus-key", consensusKey],
|
50693
|
-
["--
|
51189
|
+
["--snapshot", chainConfigPathToUse],
|
50694
51190
|
"--vm-backtrace",
|
50695
51191
|
"--utxo-validation",
|
50696
51192
|
"--debug",
|
@@ -50749,40 +51245,13 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
50749
51245
|
walletCount = 10
|
50750
51246
|
} = {}) => {
|
50751
51247
|
const { cleanup: closeNode, ip, port } = await launchNode(launchNodeOptions || {});
|
50752
|
-
const provider = await Provider.create(`http://${ip}:${port}/graphql`);
|
51248
|
+
const provider = await Provider.create(`http://${ip}:${port}/v1/graphql`);
|
50753
51249
|
const wallets = await generateWallets(walletCount, provider);
|
50754
51250
|
const cleanup = () => {
|
50755
51251
|
closeNode();
|
50756
51252
|
};
|
50757
51253
|
return { wallets, stop: cleanup, provider };
|
50758
51254
|
};
|
50759
|
-
|
50760
|
-
// src/test-utils/transactionRequest.ts
|
50761
|
-
var generateFakeRequestInputCoin = (partial = {}) => ({
|
50762
|
-
id: hexlify(randomBytes22(UTXO_ID_LEN)),
|
50763
|
-
type: InputType.Coin,
|
50764
|
-
owner: getRandomB256(),
|
50765
|
-
amount: bn(100),
|
50766
|
-
assetId: ZeroBytes32,
|
50767
|
-
txPointer: "0x00000000000000000000000000000000",
|
50768
|
-
witnessIndex: 0,
|
50769
|
-
...partial
|
50770
|
-
});
|
50771
|
-
var generateFakeRequestInputMessage = (partial = {}) => ({
|
50772
|
-
nonce: getRandomB256(),
|
50773
|
-
type: InputType.Message,
|
50774
|
-
sender: getRandomB256(),
|
50775
|
-
recipient: getRandomB256(),
|
50776
|
-
amount: bn(100),
|
50777
|
-
witnessIndex: 0,
|
50778
|
-
...partial
|
50779
|
-
});
|
50780
|
-
var generateFakeRequestInputContract = (partial = {}) => ({
|
50781
|
-
contractId: getRandomB256(),
|
50782
|
-
type: InputType.Contract,
|
50783
|
-
txPointer: "0x00000000000000000000000000000000",
|
50784
|
-
...partial
|
50785
|
-
});
|
50786
51255
|
})();
|
50787
51256
|
/*! Bundled license information:
|
50788
51257
|
|