@fuel-ts/account 0.0.0-rc-2021-20240409152935 → 0.0.0-rc-1976-20240410103621

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.

Files changed (54) hide show
  1. package/README.md +1 -1
  2. package/dist/account.d.ts +4 -5
  3. package/dist/account.d.ts.map +1 -1
  4. package/dist/configs.d.ts.map +1 -1
  5. package/dist/configs.global.js +1 -1
  6. package/dist/configs.global.js.map +1 -1
  7. package/dist/configs.js +1 -1
  8. package/dist/configs.js.map +1 -1
  9. package/dist/configs.mjs +1 -1
  10. package/dist/configs.mjs.map +1 -1
  11. package/dist/index.global.js +678 -946
  12. package/dist/index.global.js.map +1 -1
  13. package/dist/index.js +611 -850
  14. package/dist/index.js.map +1 -1
  15. package/dist/index.mjs +454 -692
  16. package/dist/index.mjs.map +1 -1
  17. package/dist/predicate/predicate.d.ts +2 -10
  18. package/dist/predicate/predicate.d.ts.map +1 -1
  19. package/dist/providers/__generated__/operations.d.ts +328 -894
  20. package/dist/providers/__generated__/operations.d.ts.map +1 -1
  21. package/dist/providers/coin-quantity.d.ts +3 -3
  22. package/dist/providers/coin-quantity.d.ts.map +1 -1
  23. package/dist/providers/coin.d.ts +2 -4
  24. package/dist/providers/coin.d.ts.map +1 -1
  25. package/dist/providers/fuel-graphql-subscriber.d.ts.map +1 -1
  26. package/dist/providers/message.d.ts +1 -3
  27. package/dist/providers/message.d.ts.map +1 -1
  28. package/dist/providers/provider.d.ts +34 -45
  29. package/dist/providers/provider.d.ts.map +1 -1
  30. package/dist/providers/transaction-request/create-transaction-request.d.ts.map +1 -1
  31. package/dist/providers/transaction-request/input.d.ts +2 -2
  32. package/dist/providers/transaction-request/input.d.ts.map +1 -1
  33. package/dist/providers/transaction-request/script-transaction-request.d.ts.map +1 -1
  34. package/dist/providers/transaction-request/transaction-request.d.ts +29 -9
  35. package/dist/providers/transaction-request/transaction-request.d.ts.map +1 -1
  36. package/dist/providers/transaction-request/utils.d.ts +0 -3
  37. package/dist/providers/transaction-request/utils.d.ts.map +1 -1
  38. package/dist/providers/transaction-response/transaction-response.d.ts.map +1 -1
  39. package/dist/providers/transaction-summary/assemble-transaction-summary.d.ts +0 -2
  40. package/dist/providers/transaction-summary/assemble-transaction-summary.d.ts.map +1 -1
  41. package/dist/providers/transaction-summary/calculate-transaction-fee.d.ts +2 -3
  42. package/dist/providers/transaction-summary/calculate-transaction-fee.d.ts.map +1 -1
  43. package/dist/providers/transaction-summary/get-transaction-summary.d.ts.map +1 -1
  44. package/dist/providers/utils/gas.d.ts +2 -8
  45. package/dist/providers/utils/gas.d.ts.map +1 -1
  46. package/dist/test-utils/launchNode.d.ts.map +1 -1
  47. package/dist/test-utils.global.js +1179 -1661
  48. package/dist/test-utils.global.js.map +1 -1
  49. package/dist/test-utils.js +608 -826
  50. package/dist/test-utils.js.map +1 -1
  51. package/dist/test-utils.mjs +466 -684
  52. package/dist/test-utils.mjs.map +1 -1
  53. package/dist/wallet/base-wallet-unlocked.d.ts.map +1 -1
  54. package/package.json +17 -17
@@ -280,7 +280,7 @@
280
280
  }
281
281
  return num !== null && typeof num === "object" && num.constructor.wordSize === BN2.wordSize && Array.isArray(num.words);
282
282
  };
283
- BN2.max = function max(left, right) {
283
+ BN2.max = function max2(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 clone3(instance) {
5107
+ function clone(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(clone3(this), {
6041
+ return new Response2(clone(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 ? clone3(input) : null;
6091
+ let inputBody = init.body != null ? init.body : isRequest(input) && input.body !== null ? clone(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.51.1",
31918
- FUEL_CORE: "0.24.2",
31917
+ FORC: "0.49.3",
31918
+ FUEL_CORE: "0.22.1",
31919
31919
  FUELS: "0.79.0"
31920
31920
  };
31921
31921
  }
@@ -31977,6 +31977,7 @@ This unreleased fuel-core build may include features and updates not yet support
31977
31977
  ErrorCode2["INVALID_COMPONENT"] = "invalid-component";
31978
31978
  ErrorCode2["CONFIGURABLE_NOT_FOUND"] = "configurable-not-found";
31979
31979
  ErrorCode2["TYPE_NOT_FOUND"] = "type-not-found";
31980
+ ErrorCode2["LOG_TYPE_NOT_FOUND"] = "log-type-not-found";
31980
31981
  ErrorCode2["TYPE_NOT_SUPPORTED"] = "type-not-supported";
31981
31982
  ErrorCode2["INVALID_DECODE_VALUE"] = "invalid-decode-value";
31982
31983
  ErrorCode2["JSON_ABI_ERROR"] = "json-abi-error";
@@ -32192,757 +32193,525 @@ This unreleased fuel-core build may include features and updates not yet support
32192
32193
  __publicField3(DateTime, "TAI64_NULL", "");
32193
32194
  var chainConfig_default = {
32194
32195
  chain_name: "local_testnet",
32195
- consensus_parameters: {
32196
- V1: {
32197
- tx_params: {
32198
- V1: {
32199
- max_inputs: 255,
32200
- max_outputs: 255,
32201
- max_witnesses: 255,
32202
- max_gas_per_tx: 3e7,
32203
- max_size: 112640
32204
- }
32205
- },
32206
- predicate_params: {
32207
- V1: {
32208
- max_predicate_length: 102400,
32209
- max_predicate_data_length: 102400,
32210
- max_message_data_length: 102400,
32211
- max_gas_per_predicate: 3e7
32212
- }
32213
- },
32214
- script_params: {
32215
- V1: {
32216
- max_script_length: 102400,
32217
- max_script_data_length: 102400
32218
- }
32219
- },
32220
- contract_params: {
32221
- V1: {
32222
- contract_max_size: 102400,
32223
- max_storage_slots: 1760
32224
- }
32225
- },
32226
- fee_params: {
32227
- V1: {
32228
- gas_price_factor: 92,
32229
- gas_per_byte: 63
32230
- }
32231
- },
32232
- chain_id: 0,
32233
- gas_costs: {
32234
- V1: {
32235
- add: 2,
32236
- addi: 2,
32237
- aloc: 1,
32238
- and: 2,
32239
- andi: 2,
32240
- bal: 366,
32241
- bhei: 2,
32242
- bhsh: 2,
32243
- burn: 33949,
32244
- cb: 2,
32245
- cfei: 2,
32246
- cfsi: 2,
32247
- div: 2,
32248
- divi: 2,
32249
- eck1: 3347,
32250
- ecr1: 46165,
32251
- ed19: 4210,
32252
- eq: 2,
32253
- exp: 2,
32254
- expi: 2,
32255
- flag: 1,
32256
- gm: 2,
32257
- gt: 2,
32258
- gtf: 16,
32259
- ji: 2,
32260
- jmp: 2,
32261
- jne: 2,
32262
- jnei: 2,
32263
- jnzi: 2,
32264
- jmpf: 2,
32265
- jmpb: 2,
32266
- jnzf: 2,
32267
- jnzb: 2,
32268
- jnef: 2,
32269
- jneb: 2,
32270
- lb: 2,
32271
- log: 754,
32272
- lt: 2,
32273
- lw: 2,
32274
- mint: 35718,
32275
- mlog: 2,
32276
- mod: 2,
32277
- modi: 2,
32278
- move: 2,
32279
- movi: 2,
32280
- mroo: 5,
32281
- mul: 2,
32282
- muli: 2,
32283
- mldv: 4,
32284
- noop: 1,
32285
- not: 2,
32286
- or: 2,
32287
- ori: 2,
32288
- poph: 3,
32289
- popl: 3,
32290
- pshh: 4,
32291
- pshl: 4,
32292
- ret_contract: 733,
32293
- rvrt_contract: 722,
32294
- sb: 2,
32295
- sll: 2,
32296
- slli: 2,
32297
- srl: 2,
32298
- srli: 2,
32299
- srw: 253,
32300
- sub: 2,
32301
- subi: 2,
32302
- sw: 2,
32303
- sww: 29053,
32304
- time: 79,
32305
- tr: 46242,
32306
- tro: 33251,
32307
- wdcm: 3,
32308
- wqcm: 3,
32309
- wdop: 3,
32310
- wqop: 3,
32311
- wdml: 3,
32312
- wqml: 4,
32313
- wddv: 5,
32314
- wqdv: 7,
32315
- wdmd: 11,
32316
- wqmd: 18,
32317
- wdam: 9,
32318
- wqam: 12,
32319
- wdmm: 11,
32320
- wqmm: 11,
32321
- xor: 2,
32322
- xori: 2,
32323
- call: {
32324
- LightOperation: {
32325
- base: 21687,
32326
- units_per_gas: 4
32327
- }
32328
- },
32329
- ccp: {
32330
- LightOperation: {
32331
- base: 59,
32332
- units_per_gas: 20
32333
- }
32334
- },
32335
- croo: {
32336
- LightOperation: {
32337
- base: 1,
32338
- units_per_gas: 1
32339
- }
32340
- },
32341
- csiz: {
32342
- LightOperation: {
32343
- base: 59,
32344
- units_per_gas: 195
32345
- }
32346
- },
32347
- k256: {
32348
- LightOperation: {
32349
- base: 282,
32350
- units_per_gas: 3
32351
- }
32352
- },
32353
- ldc: {
32354
- LightOperation: {
32355
- base: 45,
32356
- units_per_gas: 65
32357
- }
32358
- },
32359
- logd: {
32360
- LightOperation: {
32361
- base: 1134,
32362
- units_per_gas: 2
32363
- }
32364
- },
32365
- mcl: {
32366
- LightOperation: {
32367
- base: 3,
32368
- units_per_gas: 523
32369
- }
32370
- },
32371
- mcli: {
32372
- LightOperation: {
32373
- base: 3,
32374
- units_per_gas: 526
32375
- }
32376
- },
32377
- mcp: {
32378
- LightOperation: {
32379
- base: 3,
32380
- units_per_gas: 448
32381
- }
32382
- },
32383
- mcpi: {
32384
- LightOperation: {
32385
- base: 7,
32386
- units_per_gas: 585
32387
- }
32388
- },
32389
- meq: {
32390
- LightOperation: {
32391
- base: 11,
32392
- units_per_gas: 1097
32393
- }
32394
- },
32395
- retd_contract: {
32396
- LightOperation: {
32397
- base: 1086,
32398
- units_per_gas: 2
32399
- }
32400
- },
32401
- s256: {
32402
- LightOperation: {
32403
- base: 45,
32404
- units_per_gas: 3
32405
- }
32406
- },
32407
- scwq: {
32408
- HeavyOperation: {
32409
- base: 30375,
32410
- gas_per_unit: 28628
32411
- }
32412
- },
32413
- smo: {
32414
- LightOperation: {
32415
- base: 64196,
32416
- units_per_gas: 1
32417
- }
32418
- },
32419
- srwq: {
32420
- HeavyOperation: {
32421
- base: 262,
32422
- gas_per_unit: 249
32423
- }
32424
- },
32425
- swwq: {
32426
- HeavyOperation: {
32427
- base: 28484,
32428
- gas_per_unit: 26613
32429
- }
32430
- },
32431
- contract_root: {
32432
- LightOperation: {
32433
- base: 45,
32434
- units_per_gas: 1
32435
- }
32436
- },
32437
- state_root: {
32438
- HeavyOperation: {
32439
- base: 350,
32440
- gas_per_unit: 176
32441
- }
32442
- },
32443
- new_storage_per_byte: 63,
32444
- vm_initialization: {
32445
- LightOperation: {
32446
- base: 1645,
32447
- units_per_gas: 14
32448
- }
32449
- }
32450
- }
32196
+ block_gas_limit: 5e9,
32197
+ initial_state: {
32198
+ coins: [
32199
+ {
32200
+ owner: "0x94ffcc53b892684acefaebc8a3d4a595e528a8cf664eeb3ef36f1020b0809d0d",
32201
+ amount: "0xFFFFFFFFFFFFFFFF",
32202
+ asset_id: "0x0000000000000000000000000000000000000000000000000000000000000000"
32451
32203
  },
32452
- base_asset_id: "0000000000000000000000000000000000000000000000000000000000000000",
32453
- block_gas_limit: 3e7,
32454
- privileged_address: "0000000000000000000000000000000000000000000000000000000000000000"
32455
- }
32204
+ {
32205
+ owner: "0x09c0b2d1a486c439a87bcba6b46a7a1a23f3897cc83a94521a96da5c23bc58db",
32206
+ amount: "0xFFFFFFFFFFFFFFFF",
32207
+ asset_id: "0x0000000000000000000000000000000000000000000000000000000000000000"
32208
+ },
32209
+ {
32210
+ owner: "0x09c0b2d1a486c439a87bcba6b46a7a1a23f3897cc83a94521a96da5c23bc58db",
32211
+ amount: "0xFFFFFFFFFFFFFFFF",
32212
+ asset_id: "0x0101010101010101010101010101010101010101010101010101010101010101"
32213
+ },
32214
+ {
32215
+ owner: "0x09c0b2d1a486c439a87bcba6b46a7a1a23f3897cc83a94521a96da5c23bc58db",
32216
+ amount: "0xFFFFFFFFFFFFFFFF",
32217
+ asset_id: "0x0202020202020202020202020202020202020202020202020202020202020202"
32218
+ },
32219
+ {
32220
+ owner: "0x5d99ee966b42cd8fc7bdd1364b389153a9e78b42b7d4a691470674e817888d4e",
32221
+ amount: "0xFFFFFFFFFFFFFFFF",
32222
+ asset_id: "0x0000000000000000000000000000000000000000000000000000000000000000"
32223
+ },
32224
+ {
32225
+ owner: "0x5d99ee966b42cd8fc7bdd1364b389153a9e78b42b7d4a691470674e817888d4e",
32226
+ amount: "0xFFFFFFFFFFFFFFFF",
32227
+ asset_id: "0x0101010101010101010101010101010101010101010101010101010101010101"
32228
+ },
32229
+ {
32230
+ owner: "0x5d99ee966b42cd8fc7bdd1364b389153a9e78b42b7d4a691470674e817888d4e",
32231
+ amount: "0xFFFFFFFFFFFFFFFF",
32232
+ asset_id: "0x0202020202020202020202020202020202020202020202020202020202020202"
32233
+ },
32234
+ {
32235
+ owner: "0xbdaad6a89e073e177895b3e5a9ccd15806749eda134a6438dae32fc5b6601f3f",
32236
+ amount: "0xFFFFFFFFFFFFFFFF",
32237
+ asset_id: "0x0000000000000000000000000000000000000000000000000000000000000000"
32238
+ },
32239
+ {
32240
+ owner: "0xbdaad6a89e073e177895b3e5a9ccd15806749eda134a6438dae32fc5b6601f3f",
32241
+ amount: "0xFFFFFFFFFFFFFFFF",
32242
+ asset_id: "0x0101010101010101010101010101010101010101010101010101010101010101"
32243
+ },
32244
+ {
32245
+ owner: "0xbdaad6a89e073e177895b3e5a9ccd15806749eda134a6438dae32fc5b6601f3f",
32246
+ amount: "0xFFFFFFFFFFFFFFFF",
32247
+ asset_id: "0x0202020202020202020202020202020202020202020202020202020202020202"
32248
+ },
32249
+ {
32250
+ owner: "0x95a7aa6cc32743f8706c40ef49a7423b47da763bb4bbc055b1f07254dc729036",
32251
+ amount: "0xFFFFFFFFFFFFFFFF",
32252
+ asset_id: "0x0000000000000000000000000000000000000000000000000000000000000000"
32253
+ },
32254
+ {
32255
+ owner: "0x95a7aa6cc32743f8706c40ef49a7423b47da763bb4bbc055b1f07254dc729036",
32256
+ amount: "0xFFFFFFFFFFFFFFFF",
32257
+ asset_id: "0x0101010101010101010101010101010101010101010101010101010101010101"
32258
+ },
32259
+ {
32260
+ owner: "0x95a7aa6cc32743f8706c40ef49a7423b47da763bb4bbc055b1f07254dc729036",
32261
+ amount: "0xFFFFFFFFFFFFFFFF",
32262
+ asset_id: "0x0202020202020202020202020202020202020202020202020202020202020202"
32263
+ },
32264
+ {
32265
+ owner: "0xcee104acd38b940c8f1c62c6d7ea00a0ad2241d6dee0509a4bf27297508870d3",
32266
+ amount: "0xFFFFFFFFFFFFFFFF",
32267
+ asset_id: "0x0000000000000000000000000000000000000000000000000000000000000000"
32268
+ },
32269
+ {
32270
+ owner: "0xcee104acd38b940c8f1c62c6d7ea00a0ad2241d6dee0509a4bf27297508870d3",
32271
+ amount: "0xFFFFFFFFFFFFFFFF",
32272
+ asset_id: "0x0101010101010101010101010101010101010101010101010101010101010101"
32273
+ },
32274
+ {
32275
+ owner: "0xcee104acd38b940c8f1c62c6d7ea00a0ad2241d6dee0509a4bf27297508870d3",
32276
+ amount: "0xFFFFFFFFFFFFFFFF",
32277
+ asset_id: "0x0202020202020202020202020202020202020202020202020202020202020202"
32278
+ },
32279
+ {
32280
+ owner: "0x7e3626e306588eba79cafab73f0709e55ab8f4bdfe8c8b75034a430fc56ece89",
32281
+ amount: "0xFFFFFFFFFFFFFFFF",
32282
+ asset_id: "0x0000000000000000000000000000000000000000000000000000000000000000"
32283
+ },
32284
+ {
32285
+ owner: "0x7e3626e306588eba79cafab73f0709e55ab8f4bdfe8c8b75034a430fc56ece89",
32286
+ amount: "0xFFFFFFFFFFFFFFFF",
32287
+ asset_id: "0x0101010101010101010101010101010101010101010101010101010101010101"
32288
+ },
32289
+ {
32290
+ owner: "0x7e3626e306588eba79cafab73f0709e55ab8f4bdfe8c8b75034a430fc56ece89",
32291
+ amount: "0xFFFFFFFFFFFFFFFF",
32292
+ asset_id: "0x0202020202020202020202020202020202020202020202020202020202020202"
32293
+ },
32294
+ {
32295
+ owner: "0x1c31df52b6df56407dd95f83082e8beb9cfc9532ac111d5bd8491651d95ba775",
32296
+ amount: "0xFFFFFFFFFFFFFFFF",
32297
+ asset_id: "0x0000000000000000000000000000000000000000000000000000000000000000"
32298
+ },
32299
+ {
32300
+ owner: "0x1c31df52b6df56407dd95f83082e8beb9cfc9532ac111d5bd8491651d95ba775",
32301
+ amount: "0xFFFFFFFFFFFFFFFF",
32302
+ asset_id: "0x0101010101010101010101010101010101010101010101010101010101010101"
32303
+ },
32304
+ {
32305
+ owner: "0x1c31df52b6df56407dd95f83082e8beb9cfc9532ac111d5bd8491651d95ba775",
32306
+ amount: "0xFFFFFFFFFFFFFFFF",
32307
+ asset_id: "0x0202020202020202020202020202020202020202020202020202020202020202"
32308
+ },
32309
+ {
32310
+ owner: "0x09dd7a49174d6fcc9f4c6f7942c18060a935ddd03ee69b594189b8c3581276ea",
32311
+ amount: "0xFFFFFFFFFFFFFFFF",
32312
+ asset_id: "0x0000000000000000000000000000000000000000000000000000000000000000"
32313
+ },
32314
+ {
32315
+ owner: "0x09dd7a49174d6fcc9f4c6f7942c18060a935ddd03ee69b594189b8c3581276ea",
32316
+ amount: "0xFFFFFFFFFFFFFFFF",
32317
+ asset_id: "0x0101010101010101010101010101010101010101010101010101010101010101"
32318
+ },
32319
+ {
32320
+ owner: "0x09dd7a49174d6fcc9f4c6f7942c18060a935ddd03ee69b594189b8c3581276ea",
32321
+ amount: "0xFFFFFFFFFFFFFFFF",
32322
+ asset_id: "0x0202020202020202020202020202020202020202020202020202020202020202"
32323
+ },
32324
+ {
32325
+ owner: "0x86604282dc604481b809845be49667607c470644f6822fc01eb0d22f167e08cf",
32326
+ amount: "0xFFFFFFFFFFFFFFFF",
32327
+ asset_id: "0x0000000000000000000000000000000000000000000000000000000000000000"
32328
+ },
32329
+ {
32330
+ owner: "0x86604282dc604481b809845be49667607c470644f6822fc01eb0d22f167e08cf",
32331
+ amount: "0xFFFFFFFFFFFFFFFF",
32332
+ asset_id: "0x0101010101010101010101010101010101010101010101010101010101010101"
32333
+ },
32334
+ {
32335
+ owner: "0x86604282dc604481b809845be49667607c470644f6822fc01eb0d22f167e08cf",
32336
+ amount: "0xFFFFFFFFFFFFFFFF",
32337
+ asset_id: "0x0202020202020202020202020202020202020202020202020202020202020202"
32338
+ },
32339
+ {
32340
+ owner: "0xbca334a06d19db5041c78fe2f465b07be5bec828f38b7796b2877e7d1542c950",
32341
+ amount: "0xFFFFFFFFFFFFFFFF",
32342
+ asset_id: "0x0000000000000000000000000000000000000000000000000000000000000000"
32343
+ },
32344
+ {
32345
+ owner: "0xbca334a06d19db5041c78fe2f465b07be5bec828f38b7796b2877e7d1542c950",
32346
+ amount: "0xFFFFFFFFFFFFFFFF",
32347
+ asset_id: "0x0101010101010101010101010101010101010101010101010101010101010101"
32348
+ },
32349
+ {
32350
+ owner: "0xbca334a06d19db5041c78fe2f465b07be5bec828f38b7796b2877e7d1542c950",
32351
+ amount: "0xFFFFFFFFFFFFFFFF",
32352
+ asset_id: "0x0202020202020202020202020202020202020202020202020202020202020202"
32353
+ },
32354
+ {
32355
+ owner: "0xbd9a1dc8d3ec3521c43f6c2c01611b4d0204c7610204ff0178488c8738a30bd2",
32356
+ amount: "0xFFFFFFFFFFFFFFFF",
32357
+ asset_id: "0x0000000000000000000000000000000000000000000000000000000000000000"
32358
+ },
32359
+ {
32360
+ owner: "0xbd9a1dc8d3ec3521c43f6c2c01611b4d0204c7610204ff0178488c8738a30bd2",
32361
+ amount: "0xFFFFFFFFFFFFFFFF",
32362
+ asset_id: "0x0101010101010101010101010101010101010101010101010101010101010101"
32363
+ },
32364
+ {
32365
+ owner: "0xbd9a1dc8d3ec3521c43f6c2c01611b4d0204c7610204ff0178488c8738a30bd2",
32366
+ amount: "0xFFFFFFFFFFFFFFFF",
32367
+ asset_id: "0x0202020202020202020202020202020202020202020202020202020202020202"
32368
+ },
32369
+ {
32370
+ owner: "0xb32197cf75efe05bf453c26178139f09b391582065549c1422bc92555ecffb64",
32371
+ amount: "0xFFFFFFFFFFFFFFFF",
32372
+ asset_id: "0x0000000000000000000000000000000000000000000000000000000000000000"
32373
+ },
32374
+ {
32375
+ owner: "0xb32197cf75efe05bf453c26178139f09b391582065549c1422bc92555ecffb64",
32376
+ amount: "0xFFFFFFFFFFFFFFFF",
32377
+ asset_id: "0x0101010101010101010101010101010101010101010101010101010101010101"
32378
+ },
32379
+ {
32380
+ owner: "0xb32197cf75efe05bf453c26178139f09b391582065549c1422bc92555ecffb64",
32381
+ amount: "0xFFFFFFFFFFFFFFFF",
32382
+ asset_id: "0x0202020202020202020202020202020202020202020202020202020202020202"
32383
+ },
32384
+ {
32385
+ owner: "0x3b24509ed4ab3c7959f5c9391c1445c59290cdb5f13d6f780922f376b7029f30",
32386
+ amount: "0xFFFFFFFFFFFFFFFF",
32387
+ asset_id: "0x0000000000000000000000000000000000000000000000000000000000000000"
32388
+ },
32389
+ {
32390
+ owner: "0x3b24509ed4ab3c7959f5c9391c1445c59290cdb5f13d6f780922f376b7029f30",
32391
+ amount: "0xFFFFFFFFFFFFFFFF",
32392
+ asset_id: "0x0101010101010101010101010101010101010101010101010101010101010101"
32393
+ },
32394
+ {
32395
+ owner: "0x3b24509ed4ab3c7959f5c9391c1445c59290cdb5f13d6f780922f376b7029f30",
32396
+ amount: "0xFFFFFFFFFFFFFFFF",
32397
+ asset_id: "0x0202020202020202020202020202020202020202020202020202020202020202"
32398
+ },
32399
+ {
32400
+ owner: "0x77c6f40b7da70d885f68efaad7c661327482a63ea10dcb4271de819438254ae1",
32401
+ amount: "0xFFFFFFFFFFFFFFFF",
32402
+ asset_id: "0x0000000000000000000000000000000000000000000000000000000000000000"
32403
+ },
32404
+ {
32405
+ owner: "0x77c6f40b7da70d885f68efaad7c661327482a63ea10dcb4271de819438254ae1",
32406
+ amount: "0xFFFFFFFFFFFFFFFF",
32407
+ asset_id: "0x0101010101010101010101010101010101010101010101010101010101010101"
32408
+ },
32409
+ {
32410
+ owner: "0x77c6f40b7da70d885f68efaad7c661327482a63ea10dcb4271de819438254ae1",
32411
+ amount: "0xFFFFFFFFFFFFFFFF",
32412
+ asset_id: "0x0202020202020202020202020202020202020202020202020202020202020202"
32413
+ },
32414
+ {
32415
+ owner: "0x6a2c4691c547c43924650dbd30620b184b5fe3fb6dbe5c4446110b08f6f405bf",
32416
+ amount: "0xFFFFFFFFFFFFFFFF",
32417
+ asset_id: "0x0000000000000000000000000000000000000000000000000000000000000000"
32418
+ },
32419
+ {
32420
+ owner: "0x6a2c4691c547c43924650dbd30620b184b5fe3fb6dbe5c4446110b08f6f405bf",
32421
+ amount: "0xFFFFFFFFFFFFFFFF",
32422
+ asset_id: "0x0101010101010101010101010101010101010101010101010101010101010101"
32423
+ },
32424
+ {
32425
+ owner: "0x6a2c4691c547c43924650dbd30620b184b5fe3fb6dbe5c4446110b08f6f405bf",
32426
+ amount: "0xFFFFFFFFFFFFFFFF",
32427
+ asset_id: "0x0202020202020202020202020202020202020202020202020202020202020202"
32428
+ },
32429
+ {
32430
+ owner: "0x49075a7538e2c88ebe1926ce4d898198a2a4e790d14512943a9864bc536b3c82",
32431
+ amount: "0xFFFFFFFFFFFFFFFF",
32432
+ asset_id: "0x0000000000000000000000000000000000000000000000000000000000000000"
32433
+ },
32434
+ {
32435
+ owner: "0x49075a7538e2c88ebe1926ce4d898198a2a4e790d14512943a9864bc536b3c82",
32436
+ amount: "0xFFFFFFFFFFFFFFFF",
32437
+ asset_id: "0x0101010101010101010101010101010101010101010101010101010101010101"
32438
+ },
32439
+ {
32440
+ owner: "0x49075a7538e2c88ebe1926ce4d898198a2a4e790d14512943a9864bc536b3c82",
32441
+ amount: "0xFFFFFFFFFFFFFFFF",
32442
+ asset_id: "0x0202020202020202020202020202020202020202020202020202020202020202"
32443
+ }
32444
+ ],
32445
+ messages: [
32446
+ {
32447
+ sender: "0xc43454aa38dd91f88109a4b7aef5efb96ce34e3f24992fe0f81d233ca686f80f",
32448
+ recipient: "0x69a2b736b60159b43bb8a4f98c0589f6da5fa3a3d101e8e269c499eb942753ba",
32449
+ nonce: "0101010101010101010101010101010101010101010101010101010101010101",
32450
+ amount: "0x000000000000FFFF",
32451
+ data: "",
32452
+ da_height: "0x00"
32453
+ },
32454
+ {
32455
+ sender: "0x69a2b736b60159b43bb8a4f98c0589f6da5fa3a3d101e8e269c499eb942753ba",
32456
+ recipient: "0xc43454aa38dd91f88109a4b7aef5efb96ce34e3f24992fe0f81d233ca686f80f",
32457
+ nonce: "0e1ef2963832068b0e1ef2963832068b0e1ef2963832068b0e1ef2963832068b",
32458
+ amount: "0xb04f3c08f59b309e",
32459
+ data: "",
32460
+ da_height: "0x00"
32461
+ }
32462
+ ]
32456
32463
  },
32457
- consensus: {
32458
- PoA: {
32459
- signing_key: "0x94ffcc53b892684acefaebc8a3d4a595e528a8cf664eeb3ef36f1020b0809d0d"
32460
- }
32461
- }
32462
- };
32463
- var metadata_default = {
32464
- chain_config: "chainConfig.json",
32465
- table_encoding: {
32466
- Json: {
32467
- filepath: "stateConfig.json"
32468
- }
32469
- }
32470
- };
32471
- var stateConfig_default = {
32472
- coins: [
32473
- {
32474
- tx_id: "0x260eabfd50937e92939fd92687e9302a72e91c5065f64f853f2ccbe02396fe09d665",
32475
- output_index: 0,
32476
- tx_pointer_block_height: 0,
32477
- tx_pointer_tx_idx: 0,
32478
- owner: "0x94ffcc53b892684acefaebc8a3d4a595e528a8cf664eeb3ef36f1020b0809d0d",
32479
- amount: 18446744073709552e3,
32480
- asset_id: "0x0000000000000000000000000000000000000000000000000000000000000000"
32481
- },
32482
- {
32483
- tx_id: "0x2a757c2317236f7883ac9bbbf7d402f034e0b725c544ef1c8725b1d2bd960f8c690f",
32484
- output_index: 0,
32485
- tx_pointer_block_height: 0,
32486
- tx_pointer_tx_idx: 0,
32487
- owner: "0x09c0b2d1a486c439a87bcba6b46a7a1a23f3897cc83a94521a96da5c23bc58db",
32488
- amount: 18446744073709552e3,
32489
- asset_id: "0x0000000000000000000000000000000000000000000000000000000000000000"
32490
- },
32491
- {
32492
- tx_id: "0x634ef6cda00bac63992bbde80c6d694d484d58025a5ca0c9c848f0d35a5a3eee74b2",
32493
- output_index: 0,
32494
- tx_pointer_block_height: 0,
32495
- tx_pointer_tx_idx: 0,
32496
- owner: "0x09c0b2d1a486c439a87bcba6b46a7a1a23f3897cc83a94521a96da5c23bc58db",
32497
- amount: 18446744073709552e3,
32498
- asset_id: "0x0101010101010101010101010101010101010101010101010101010101010101"
32499
- },
32500
- {
32501
- tx_id: "0xd3543bb1da137a7987a96a1bb71681fdd195ff25318c0d4a923aa30eb27ffa80bc7b",
32502
- output_index: 0,
32503
- tx_pointer_block_height: 0,
32504
- tx_pointer_tx_idx: 0,
32505
- owner: "0x09c0b2d1a486c439a87bcba6b46a7a1a23f3897cc83a94521a96da5c23bc58db",
32506
- amount: 18446744073709552e3,
32507
- asset_id: "0x0202020202020202020202020202020202020202020202020202020202020202"
32508
- },
32509
- {
32510
- tx_id: "0xa4d42cbb02adb32f5f3a9eab33a0ee7bdab8910ad9f615dfc86a7bb9e49a732bc58c",
32511
- output_index: 0,
32512
- tx_pointer_block_height: 0,
32513
- tx_pointer_tx_idx: 0,
32514
- owner: "0x5d99ee966b42cd8fc7bdd1364b389153a9e78b42b7d4a691470674e817888d4e",
32515
- amount: 18446744073709552e3,
32516
- asset_id: "0x0000000000000000000000000000000000000000000000000000000000000000"
32517
- },
32518
- {
32519
- tx_id: "0xc197cb09b1d89a7862b238e9500631bd43f291aadb7ff55c8129335349634e9fde3f",
32520
- output_index: 0,
32521
- tx_pointer_block_height: 0,
32522
- tx_pointer_tx_idx: 0,
32523
- owner: "0x5d99ee966b42cd8fc7bdd1364b389153a9e78b42b7d4a691470674e817888d4e",
32524
- amount: 18446744073709552e3,
32525
- asset_id: "0x0101010101010101010101010101010101010101010101010101010101010101"
32526
- },
32527
- {
32528
- tx_id: "0x4c4fc2451b9a9b16c520c1b89ec8968ce46823dd0396d84f7e3155861352fdce12c5",
32529
- output_index: 0,
32530
- tx_pointer_block_height: 0,
32531
- tx_pointer_tx_idx: 0,
32532
- owner: "0x5d99ee966b42cd8fc7bdd1364b389153a9e78b42b7d4a691470674e817888d4e",
32533
- amount: 18446744073709552e3,
32534
- asset_id: "0x0202020202020202020202020202020202020202020202020202020202020202"
32535
- },
32536
- {
32537
- tx_id: "0x68df8f08555086a1ab45591e6fe4bf2f538bcb80dd519108030b7e886d6a230c2531",
32538
- output_index: 0,
32539
- tx_pointer_block_height: 0,
32540
- tx_pointer_tx_idx: 0,
32541
- owner: "0xbdaad6a89e073e177895b3e5a9ccd15806749eda134a6438dae32fc5b6601f3f",
32542
- amount: 18446744073709552e3,
32543
- asset_id: "0x0000000000000000000000000000000000000000000000000000000000000000"
32544
- },
32545
- {
32546
- tx_id: "0x1b9bdaa290518373eb905e45ce7fcb89acedd24341ca7749ad47a938e4bf3ca9b7ce",
32547
- output_index: 0,
32548
- tx_pointer_block_height: 0,
32549
- tx_pointer_tx_idx: 0,
32550
- owner: "0xbdaad6a89e073e177895b3e5a9ccd15806749eda134a6438dae32fc5b6601f3f",
32551
- amount: 18446744073709552e3,
32552
- asset_id: "0x0101010101010101010101010101010101010101010101010101010101010101"
32553
- },
32554
- {
32555
- tx_id: "0xa5a2e9db3d1285337fe1183dc1eabe8f9cdcd470daf95cd5c522bbae292f53977f26",
32556
- output_index: 0,
32557
- tx_pointer_block_height: 0,
32558
- tx_pointer_tx_idx: 0,
32559
- owner: "0xbdaad6a89e073e177895b3e5a9ccd15806749eda134a6438dae32fc5b6601f3f",
32560
- amount: 18446744073709552e3,
32561
- asset_id: "0x0202020202020202020202020202020202020202020202020202020202020202"
32562
- },
32563
- {
32564
- tx_id: "0x13b685a1ea7c56309a92d69dd7e4808987ec90d62a1f9c9f2ec18e54746855c8c93c",
32565
- output_index: 0,
32566
- tx_pointer_block_height: 0,
32567
- tx_pointer_tx_idx: 0,
32568
- owner: "0x95a7aa6cc32743f8706c40ef49a7423b47da763bb4bbc055b1f07254dc729036",
32569
- amount: 18446744073709552e3,
32570
- asset_id: "0x0000000000000000000000000000000000000000000000000000000000000000"
32571
- },
32572
- {
32573
- tx_id: "0xf8f00a234cf3fbab86befc3fd9346d7fd1ac085233c9cb58c7447f30c75cbf87ed38",
32574
- output_index: 0,
32575
- tx_pointer_block_height: 0,
32576
- tx_pointer_tx_idx: 0,
32577
- owner: "0x95a7aa6cc32743f8706c40ef49a7423b47da763bb4bbc055b1f07254dc729036",
32578
- amount: 18446744073709552e3,
32579
- asset_id: "0x0101010101010101010101010101010101010101010101010101010101010101"
32580
- },
32581
- {
32582
- tx_id: "0x2a36c870f624b60fbd6f2b71332ca7f704c69296ceae4ddbf3a8ede79408088934be",
32583
- output_index: 0,
32584
- tx_pointer_block_height: 0,
32585
- tx_pointer_tx_idx: 0,
32586
- owner: "0x95a7aa6cc32743f8706c40ef49a7423b47da763bb4bbc055b1f07254dc729036",
32587
- amount: 18446744073709552e3,
32588
- asset_id: "0x0202020202020202020202020202020202020202020202020202020202020202"
32589
- },
32590
- {
32591
- tx_id: "0x9cd180d41e67a422da8a7683f036b463a7ed7efc0de31c1692adac90decbfebce78c",
32592
- output_index: 0,
32593
- tx_pointer_block_height: 0,
32594
- tx_pointer_tx_idx: 0,
32595
- owner: "0xcee104acd38b940c8f1c62c6d7ea00a0ad2241d6dee0509a4bf27297508870d3",
32596
- amount: 18446744073709552e3,
32597
- asset_id: "0x0000000000000000000000000000000000000000000000000000000000000000"
32598
- },
32599
- {
32600
- tx_id: "0xfeb4f2388fa22e6613ff85cf4e655f58acdfaa6299eba7f93b812cd1f0d7bbac48f0",
32601
- output_index: 0,
32602
- tx_pointer_block_height: 0,
32603
- tx_pointer_tx_idx: 0,
32604
- owner: "0xcee104acd38b940c8f1c62c6d7ea00a0ad2241d6dee0509a4bf27297508870d3",
32605
- amount: 18446744073709552e3,
32606
- asset_id: "0x0101010101010101010101010101010101010101010101010101010101010101"
32607
- },
32608
- {
32609
- tx_id: "0xc4d20299f43358dc32ab853f6631340b09278511b6adbaf34597ade6ef37efd018f1",
32610
- output_index: 0,
32611
- tx_pointer_block_height: 0,
32612
- tx_pointer_tx_idx: 0,
32613
- owner: "0xcee104acd38b940c8f1c62c6d7ea00a0ad2241d6dee0509a4bf27297508870d3",
32614
- amount: 18446744073709552e3,
32615
- asset_id: "0x0202020202020202020202020202020202020202020202020202020202020202"
32616
- },
32617
- {
32618
- tx_id: "0x437291414110b0aebaa8be5c0d9ff1e97d1130a24a6c9e028f2b1f6b0576be6aa961",
32619
- output_index: 0,
32620
- tx_pointer_block_height: 0,
32621
- tx_pointer_tx_idx: 0,
32622
- owner: "0x7e3626e306588eba79cafab73f0709e55ab8f4bdfe8c8b75034a430fc56ece89",
32623
- amount: 18446744073709552e3,
32624
- asset_id: "0x0000000000000000000000000000000000000000000000000000000000000000"
32625
- },
32626
- {
32627
- tx_id: "0x28131b9acc90c2058ee14f4094a474146ba5b779cb9021867164b3d41abad3d047a7",
32628
- output_index: 0,
32629
- tx_pointer_block_height: 0,
32630
- tx_pointer_tx_idx: 0,
32631
- owner: "0x7e3626e306588eba79cafab73f0709e55ab8f4bdfe8c8b75034a430fc56ece89",
32632
- amount: 18446744073709552e3,
32633
- asset_id: "0x0101010101010101010101010101010101010101010101010101010101010101"
32634
- },
32635
- {
32636
- tx_id: "0x033bb5f9b0e4f530d50af3a0f12dd510f799af495ef88baea3cf854a37da728d214b",
32637
- output_index: 0,
32638
- tx_pointer_block_height: 0,
32639
- tx_pointer_tx_idx: 0,
32640
- owner: "0x7e3626e306588eba79cafab73f0709e55ab8f4bdfe8c8b75034a430fc56ece89",
32641
- amount: 18446744073709552e3,
32642
- asset_id: "0x0202020202020202020202020202020202020202020202020202020202020202"
32643
- },
32644
- {
32645
- tx_id: "0x460591398552eca338dd9577f362b91b0f9297f308258734870350004dcc303c67e9",
32646
- output_index: 0,
32647
- tx_pointer_block_height: 0,
32648
- tx_pointer_tx_idx: 0,
32649
- owner: "0x1c31df52b6df56407dd95f83082e8beb9cfc9532ac111d5bd8491651d95ba775",
32650
- amount: 18446744073709552e3,
32651
- asset_id: "0x0000000000000000000000000000000000000000000000000000000000000000"
32652
- },
32653
- {
32654
- tx_id: "0x447a7c37aee972dcba72f05255c5145dd63125f0fc46ef98c216f775ee0421e23d2b",
32655
- output_index: 0,
32656
- tx_pointer_block_height: 0,
32657
- tx_pointer_tx_idx: 0,
32658
- owner: "0x1c31df52b6df56407dd95f83082e8beb9cfc9532ac111d5bd8491651d95ba775",
32659
- amount: 18446744073709552e3,
32660
- asset_id: "0x0101010101010101010101010101010101010101010101010101010101010101"
32661
- },
32662
- {
32663
- tx_id: "0xf4a5d727606260c7ac6333fa89e7aef474df8a13326716d4d02f6392ebb7b997d268",
32664
- output_index: 0,
32665
- tx_pointer_block_height: 0,
32666
- tx_pointer_tx_idx: 0,
32667
- owner: "0x1c31df52b6df56407dd95f83082e8beb9cfc9532ac111d5bd8491651d95ba775",
32668
- amount: 18446744073709552e3,
32669
- asset_id: "0x0202020202020202020202020202020202020202020202020202020202020202"
32670
- },
32671
- {
32672
- tx_id: "0x25a49b0731bf610f6706aa9e9e96e5967f7c50f4302a3c75d7c8141595896551c18d",
32673
- output_index: 0,
32674
- tx_pointer_block_height: 0,
32675
- tx_pointer_tx_idx: 0,
32676
- owner: "0x09dd7a49174d6fcc9f4c6f7942c18060a935ddd03ee69b594189b8c3581276ea",
32677
- amount: 18446744073709552e3,
32678
- asset_id: "0x0000000000000000000000000000000000000000000000000000000000000000"
32679
- },
32680
- {
32681
- tx_id: "0x0a6e3585881ef2edf3f7727762799089dc0b5923e8b3718b49044dd9ddcb33b68459",
32682
- output_index: 0,
32683
- tx_pointer_block_height: 0,
32684
- tx_pointer_tx_idx: 0,
32685
- owner: "0x09dd7a49174d6fcc9f4c6f7942c18060a935ddd03ee69b594189b8c3581276ea",
32686
- amount: 18446744073709552e3,
32687
- asset_id: "0x0101010101010101010101010101010101010101010101010101010101010101"
32688
- },
32689
- {
32690
- tx_id: "0xf73bbe0635f7b6d59a090a21d87288b82164d0f6101da830ce64eff64a2d2ff2ac37",
32691
- output_index: 0,
32692
- tx_pointer_block_height: 0,
32693
- tx_pointer_tx_idx: 0,
32694
- owner: "0x09dd7a49174d6fcc9f4c6f7942c18060a935ddd03ee69b594189b8c3581276ea",
32695
- amount: 18446744073709552e3,
32696
- asset_id: "0x0202020202020202020202020202020202020202020202020202020202020202"
32464
+ consensus_parameters: {
32465
+ tx_params: {
32466
+ max_inputs: 255,
32467
+ max_outputs: 255,
32468
+ max_witnesses: 255,
32469
+ max_gas_per_tx: 1e7,
32470
+ max_size: 17825792
32697
32471
  },
32698
- {
32699
- tx_id: "0x6cc44cb8d2a6462a591a77b6b9917eb6b22ad80d23d3cfd4f94c9da49c14b3cbac6e",
32700
- output_index: 0,
32701
- tx_pointer_block_height: 0,
32702
- tx_pointer_tx_idx: 0,
32703
- owner: "0x86604282dc604481b809845be49667607c470644f6822fc01eb0d22f167e08cf",
32704
- amount: 18446744073709552e3,
32705
- asset_id: "0x0000000000000000000000000000000000000000000000000000000000000000"
32472
+ predicate_params: {
32473
+ max_predicate_length: 1048576,
32474
+ max_predicate_data_length: 1048576,
32475
+ max_gas_per_predicate: 1e7,
32476
+ max_message_data_length: 1048576
32706
32477
  },
32707
- {
32708
- tx_id: "0xbf2305d284ea95227040df4cc727156cccc2ca6aa3b92ed86fea4db1c37e5905f926",
32709
- output_index: 0,
32710
- tx_pointer_block_height: 0,
32711
- tx_pointer_tx_idx: 0,
32712
- owner: "0x86604282dc604481b809845be49667607c470644f6822fc01eb0d22f167e08cf",
32713
- amount: 18446744073709552e3,
32714
- asset_id: "0x0101010101010101010101010101010101010101010101010101010101010101"
32478
+ script_params: {
32479
+ max_script_length: 1048576,
32480
+ max_script_data_length: 1048576
32715
32481
  },
32716
- {
32717
- tx_id: "0xf4e1c76c72ecae699696f5e7a62ccf1425f7395080d0ca7b25ab63d1f841f425b807",
32718
- output_index: 0,
32719
- tx_pointer_block_height: 0,
32720
- tx_pointer_tx_idx: 0,
32721
- owner: "0x86604282dc604481b809845be49667607c470644f6822fc01eb0d22f167e08cf",
32722
- amount: 18446744073709552e3,
32723
- asset_id: "0x0202020202020202020202020202020202020202020202020202020202020202"
32482
+ contract_params: {
32483
+ contract_max_size: 16777216,
32484
+ max_storage_slots: 255
32724
32485
  },
32725
- {
32726
- tx_id: "0x619c80ee9f4c27c2e134cec6c67bdb268ce7fb1d2ac229ca2a44ec7ac88b2da99669",
32727
- output_index: 0,
32728
- tx_pointer_block_height: 0,
32729
- tx_pointer_tx_idx: 0,
32730
- owner: "0xbca334a06d19db5041c78fe2f465b07be5bec828f38b7796b2877e7d1542c950",
32731
- amount: 18446744073709552e3,
32732
- asset_id: "0x0000000000000000000000000000000000000000000000000000000000000000"
32486
+ fee_params: {
32487
+ gas_price_factor: 92,
32488
+ gas_per_byte: 4
32733
32489
  },
32734
- {
32735
- tx_id: "0x978d5b6be047ffbf1474dc376a6baa33264629b809e4a8210d11aaa805ec6451585d",
32736
- output_index: 0,
32737
- tx_pointer_block_height: 0,
32738
- tx_pointer_tx_idx: 0,
32739
- owner: "0xbca334a06d19db5041c78fe2f465b07be5bec828f38b7796b2877e7d1542c950",
32740
- amount: 18446744073709552e3,
32741
- asset_id: "0x0101010101010101010101010101010101010101010101010101010101010101"
32490
+ base_asset_id: "0x0000000000000000000000000000000000000000000000000000000000000000"
32491
+ },
32492
+ gas_costs: {
32493
+ add: 1,
32494
+ addi: 1,
32495
+ aloc: 1,
32496
+ and: 1,
32497
+ andi: 1,
32498
+ bal: 13,
32499
+ bhei: 1,
32500
+ bhsh: 1,
32501
+ burn: 132,
32502
+ cb: 1,
32503
+ cfei: 1,
32504
+ cfsi: 1,
32505
+ croo: 16,
32506
+ div: 1,
32507
+ divi: 1,
32508
+ ecr1: 3e3,
32509
+ eck1: 951,
32510
+ ed19: 3e3,
32511
+ eq: 1,
32512
+ exp: 1,
32513
+ expi: 1,
32514
+ flag: 1,
32515
+ gm: 1,
32516
+ gt: 1,
32517
+ gtf: 1,
32518
+ ji: 1,
32519
+ jmp: 1,
32520
+ jne: 1,
32521
+ jnei: 1,
32522
+ jnzi: 1,
32523
+ jmpf: 1,
32524
+ jmpb: 1,
32525
+ jnzf: 1,
32526
+ jnzb: 1,
32527
+ jnef: 1,
32528
+ jneb: 1,
32529
+ lb: 1,
32530
+ log: 9,
32531
+ lt: 1,
32532
+ lw: 1,
32533
+ mint: 135,
32534
+ mlog: 1,
32535
+ modOp: 1,
32536
+ modi: 1,
32537
+ moveOp: 1,
32538
+ movi: 1,
32539
+ mroo: 2,
32540
+ mul: 1,
32541
+ muli: 1,
32542
+ mldv: 1,
32543
+ noop: 1,
32544
+ not: 1,
32545
+ or: 1,
32546
+ ori: 1,
32547
+ poph: 2,
32548
+ popl: 2,
32549
+ pshh: 2,
32550
+ pshl: 2,
32551
+ ret: 13,
32552
+ rvrt: 13,
32553
+ sb: 1,
32554
+ sll: 1,
32555
+ slli: 1,
32556
+ srl: 1,
32557
+ srli: 1,
32558
+ srw: 12,
32559
+ sub: 1,
32560
+ subi: 1,
32561
+ sw: 1,
32562
+ sww: 67,
32563
+ time: 1,
32564
+ tr: 105,
32565
+ tro: 60,
32566
+ wdcm: 1,
32567
+ wqcm: 1,
32568
+ wdop: 1,
32569
+ wqop: 1,
32570
+ wdml: 1,
32571
+ wqml: 1,
32572
+ wddv: 1,
32573
+ wqdv: 2,
32574
+ wdmd: 3,
32575
+ wqmd: 4,
32576
+ wdam: 2,
32577
+ wqam: 3,
32578
+ wdmm: 3,
32579
+ wqmm: 3,
32580
+ xor: 1,
32581
+ xori: 1,
32582
+ call: {
32583
+ LightOperation: {
32584
+ base: 144,
32585
+ units_per_gas: 214
32586
+ }
32742
32587
  },
32743
- {
32744
- tx_id: "0x673ba12fca6e52429896096262b8c59b61751976e552649fb1fe7369488fc10aa83c",
32745
- output_index: 0,
32746
- tx_pointer_block_height: 0,
32747
- tx_pointer_tx_idx: 0,
32748
- owner: "0xbca334a06d19db5041c78fe2f465b07be5bec828f38b7796b2877e7d1542c950",
32749
- amount: 18446744073709552e3,
32750
- asset_id: "0x0202020202020202020202020202020202020202020202020202020202020202"
32588
+ ccp: {
32589
+ LightOperation: {
32590
+ base: 15,
32591
+ units_per_gas: 103
32592
+ }
32751
32593
  },
32752
- {
32753
- tx_id: "0xc42a165104b9fcfa4a9ebffc707781ace233f1c0609c24c36a5c4bfcd407480ddb6c",
32754
- output_index: 0,
32755
- tx_pointer_block_height: 0,
32756
- tx_pointer_tx_idx: 0,
32757
- owner: "0xbd9a1dc8d3ec3521c43f6c2c01611b4d0204c7610204ff0178488c8738a30bd2",
32758
- amount: 18446744073709552e3,
32759
- asset_id: "0x0000000000000000000000000000000000000000000000000000000000000000"
32594
+ csiz: {
32595
+ LightOperation: {
32596
+ base: 17,
32597
+ units_per_gas: 790
32598
+ }
32760
32599
  },
32761
- {
32762
- tx_id: "0xb353fbcd94abba347f3ba25e17744e98da26e608ebccbbbd2e9d004997644bdf993c",
32763
- output_index: 0,
32764
- tx_pointer_block_height: 0,
32765
- tx_pointer_tx_idx: 0,
32766
- owner: "0xbd9a1dc8d3ec3521c43f6c2c01611b4d0204c7610204ff0178488c8738a30bd2",
32767
- amount: 18446744073709552e3,
32768
- asset_id: "0x0101010101010101010101010101010101010101010101010101010101010101"
32600
+ k256: {
32601
+ LightOperation: {
32602
+ base: 11,
32603
+ units_per_gas: 214
32604
+ }
32769
32605
  },
32770
- {
32771
- tx_id: "0xc34a6fcb241dec82f885019caf5e14bb6708b435afebfef0037ac447fbb6d30378a3",
32772
- output_index: 0,
32773
- tx_pointer_block_height: 0,
32774
- tx_pointer_tx_idx: 0,
32775
- owner: "0xbd9a1dc8d3ec3521c43f6c2c01611b4d0204c7610204ff0178488c8738a30bd2",
32776
- amount: 18446744073709552e3,
32777
- asset_id: "0x0202020202020202020202020202020202020202020202020202020202020202"
32606
+ ldc: {
32607
+ LightOperation: {
32608
+ base: 15,
32609
+ units_per_gas: 272
32610
+ }
32778
32611
  },
32779
- {
32780
- tx_id: "0x421dfb5811c905724f2f4c6370cd15eaeb590ddeb966f9a4b9f8d65991dfe5142e12",
32781
- output_index: 0,
32782
- tx_pointer_block_height: 0,
32783
- tx_pointer_tx_idx: 0,
32784
- owner: "0xb32197cf75efe05bf453c26178139f09b391582065549c1422bc92555ecffb64",
32785
- amount: 18446744073709552e3,
32786
- asset_id: "0x0000000000000000000000000000000000000000000000000000000000000000"
32612
+ logd: {
32613
+ LightOperation: {
32614
+ base: 26,
32615
+ units_per_gas: 64
32616
+ }
32787
32617
  },
32788
- {
32789
- tx_id: "0xa952c0487eefac5dda612011c4c82554c8660834461b9b815c6ae257b56b68005235",
32790
- output_index: 0,
32791
- tx_pointer_block_height: 0,
32792
- tx_pointer_tx_idx: 0,
32793
- owner: "0xb32197cf75efe05bf453c26178139f09b391582065549c1422bc92555ecffb64",
32794
- amount: 18446744073709552e3,
32795
- asset_id: "0x0101010101010101010101010101010101010101010101010101010101010101"
32618
+ mcl: {
32619
+ LightOperation: {
32620
+ base: 1,
32621
+ units_per_gas: 3333
32622
+ }
32796
32623
  },
32797
- {
32798
- tx_id: "0xebaccf91b3b213341d047b6e6af214f1f9729b3d6dadf9c1918a9fe412486af871db",
32799
- output_index: 0,
32800
- tx_pointer_block_height: 0,
32801
- tx_pointer_tx_idx: 0,
32802
- owner: "0xb32197cf75efe05bf453c26178139f09b391582065549c1422bc92555ecffb64",
32803
- amount: 18446744073709552e3,
32804
- asset_id: "0x0202020202020202020202020202020202020202020202020202020202020202"
32624
+ mcli: {
32625
+ LightOperation: {
32626
+ base: 1,
32627
+ units_per_gas: 3333
32628
+ }
32805
32629
  },
32806
- {
32807
- tx_id: "0xda6d61c153e7d735954408274f4ffe8459c2dbab720ce22a1ae9ffedd33077b5b19d",
32808
- output_index: 0,
32809
- tx_pointer_block_height: 0,
32810
- tx_pointer_tx_idx: 0,
32811
- owner: "0x3b24509ed4ab3c7959f5c9391c1445c59290cdb5f13d6f780922f376b7029f30",
32812
- amount: 18446744073709552e3,
32813
- asset_id: "0x0000000000000000000000000000000000000000000000000000000000000000"
32630
+ mcp: {
32631
+ LightOperation: {
32632
+ base: 1,
32633
+ units_per_gas: 2e3
32634
+ }
32814
32635
  },
32815
- {
32816
- tx_id: "0x508871600ef68c4f1e021dd0db219c733107151338aa95de530bd10dc61f6a69c144",
32817
- output_index: 0,
32818
- tx_pointer_block_height: 0,
32819
- tx_pointer_tx_idx: 0,
32820
- owner: "0x3b24509ed4ab3c7959f5c9391c1445c59290cdb5f13d6f780922f376b7029f30",
32821
- amount: 18446744073709552e3,
32822
- asset_id: "0x0101010101010101010101010101010101010101010101010101010101010101"
32636
+ mcpi: {
32637
+ LightOperation: {
32638
+ base: 3,
32639
+ units_per_gas: 2e3
32640
+ }
32823
32641
  },
32824
- {
32825
- tx_id: "0x509994738b4973e2dbbff9596b176a89fb07ee95f0ed575a4fe07a735a2a181f3200",
32826
- output_index: 0,
32827
- tx_pointer_block_height: 0,
32828
- tx_pointer_tx_idx: 0,
32829
- owner: "0x3b24509ed4ab3c7959f5c9391c1445c59290cdb5f13d6f780922f376b7029f30",
32830
- amount: 18446744073709552e3,
32831
- asset_id: "0x0202020202020202020202020202020202020202020202020202020202020202"
32642
+ meq: {
32643
+ LightOperation: {
32644
+ base: 1,
32645
+ units_per_gas: 2500
32646
+ }
32832
32647
  },
32833
- {
32834
- tx_id: "0x6cc0cb58df0e0606fc85481aaaf5f47e145a67240b298c184bcb7fd7367c3bbf9453",
32835
- output_index: 0,
32836
- tx_pointer_block_height: 0,
32837
- tx_pointer_tx_idx: 0,
32838
- owner: "0x77c6f40b7da70d885f68efaad7c661327482a63ea10dcb4271de819438254ae1",
32839
- amount: 18446744073709552e3,
32840
- asset_id: "0x0000000000000000000000000000000000000000000000000000000000000000"
32648
+ retd: {
32649
+ LightOperation: {
32650
+ base: 29,
32651
+ units_per_gas: 62
32652
+ }
32841
32653
  },
32842
- {
32843
- tx_id: "0x9ddea761afc31516307e1553647ac6cc26d4a82fed9a9e6a03b994cdbf2293b3e3b6",
32844
- output_index: 0,
32845
- tx_pointer_block_height: 0,
32846
- tx_pointer_tx_idx: 0,
32847
- owner: "0x77c6f40b7da70d885f68efaad7c661327482a63ea10dcb4271de819438254ae1",
32848
- amount: 18446744073709552e3,
32849
- asset_id: "0x0101010101010101010101010101010101010101010101010101010101010101"
32654
+ s256: {
32655
+ LightOperation: {
32656
+ base: 2,
32657
+ units_per_gas: 214
32658
+ }
32850
32659
  },
32851
- {
32852
- tx_id: "0x82dbc478ba63abf28b92d9dce0cb8c2e6c02833d436fe812a33cf78417e4a80c1306",
32853
- output_index: 0,
32854
- tx_pointer_block_height: 0,
32855
- tx_pointer_tx_idx: 0,
32856
- owner: "0x77c6f40b7da70d885f68efaad7c661327482a63ea10dcb4271de819438254ae1",
32857
- amount: 18446744073709552e3,
32858
- asset_id: "0x0202020202020202020202020202020202020202020202020202020202020202"
32660
+ scwq: {
32661
+ LightOperation: {
32662
+ base: 13,
32663
+ units_per_gas: 5
32664
+ }
32859
32665
  },
32860
- {
32861
- tx_id: "0xc3b0cb232c74009fd226a6246403f78bcc33d116579f41d9387c0d76c76942749c7c",
32862
- output_index: 0,
32863
- tx_pointer_block_height: 0,
32864
- tx_pointer_tx_idx: 0,
32865
- owner: "0x6a2c4691c547c43924650dbd30620b184b5fe3fb6dbe5c4446110b08f6f405bf",
32866
- amount: 18446744073709552e3,
32867
- asset_id: "0x0000000000000000000000000000000000000000000000000000000000000000"
32666
+ smo: {
32667
+ LightOperation: {
32668
+ base: 209,
32669
+ units_per_gas: 55
32670
+ }
32868
32671
  },
32869
- {
32870
- tx_id: "0x708ee45d18f94ab06458712745c92c7b9b6049ba345219d6697eae5208ec0328aeaf",
32871
- output_index: 0,
32872
- tx_pointer_block_height: 0,
32873
- tx_pointer_tx_idx: 0,
32874
- owner: "0x6a2c4691c547c43924650dbd30620b184b5fe3fb6dbe5c4446110b08f6f405bf",
32875
- amount: 18446744073709552e3,
32876
- asset_id: "0x0101010101010101010101010101010101010101010101010101010101010101"
32672
+ srwq: {
32673
+ LightOperation: {
32674
+ base: 47,
32675
+ units_per_gas: 5
32676
+ }
32877
32677
  },
32878
- {
32879
- tx_id: "0xfe26968c44ac5becc608ce543075ae9e677b7631f3beb7a11ba20703fdca3c0e3569",
32880
- output_index: 0,
32881
- tx_pointer_block_height: 0,
32882
- tx_pointer_tx_idx: 0,
32883
- owner: "0x6a2c4691c547c43924650dbd30620b184b5fe3fb6dbe5c4446110b08f6f405bf",
32884
- amount: 18446744073709552e3,
32885
- asset_id: "0x0202020202020202020202020202020202020202020202020202020202020202"
32678
+ swwq: {
32679
+ LightOperation: {
32680
+ base: 44,
32681
+ units_per_gas: 5
32682
+ }
32886
32683
  },
32887
- {
32888
- tx_id: "0xe0ec1d2c991feac69be4d0e84ad7c964616de08e16dccc4d2000b1900ba31082b993",
32889
- output_index: 0,
32890
- tx_pointer_block_height: 0,
32891
- tx_pointer_tx_idx: 0,
32892
- owner: "0x49075a7538e2c88ebe1926ce4d898198a2a4e790d14512943a9864bc536b3c82",
32893
- amount: 18446744073709552e3,
32894
- asset_id: "0x0000000000000000000000000000000000000000000000000000000000000000"
32684
+ contract_root: {
32685
+ LightOperation: {
32686
+ base: 75,
32687
+ units_per_gas: 1
32688
+ }
32895
32689
  },
32896
- {
32897
- tx_id: "0xfa82dbdd72252d1e6c76ee818bbac0441c3a705aff447f041c8b9fc3cb03f9ccd7e2",
32898
- output_index: 0,
32899
- tx_pointer_block_height: 0,
32900
- tx_pointer_tx_idx: 0,
32901
- owner: "0x49075a7538e2c88ebe1926ce4d898198a2a4e790d14512943a9864bc536b3c82",
32902
- amount: 18446744073709552e3,
32903
- asset_id: "0x0101010101010101010101010101010101010101010101010101010101010101"
32690
+ state_root: {
32691
+ LightOperation: {
32692
+ base: 412,
32693
+ units_per_gas: 1
32694
+ }
32904
32695
  },
32905
- {
32906
- tx_id: "0x324f45e47cef892ac3e0759f3b72207c77046f9938267af4bd4af2ae031b97cb36c8",
32907
- output_index: 0,
32908
- tx_pointer_block_height: 0,
32909
- tx_pointer_tx_idx: 0,
32910
- owner: "0x49075a7538e2c88ebe1926ce4d898198a2a4e790d14512943a9864bc536b3c82",
32911
- amount: 18446744073709552e3,
32912
- asset_id: "0x0202020202020202020202020202020202020202020202020202020202020202"
32913
- }
32914
- ],
32915
- messages: [
32916
- {
32917
- sender: "0xc43454aa38dd91f88109a4b7aef5efb96ce34e3f24992fe0f81d233ca686f80f",
32918
- recipient: "0x69a2b736b60159b43bb8a4f98c0589f6da5fa3a3d101e8e269c499eb942753ba",
32919
- nonce: "0101010101010101010101010101010101010101010101010101010101010101",
32920
- amount: 18446744073709552e3,
32921
- data: "",
32922
- da_height: 0
32696
+ vm_initialization: {
32697
+ HeavyOperation: {
32698
+ base: 2e3,
32699
+ gas_per_unit: 0
32700
+ }
32923
32701
  },
32924
- {
32925
- sender: "0x69a2b736b60159b43bb8a4f98c0589f6da5fa3a3d101e8e269c499eb942753ba",
32926
- recipient: "0xc43454aa38dd91f88109a4b7aef5efb96ce34e3f24992fe0f81d233ca686f80f",
32927
- nonce: "0e1ef2963832068b0e1ef2963832068b0e1ef2963832068b0e1ef2963832068b",
32928
- amount: 12704439083013452e3,
32929
- data: "",
32930
- da_height: 0
32702
+ new_storage_per_byte: 1
32703
+ },
32704
+ consensus: {
32705
+ PoA: {
32706
+ signing_key: "0x94ffcc53b892684acefaebc8a3d4a595e528a8cf664eeb3ef36f1020b0809d0d"
32931
32707
  }
32932
- ],
32933
- contracts: [],
32934
- block_height: 0,
32935
- da_block_height: 0
32936
- };
32937
- var defaultChainConfigs = {
32938
- chainConfigJson: chainConfig_default,
32939
- metadataJson: metadata_default,
32940
- stateConfigJson: stateConfig_default
32708
+ }
32941
32709
  };
32710
+ var defaultChainConfig = chainConfig_default;
32942
32711
  var defaultConsensusKey = "0xa449b1ffee0e2205fa924c6740cc48b3b473aa28587df6dab12abc245d1f5298";
32943
32712
 
32944
32713
  // ../crypto/dist/index.mjs
32945
- var import_crypto9 = __toESM(__require("crypto"), 1);
32714
+ var import_crypto8 = __toESM(__require("crypto"), 1);
32946
32715
 
32947
32716
  // ../../node_modules/.pnpm/ethers@6.7.1/node_modules/ethers/lib.esm/_version.js
32948
32717
  var version = "6.7.1";
@@ -34014,27 +33783,6 @@ This unreleased fuel-core build may include features and updates not yet support
34014
33783
  };
34015
33784
  Object.freeze(pbkdf22);
34016
33785
 
34017
- // ../../node_modules/.pnpm/ethers@6.7.1/node_modules/ethers/lib.esm/crypto/random.js
34018
- var locked5 = false;
34019
- var _randomBytes = function(length) {
34020
- return new Uint8Array((0, import_crypto2.randomBytes)(length));
34021
- };
34022
- var __randomBytes = _randomBytes;
34023
- function randomBytes3(length) {
34024
- return __randomBytes(length);
34025
- }
34026
- randomBytes3._ = _randomBytes;
34027
- randomBytes3.lock = function() {
34028
- locked5 = true;
34029
- };
34030
- randomBytes3.register = function(func) {
34031
- if (locked5) {
34032
- throw new Error("randomBytes is locked");
34033
- }
34034
- __randomBytes = func;
34035
- };
34036
- Object.freeze(randomBytes3);
34037
-
34038
33786
  // ../../node_modules/.pnpm/ethers@6.7.1/node_modules/ethers/lib.esm/address/address.js
34039
33787
  var BN_03 = BigInt(0);
34040
33788
  var BN_36 = BigInt(36);
@@ -34619,8 +34367,8 @@ This unreleased fuel-core build may include features and updates not yet support
34619
34367
  }
34620
34368
 
34621
34369
  // ../crypto/dist/index.mjs
34370
+ var import_crypto9 = __toESM(__require("crypto"), 1);
34622
34371
  var import_crypto10 = __toESM(__require("crypto"), 1);
34623
- var import_crypto11 = __toESM(__require("crypto"), 1);
34624
34372
  var scrypt3 = (params) => {
34625
34373
  const { password, salt, n, p, r, dklen } = params;
34626
34374
  const derivedKey = scrypt(password, salt, { N: n, r, p, dkLen: dklen });
@@ -34629,7 +34377,7 @@ This unreleased fuel-core build may include features and updates not yet support
34629
34377
  var keccak2562 = (data) => keccak_256(data);
34630
34378
  var bufferFromString = (string, encoding = "base64") => Uint8Array.from(Buffer.from(string, encoding));
34631
34379
  var randomBytes4 = (length) => {
34632
- const randomValues = Uint8Array.from(import_crypto10.default.randomBytes(length));
34380
+ const randomValues = Uint8Array.from(import_crypto9.default.randomBytes(length));
34633
34381
  return randomValues;
34634
34382
  };
34635
34383
  var stringFromBuffer = (buffer, encoding = "base64") => Buffer.from(buffer).toString(encoding);
@@ -34644,7 +34392,7 @@ This unreleased fuel-core build may include features and updates not yet support
34644
34392
  const salt = randomBytes4(32);
34645
34393
  const secret = keyFromPassword(password, salt);
34646
34394
  const dataBuffer = Uint8Array.from(Buffer.from(JSON.stringify(data), "utf-8"));
34647
- const cipher = await import_crypto9.default.createCipheriv(ALGORITHM, secret, iv);
34395
+ const cipher = await import_crypto8.default.createCipheriv(ALGORITHM, secret, iv);
34648
34396
  let cipherData = cipher.update(dataBuffer);
34649
34397
  cipherData = Buffer.concat([cipherData, cipher.final()]);
34650
34398
  return {
@@ -34658,7 +34406,7 @@ This unreleased fuel-core build may include features and updates not yet support
34658
34406
  const salt = bufferFromString(keystore.salt);
34659
34407
  const secret = keyFromPassword(password, salt);
34660
34408
  const encryptedText = bufferFromString(keystore.data);
34661
- const decipher = await import_crypto9.default.createDecipheriv(ALGORITHM, secret, iv);
34409
+ const decipher = await import_crypto8.default.createDecipheriv(ALGORITHM, secret, iv);
34662
34410
  const decrypted = decipher.update(encryptedText);
34663
34411
  const deBuff = Buffer.concat([decrypted, decipher.final()]);
34664
34412
  const decryptedData = Buffer.from(deBuff).toString("utf-8");
@@ -34669,12 +34417,12 @@ This unreleased fuel-core build may include features and updates not yet support
34669
34417
  }
34670
34418
  };
34671
34419
  async function encryptJsonWalletData(data, key, iv) {
34672
- const cipher = await import_crypto11.default.createCipheriv("aes-128-ctr", key.subarray(0, 16), iv);
34420
+ const cipher = await import_crypto10.default.createCipheriv("aes-128-ctr", key.subarray(0, 16), iv);
34673
34421
  const encrypted = Buffer.concat([cipher.update(data), cipher.final()]);
34674
34422
  return new Uint8Array(encrypted);
34675
34423
  }
34676
34424
  async function decryptJsonWalletData(data, key, iv) {
34677
- const decipher = import_crypto11.default.createDecipheriv("aes-128-ctr", key.subarray(0, 16), iv);
34425
+ const decipher = import_crypto10.default.createDecipheriv("aes-128-ctr", key.subarray(0, 16), iv);
34678
34426
  const decrypted = await Buffer.concat([decipher.update(data), decipher.final()]);
34679
34427
  return new Uint8Array(decrypted);
34680
34428
  }
@@ -35008,10 +34756,6 @@ This unreleased fuel-core build may include features and updates not yet support
35008
34756
  }
35009
34757
  };
35010
34758
 
35011
- // ../address/dist/configs.mjs
35012
- var ZeroBytes32 = "0x0000000000000000000000000000000000000000000000000000000000000000";
35013
- var BaseAssetId = ZeroBytes32;
35014
-
35015
34759
  // ../math/dist/index.mjs
35016
34760
  var import_bn = __toESM(require_bn(), 1);
35017
34761
  var DEFAULT_PRECISION = 9;
@@ -35231,182 +34975,32 @@ This unreleased fuel-core build may include features and updates not yet support
35231
34975
  function toBytes3(value, bytesPadding) {
35232
34976
  return bn(value).toBytes(bytesPadding);
35233
34977
  }
35234
-
35235
- // ../../node_modules/.pnpm/ramda@0.29.0/node_modules/ramda/es/internal/_isPlaceholder.js
35236
- function _isPlaceholder(a) {
35237
- return a != null && typeof a === "object" && a["@@functional/placeholder"] === true;
35238
- }
35239
-
35240
- // ../../node_modules/.pnpm/ramda@0.29.0/node_modules/ramda/es/internal/_curry1.js
35241
- function _curry1(fn) {
35242
- return function f1(a) {
35243
- if (arguments.length === 0 || _isPlaceholder(a)) {
35244
- return f1;
35245
- } else {
35246
- return fn.apply(this, arguments);
35247
- }
35248
- };
35249
- }
35250
-
35251
- // ../../node_modules/.pnpm/ramda@0.29.0/node_modules/ramda/es/internal/_isArray.js
35252
- var isArray_default = Array.isArray || function _isArray(val) {
35253
- return val != null && val.length >= 0 && Object.prototype.toString.call(val) === "[object Array]";
35254
- };
35255
-
35256
- // ../../node_modules/.pnpm/ramda@0.29.0/node_modules/ramda/es/type.js
35257
- var type = /* @__PURE__ */ _curry1(function type2(val) {
35258
- return val === null ? "Null" : val === void 0 ? "Undefined" : Object.prototype.toString.call(val).slice(8, -1);
35259
- });
35260
- var type_default = type;
35261
-
35262
- // ../../node_modules/.pnpm/ramda@0.29.0/node_modules/ramda/es/internal/_toISOString.js
35263
- var pad = function pad2(n) {
35264
- return (n < 10 ? "0" : "") + n;
35265
- };
35266
- var _toISOString = typeof Date.prototype.toISOString === "function" ? function _toISOString2(d) {
35267
- return d.toISOString();
35268
- } : function _toISOString3(d) {
35269
- return d.getUTCFullYear() + "-" + pad(d.getUTCMonth() + 1) + "-" + pad(d.getUTCDate()) + "T" + pad(d.getUTCHours()) + ":" + pad(d.getUTCMinutes()) + ":" + pad(d.getUTCSeconds()) + "." + (d.getUTCMilliseconds() / 1e3).toFixed(3).slice(2, 5) + "Z";
35270
- };
35271
-
35272
- // ../../node_modules/.pnpm/ramda@0.29.0/node_modules/ramda/es/internal/_isInteger.js
35273
- var isInteger_default = Number.isInteger || function _isInteger(n) {
35274
- return n << 0 === n;
35275
- };
35276
-
35277
- // ../../node_modules/.pnpm/ramda@0.29.0/node_modules/ramda/es/internal/_cloneRegExp.js
35278
- function _cloneRegExp(pattern) {
35279
- return new RegExp(pattern.source, pattern.flags ? pattern.flags : (pattern.global ? "g" : "") + (pattern.ignoreCase ? "i" : "") + (pattern.multiline ? "m" : "") + (pattern.sticky ? "y" : "") + (pattern.unicode ? "u" : "") + (pattern.dotAll ? "s" : ""));
35280
- }
35281
-
35282
- // ../../node_modules/.pnpm/ramda@0.29.0/node_modules/ramda/es/internal/_clone.js
35283
- function _clone(value, deep, map) {
35284
- map || (map = new _ObjectMap());
35285
- if (_isPrimitive(value)) {
35286
- return value;
35287
- }
35288
- var copy = function copy2(copiedValue) {
35289
- var cachedCopy = map.get(value);
35290
- if (cachedCopy) {
35291
- return cachedCopy;
35292
- }
35293
- map.set(value, copiedValue);
35294
- for (var key in value) {
35295
- if (Object.prototype.hasOwnProperty.call(value, key)) {
35296
- copiedValue[key] = deep ? _clone(value[key], true, map) : value[key];
35297
- }
35298
- }
35299
- return copiedValue;
35300
- };
35301
- switch (type_default(value)) {
35302
- case "Object":
35303
- return copy(Object.create(Object.getPrototypeOf(value)));
35304
- case "Array":
35305
- return copy([]);
35306
- case "Date":
35307
- return new Date(value.valueOf());
35308
- case "RegExp":
35309
- return _cloneRegExp(value);
35310
- case "Int8Array":
35311
- case "Uint8Array":
35312
- case "Uint8ClampedArray":
35313
- case "Int16Array":
35314
- case "Uint16Array":
35315
- case "Int32Array":
35316
- case "Uint32Array":
35317
- case "Float32Array":
35318
- case "Float64Array":
35319
- case "BigInt64Array":
35320
- case "BigUint64Array":
35321
- return value.slice();
35322
- default:
35323
- return value;
35324
- }
35325
- }
35326
- function _isPrimitive(param) {
35327
- var type3 = typeof param;
35328
- return param == null || type3 != "object" && type3 != "function";
34978
+ function max(...numbers) {
34979
+ return numbers.reduce((prev, cur) => bn(cur).gt(prev) ? bn(cur) : prev, bn(0));
35329
34980
  }
35330
- var _ObjectMap = /* @__PURE__ */ function() {
35331
- function _ObjectMap2() {
35332
- this.map = {};
35333
- this.length = 0;
35334
- }
35335
- _ObjectMap2.prototype.set = function(key, value) {
35336
- const hashedKey = this.hash(key);
35337
- let bucket = this.map[hashedKey];
35338
- if (!bucket) {
35339
- this.map[hashedKey] = bucket = [];
35340
- }
35341
- bucket.push([key, value]);
35342
- this.length += 1;
35343
- };
35344
- _ObjectMap2.prototype.hash = function(key) {
35345
- let hashedKey = [];
35346
- for (var value in key) {
35347
- hashedKey.push(Object.prototype.toString.call(key[value]));
35348
- }
35349
- return hashedKey.join();
35350
- };
35351
- _ObjectMap2.prototype.get = function(key) {
35352
- if (this.length <= 180) {
35353
- for (const p in this.map) {
35354
- const bucket2 = this.map[p];
35355
- for (let i = 0; i < bucket2.length; i += 1) {
35356
- const element = bucket2[i];
35357
- if (element[0] === key) {
35358
- return element[1];
35359
- }
35360
- }
35361
- }
35362
- return;
35363
- }
35364
- const hashedKey = this.hash(key);
35365
- const bucket = this.map[hashedKey];
35366
- if (!bucket) {
35367
- return;
35368
- }
35369
- for (let i = 0; i < bucket.length; i += 1) {
35370
- const element = bucket[i];
35371
- if (element[0] === key) {
35372
- return element[1];
35373
- }
35374
- }
35375
- };
35376
- return _ObjectMap2;
35377
- }();
35378
-
35379
- // ../../node_modules/.pnpm/ramda@0.29.0/node_modules/ramda/es/clone.js
35380
- var clone = /* @__PURE__ */ _curry1(function clone2(value) {
35381
- return value != null && typeof value.clone === "function" ? value.clone() : _clone(value, true);
35382
- });
35383
- var clone_default = clone;
35384
-
35385
- // ../../node_modules/.pnpm/ramda@0.29.0/node_modules/ramda/es/trim.js
35386
- var hasProtoTrim = typeof String.prototype.trim === "function";
35387
34981
 
35388
34982
  // src/providers/coin-quantity.ts
35389
34983
  var coinQuantityfy = (coinQuantityLike) => {
35390
34984
  let assetId;
35391
34985
  let amount;
35392
- let max;
34986
+ let max2;
35393
34987
  if (Array.isArray(coinQuantityLike)) {
35394
34988
  amount = coinQuantityLike[0];
35395
- assetId = coinQuantityLike[1] ?? BaseAssetId;
35396
- max = coinQuantityLike[2] ?? void 0;
34989
+ assetId = coinQuantityLike[1];
34990
+ max2 = coinQuantityLike[2];
35397
34991
  } else {
35398
34992
  amount = coinQuantityLike.amount;
35399
- assetId = coinQuantityLike.assetId ?? BaseAssetId;
35400
- max = coinQuantityLike.max ?? void 0;
34993
+ assetId = coinQuantityLike.assetId;
34994
+ max2 = coinQuantityLike.max ?? void 0;
35401
34995
  }
35402
34996
  const bnAmount = bn(amount);
35403
34997
  return {
35404
34998
  assetId: hexlify(assetId),
35405
34999
  amount: bnAmount.lt(1) ? bn(1) : bnAmount,
35406
- max: max ? bn(max) : void 0
35000
+ max: max2 ? bn(max2) : void 0
35407
35001
  };
35408
35002
  };
35409
- var addAmountToCoinQuantities = (params) => {
35003
+ var addAmountToAsset = (params) => {
35410
35004
  const { amount, assetId } = params;
35411
35005
  const coinQuantities = [...params.coinQuantities];
35412
35006
  const assetIdx = coinQuantities.findIndex((coinQuantity) => coinQuantity.assetId === assetId);
@@ -35480,9 +35074,9 @@ This unreleased fuel-core build may include features and updates not yet support
35480
35074
  var TX_POINTER_LEN = WORD_SIZE * 2;
35481
35075
  var MAX_BYTES = 2 ** 32 - 1;
35482
35076
  var calculateVmTxMemory = ({ maxInputs }) => BYTES_32 + // Tx ID
35483
- ASSET_ID_LEN + // Base asset ID
35077
+ WORD_SIZE + // Tx size
35484
35078
  // Asset ID/Balance coin input pairs
35485
- maxInputs * (ASSET_ID_LEN + WORD_SIZE) + WORD_SIZE;
35079
+ maxInputs * (ASSET_ID_LEN + WORD_SIZE);
35486
35080
  var SCRIPT_FIXED_SIZE = WORD_SIZE + // Identifier
35487
35081
  WORD_SIZE + // Gas limit
35488
35082
  WORD_SIZE + // Script size
@@ -35500,6 +35094,7 @@ This unreleased fuel-core build may include features and updates not yet support
35500
35094
  ASSET_ID_LEN + // Asset id
35501
35095
  TX_POINTER_LEN + // TxPointer
35502
35096
  WORD_SIZE + // Witnesses index
35097
+ WORD_SIZE + // Maturity
35503
35098
  WORD_SIZE + // Predicate size
35504
35099
  WORD_SIZE + // Predicate data size
35505
35100
  WORD_SIZE;
@@ -35622,15 +35217,6 @@ This unreleased fuel-core build may include features and updates not yet support
35622
35217
  }
35623
35218
  };
35624
35219
  var isHeapType = (type3) => type3 === VEC_CODER_TYPE || type3 === BYTES_CODER_TYPE || type3 === STD_STRING_CODER_TYPE;
35625
- function findOrThrow(arr, predicate, throwFn = () => {
35626
- throw new FuelError(ErrorCode.ELEMENT_NOT_FOUND, "Element not found in the array.");
35627
- }) {
35628
- const found = arr.find(predicate);
35629
- if (found === void 0) {
35630
- throwFn();
35631
- }
35632
- return found;
35633
- }
35634
35220
  var isMultipleOfWordSize = (length) => length % WORD_SIZE === 0;
35635
35221
  var getWordSizePadding = (length) => WORD_SIZE - length % WORD_SIZE;
35636
35222
  var rightPadToWordSize = (encoded) => {
@@ -35829,7 +35415,7 @@ This unreleased fuel-core build may include features and updates not yet support
35829
35415
  constructor(name, coders) {
35830
35416
  const caseIndexCoder = new BigNumberCoder("u64");
35831
35417
  const encodedValueSize = Object.values(coders).reduce(
35832
- (max, coder) => Math.max(max, coder.encodedLength),
35418
+ (max2, coder) => Math.max(max2, coder.encodedLength),
35833
35419
  0
35834
35420
  );
35835
35421
  super(`enum ${name}`, `enum ${name}`, caseIndexCoder.encodedLength + encodedValueSize);
@@ -36213,6 +35799,38 @@ This unreleased fuel-core build may include features and updates not yet support
36213
35799
  ];
36214
35800
  }
36215
35801
  };
35802
+ var findFunctionByName = (abi, name) => {
35803
+ const fn = abi.functions.find((f2) => f2.name === name);
35804
+ if (!fn) {
35805
+ throw new FuelError(
35806
+ ErrorCode.FUNCTION_NOT_FOUND,
35807
+ `Function with name '${name}' doesn't exist in the ABI`
35808
+ );
35809
+ }
35810
+ return fn;
35811
+ };
35812
+ var findTypeById = (abi, typeId) => {
35813
+ const type3 = abi.types.find((t) => t.typeId === typeId);
35814
+ if (!type3) {
35815
+ throw new FuelError(
35816
+ ErrorCode.TYPE_NOT_FOUND,
35817
+ `Type with typeId '${typeId}' doesn't exist in the ABI.`
35818
+ );
35819
+ }
35820
+ return type3;
35821
+ };
35822
+ var findNonEmptyInputs = (abi, inputs) => inputs.filter((input) => findTypeById(abi, input.type).type !== "()");
35823
+ var findVectorBufferArgument = (components) => {
35824
+ const bufferComponent = components.find((c) => c.name === "buf");
35825
+ const bufferTypeArgument = bufferComponent?.originalTypeArguments?.[0];
35826
+ if (!bufferComponent || !bufferTypeArgument) {
35827
+ throw new FuelError(
35828
+ ErrorCode.INVALID_COMPONENT,
35829
+ `The Vec type provided is missing or has a malformed 'buf' component.`
35830
+ );
35831
+ }
35832
+ return bufferTypeArgument;
35833
+ };
36216
35834
  var ResolvedAbiType = class {
36217
35835
  abi;
36218
35836
  name;
@@ -36221,20 +35839,8 @@ This unreleased fuel-core build may include features and updates not yet support
36221
35839
  components;
36222
35840
  constructor(abi, argument) {
36223
35841
  this.abi = abi;
36224
- const type3 = findOrThrow(
36225
- abi.types,
36226
- (t) => t.typeId === argument.type,
36227
- () => {
36228
- throw new FuelError(
36229
- ErrorCode.TYPE_NOT_FOUND,
36230
- `Type does not exist in the provided abi: ${JSON.stringify({
36231
- argument,
36232
- abi: this.abi
36233
- })}`
36234
- );
36235
- }
36236
- );
36237
35842
  this.name = argument.name;
35843
+ const type3 = findTypeById(abi, argument.type);
36238
35844
  this.type = type3.type;
36239
35845
  this.originalTypeArguments = argument.typeArguments;
36240
35846
  this.components = ResolvedAbiType.getResolvedGenericComponents(
@@ -36286,7 +35892,7 @@ This unreleased fuel-core build may include features and updates not yet support
36286
35892
  )
36287
35893
  };
36288
35894
  }
36289
- const argType = findOrThrow(abi.types, (t) => t.typeId === arg.type);
35895
+ const argType = findTypeById(abi, arg.type);
36290
35896
  const implicitTypeParameters = this.getImplicitGenericTypeParameters(abi, argType.components);
36291
35897
  if (implicitTypeParameters && implicitTypeParameters.length > 0) {
36292
35898
  return {
@@ -36303,7 +35909,7 @@ This unreleased fuel-core build may include features and updates not yet support
36303
35909
  }
36304
35910
  const implicitGenericParameters = implicitGenericParametersParam ?? [];
36305
35911
  args.forEach((a) => {
36306
- const argType = findOrThrow(abi.types, (t) => t.typeId === a.type);
35912
+ const argType = findTypeById(abi, a.type);
36307
35913
  if (genericRegEx.test(argType.type)) {
36308
35914
  implicitGenericParameters.push(argType.typeId);
36309
35915
  return;
@@ -36412,13 +36018,7 @@ This unreleased fuel-core build may include features and updates not yet support
36412
36018
  return new ArrayCoder(arrayElementCoder, length);
36413
36019
  }
36414
36020
  if (resolvedAbiType.type === VEC_CODER_TYPE) {
36415
- const arg = findOrThrow(components, (c) => c.name === "buf").originalTypeArguments?.[0];
36416
- if (!arg) {
36417
- throw new FuelError(
36418
- ErrorCode.INVALID_COMPONENT,
36419
- `The provided Vec type is missing the 'type argument'.`
36420
- );
36421
- }
36021
+ const arg = findVectorBufferArgument(components);
36422
36022
  const argType = new ResolvedAbiType(resolvedAbiType.abi, arg);
36423
36023
  const itemCoder = getCoder(argType, { isSmallBytes: true, encoding: ENCODING_V0 });
36424
36024
  return new VecCoder(itemCoder);
@@ -36516,7 +36116,7 @@ This unreleased fuel-core build may include features and updates not yet support
36516
36116
  constructor(name, coders) {
36517
36117
  const caseIndexCoder = new BigNumberCoder("u64");
36518
36118
  const encodedValueSize = Object.values(coders).reduce(
36519
- (max, coder) => Math.max(max, coder.encodedLength),
36119
+ (max2, coder) => Math.max(max2, coder.encodedLength),
36520
36120
  0
36521
36121
  );
36522
36122
  super(`enum ${name}`, `enum ${name}`, caseIndexCoder.encodedLength + encodedValueSize);
@@ -36887,13 +36487,7 @@ This unreleased fuel-core build may include features and updates not yet support
36887
36487
  return new ArrayCoder(arrayElementCoder, length);
36888
36488
  }
36889
36489
  if (resolvedAbiType.type === VEC_CODER_TYPE) {
36890
- const arg = findOrThrow(components, (c) => c.name === "buf").originalTypeArguments?.[0];
36891
- if (!arg) {
36892
- throw new FuelError(
36893
- ErrorCode.INVALID_COMPONENT,
36894
- `The provided Vec type is missing the 'type argument'.`
36895
- );
36896
- }
36490
+ const arg = findVectorBufferArgument(components);
36897
36491
  const argType = new ResolvedAbiType(resolvedAbiType.abi, arg);
36898
36492
  const itemCoder = getCoder2(argType, { isSmallBytes: true, encoding: ENCODING_V0 });
36899
36493
  return new VecCoder2(itemCoder);
@@ -36964,7 +36558,7 @@ This unreleased fuel-core build may include features and updates not yet support
36964
36558
  jsonAbi;
36965
36559
  constructor(jsonAbi, name) {
36966
36560
  this.jsonAbi = jsonAbi;
36967
- this.jsonFn = findOrThrow(this.jsonAbi.functions, (f2) => f2.name === name);
36561
+ this.jsonFn = findFunctionByName(this.jsonAbi, name);
36968
36562
  this.name = name;
36969
36563
  this.signature = FunctionFragment.getSignature(this.jsonAbi, this.jsonFn);
36970
36564
  this.selector = FunctionFragment.getFunctionSelector(this.signature);
@@ -36988,13 +36582,11 @@ This unreleased fuel-core build may include features and updates not yet support
36988
36582
  return bn(hashedFunctionSignature.slice(0, 10)).toHex(8);
36989
36583
  }
36990
36584
  #isInputDataPointer() {
36991
- const inputTypes = this.jsonFn.inputs.map(
36992
- (i) => this.jsonAbi.types.find((t) => t.typeId === i.type)
36993
- );
36585
+ const inputTypes = this.jsonFn.inputs.map((i) => findTypeById(this.jsonAbi, i.type));
36994
36586
  return this.jsonFn.inputs.length > 1 || isPointerType(inputTypes[0]?.type || "");
36995
36587
  }
36996
36588
  #isOutputDataHeap() {
36997
- const outputType = findOrThrow(this.jsonAbi.types, (t) => t.typeId === this.jsonFn.output.type);
36589
+ const outputType = findTypeById(this.jsonAbi, this.jsonFn.output.type);
36998
36590
  return isHeapType(outputType?.type || "");
36999
36591
  }
37000
36592
  #getOutputEncodedLength() {
@@ -37014,9 +36606,7 @@ This unreleased fuel-core build may include features and updates not yet support
37014
36606
  encodeArguments(values, offset = 0) {
37015
36607
  FunctionFragment.verifyArgsAndInputsAlign(values, this.jsonFn.inputs, this.jsonAbi);
37016
36608
  const shallowCopyValues = values.slice();
37017
- const nonEmptyInputs = this.jsonFn.inputs.filter(
37018
- (x) => findOrThrow(this.jsonAbi.types, (t) => t.typeId === x.type).type !== "()"
37019
- );
36609
+ const nonEmptyInputs = findNonEmptyInputs(this.jsonAbi, this.jsonFn.inputs);
37020
36610
  if (Array.isArray(values) && nonEmptyInputs.length !== values.length) {
37021
36611
  shallowCopyValues.length = this.jsonFn.inputs.length;
37022
36612
  shallowCopyValues.fill(void 0, values.length);
@@ -37037,7 +36627,7 @@ This unreleased fuel-core build may include features and updates not yet support
37037
36627
  if (args.length === inputs.length) {
37038
36628
  return;
37039
36629
  }
37040
- const inputTypes = inputs.map((i) => findOrThrow(abi.types, (t) => t.typeId === i.type));
36630
+ const inputTypes = inputs.map((input) => findTypeById(abi, input.type));
37041
36631
  const optionalInputs = inputTypes.filter(
37042
36632
  (x) => x.type === OPTION_CODER_TYPE || x.type === "()"
37043
36633
  );
@@ -37052,9 +36642,7 @@ This unreleased fuel-core build may include features and updates not yet support
37052
36642
  }
37053
36643
  decodeArguments(data) {
37054
36644
  const bytes3 = arrayify(data);
37055
- const nonEmptyInputs = this.jsonFn.inputs.filter(
37056
- (x) => findOrThrow(this.jsonAbi.types, (t) => t.typeId === x.type).type !== "()"
37057
- );
36645
+ const nonEmptyInputs = findNonEmptyInputs(this.jsonAbi, this.jsonFn.inputs);
37058
36646
  if (nonEmptyInputs.length === 0) {
37059
36647
  if (bytes3.length === 0) {
37060
36648
  return void 0;
@@ -37089,10 +36677,7 @@ This unreleased fuel-core build may include features and updates not yet support
37089
36677
  return result.decoded;
37090
36678
  }
37091
36679
  decodeOutput(data) {
37092
- const outputAbiType = findOrThrow(
37093
- this.jsonAbi.types,
37094
- (t) => t.typeId === this.jsonFn.output.type
37095
- );
36680
+ const outputAbiType = findTypeById(this.jsonAbi, this.jsonFn.output.type);
37096
36681
  if (outputAbiType.type === "()") {
37097
36682
  return [void 0, 0];
37098
36683
  }
@@ -37144,38 +36729,32 @@ This unreleased fuel-core build may include features and updates not yet support
37144
36729
  return fragment.decodeOutput(data);
37145
36730
  }
37146
36731
  decodeLog(data, logId) {
37147
- const { loggedType } = findOrThrow(this.jsonAbi.loggedTypes, (type3) => type3.logId === logId);
37148
- return AbiCoder.decode(this.jsonAbi, loggedType, arrayify(data), 0, {
36732
+ const loggedType = this.jsonAbi.loggedTypes.find((type3) => type3.logId === logId);
36733
+ if (!loggedType) {
36734
+ throw new FuelError(
36735
+ ErrorCode.LOG_TYPE_NOT_FOUND,
36736
+ `Log type with logId '${logId}' doesn't exist in the ABI.`
36737
+ );
36738
+ }
36739
+ return AbiCoder.decode(this.jsonAbi, loggedType.loggedType, arrayify(data), 0, {
37149
36740
  encoding: this.jsonAbi.encoding
37150
36741
  });
37151
36742
  }
37152
36743
  encodeConfigurable(name, value) {
37153
- const configurable = findOrThrow(
37154
- this.jsonAbi.configurables,
37155
- (c) => c.name === name,
37156
- () => {
37157
- throw new FuelError(
37158
- ErrorCode.CONFIGURABLE_NOT_FOUND,
37159
- `A configurable with the '${name}' was not found in the ABI.`
37160
- );
37161
- }
37162
- );
36744
+ const configurable = this.jsonAbi.configurables.find((c) => c.name === name);
36745
+ if (!configurable) {
36746
+ throw new FuelError(
36747
+ ErrorCode.CONFIGURABLE_NOT_FOUND,
36748
+ `A configurable with the '${name}' was not found in the ABI.`
36749
+ );
36750
+ }
37163
36751
  return AbiCoder.encode(this.jsonAbi, configurable.configurableType, value, {
37164
36752
  isRightPadded: true,
37165
36753
  encoding: this.jsonAbi.encoding
37166
36754
  });
37167
36755
  }
37168
36756
  getTypeById(typeId) {
37169
- return findOrThrow(
37170
- this.jsonAbi.types,
37171
- (t) => t.typeId === typeId,
37172
- () => {
37173
- throw new FuelError(
37174
- ErrorCode.TYPE_NOT_FOUND,
37175
- `Type with typeId '${typeId}' doesn't exist in the ABI.`
37176
- );
37177
- }
37178
- );
36757
+ return findTypeById(this.jsonAbi, typeId);
37179
36758
  }
37180
36759
  };
37181
36760
 
@@ -37239,19 +36818,18 @@ This unreleased fuel-core build may include features and updates not yet support
37239
36818
  encode(value) {
37240
36819
  const parts = [];
37241
36820
  parts.push(new B256Coder().encode(value.txID));
37242
- parts.push(new NumberCoder("u16").encode(value.outputIndex));
36821
+ parts.push(new NumberCoder("u8").encode(value.outputIndex));
37243
36822
  parts.push(new B256Coder().encode(value.owner));
37244
36823
  parts.push(new BigNumberCoder("u64").encode(value.amount));
37245
36824
  parts.push(new B256Coder().encode(value.assetId));
37246
36825
  parts.push(new TxPointerCoder().encode(value.txPointer));
37247
- parts.push(new NumberCoder("u16").encode(value.witnessIndex));
36826
+ parts.push(new NumberCoder("u8").encode(value.witnessIndex));
36827
+ parts.push(new NumberCoder("u32").encode(value.maturity));
37248
36828
  parts.push(new BigNumberCoder("u64").encode(value.predicateGasUsed));
37249
- parts.push(new BigNumberCoder("u64").encode(value.predicateLength));
37250
- parts.push(new BigNumberCoder("u64").encode(value.predicateDataLength));
37251
- parts.push(new ByteArrayCoder(value.predicateLength.toNumber()).encode(value.predicate));
37252
- parts.push(
37253
- new ByteArrayCoder(value.predicateDataLength.toNumber()).encode(value.predicateData)
37254
- );
36829
+ parts.push(new NumberCoder("u32").encode(value.predicateLength));
36830
+ parts.push(new NumberCoder("u32").encode(value.predicateDataLength));
36831
+ parts.push(new ByteArrayCoder(value.predicateLength).encode(value.predicate));
36832
+ parts.push(new ByteArrayCoder(value.predicateDataLength).encode(value.predicateData));
37255
36833
  return concat(parts);
37256
36834
  }
37257
36835
  decode(data, offset) {
@@ -37259,7 +36837,7 @@ This unreleased fuel-core build may include features and updates not yet support
37259
36837
  let o = offset;
37260
36838
  [decoded, o] = new B256Coder().decode(data, o);
37261
36839
  const txID = decoded;
37262
- [decoded, o] = new NumberCoder("u16").decode(data, o);
36840
+ [decoded, o] = new NumberCoder("u8").decode(data, o);
37263
36841
  const outputIndex = decoded;
37264
36842
  [decoded, o] = new B256Coder().decode(data, o);
37265
36843
  const owner = decoded;
@@ -37269,17 +36847,19 @@ This unreleased fuel-core build may include features and updates not yet support
37269
36847
  const assetId = decoded;
37270
36848
  [decoded, o] = new TxPointerCoder().decode(data, o);
37271
36849
  const txPointer = decoded;
37272
- [decoded, o] = new NumberCoder("u16").decode(data, o);
36850
+ [decoded, o] = new NumberCoder("u8").decode(data, o);
37273
36851
  const witnessIndex = Number(decoded);
36852
+ [decoded, o] = new NumberCoder("u32").decode(data, o);
36853
+ const maturity = decoded;
37274
36854
  [decoded, o] = new BigNumberCoder("u64").decode(data, o);
37275
36855
  const predicateGasUsed = decoded;
37276
- [decoded, o] = new BigNumberCoder("u64").decode(data, o);
36856
+ [decoded, o] = new NumberCoder("u32").decode(data, o);
37277
36857
  const predicateLength = decoded;
37278
- [decoded, o] = new BigNumberCoder("u64").decode(data, o);
36858
+ [decoded, o] = new NumberCoder("u32").decode(data, o);
37279
36859
  const predicateDataLength = decoded;
37280
- [decoded, o] = new ByteArrayCoder(predicateLength.toNumber()).decode(data, o);
36860
+ [decoded, o] = new ByteArrayCoder(predicateLength).decode(data, o);
37281
36861
  const predicate = decoded;
37282
- [decoded, o] = new ByteArrayCoder(predicateDataLength.toNumber()).decode(data, o);
36862
+ [decoded, o] = new ByteArrayCoder(predicateDataLength).decode(data, o);
37283
36863
  const predicateData = decoded;
37284
36864
  return [
37285
36865
  {
@@ -37291,6 +36871,7 @@ This unreleased fuel-core build may include features and updates not yet support
37291
36871
  assetId,
37292
36872
  txPointer,
37293
36873
  witnessIndex,
36874
+ maturity,
37294
36875
  predicateGasUsed,
37295
36876
  predicateLength,
37296
36877
  predicateDataLength,
@@ -37308,7 +36889,7 @@ This unreleased fuel-core build may include features and updates not yet support
37308
36889
  encode(value) {
37309
36890
  const parts = [];
37310
36891
  parts.push(new B256Coder().encode(value.txID));
37311
- parts.push(new NumberCoder("u16").encode(value.outputIndex));
36892
+ parts.push(new NumberCoder("u8").encode(value.outputIndex));
37312
36893
  parts.push(new B256Coder().encode(value.balanceRoot));
37313
36894
  parts.push(new B256Coder().encode(value.stateRoot));
37314
36895
  parts.push(new TxPointerCoder().encode(value.txPointer));
@@ -37320,7 +36901,7 @@ This unreleased fuel-core build may include features and updates not yet support
37320
36901
  let o = offset;
37321
36902
  [decoded, o] = new B256Coder().decode(data, o);
37322
36903
  const txID = decoded;
37323
- [decoded, o] = new NumberCoder("u16").decode(data, o);
36904
+ [decoded, o] = new NumberCoder("u8").decode(data, o);
37324
36905
  const outputIndex = decoded;
37325
36906
  [decoded, o] = new B256Coder().decode(data, o);
37326
36907
  const balanceRoot = decoded;
@@ -37369,16 +36950,14 @@ This unreleased fuel-core build may include features and updates not yet support
37369
36950
  parts.push(new ByteArrayCoder(32).encode(value.recipient));
37370
36951
  parts.push(new BigNumberCoder("u64").encode(value.amount));
37371
36952
  parts.push(new ByteArrayCoder(32).encode(value.nonce));
37372
- parts.push(new NumberCoder("u16").encode(value.witnessIndex));
36953
+ parts.push(new NumberCoder("u8").encode(value.witnessIndex));
37373
36954
  parts.push(new BigNumberCoder("u64").encode(value.predicateGasUsed));
37374
- parts.push(new BigNumberCoder("u64").encode(data.length));
37375
- parts.push(new BigNumberCoder("u64").encode(value.predicateLength));
37376
- parts.push(new BigNumberCoder("u64").encode(value.predicateDataLength));
36955
+ parts.push(new NumberCoder("u32").encode(data.length));
36956
+ parts.push(new NumberCoder("u32").encode(value.predicateLength));
36957
+ parts.push(new NumberCoder("u32").encode(value.predicateDataLength));
37377
36958
  parts.push(new ByteArrayCoder(data.length).encode(data));
37378
- parts.push(new ByteArrayCoder(value.predicateLength.toNumber()).encode(value.predicate));
37379
- parts.push(
37380
- new ByteArrayCoder(value.predicateDataLength.toNumber()).encode(value.predicateData)
37381
- );
36959
+ parts.push(new ByteArrayCoder(value.predicateLength).encode(value.predicate));
36960
+ parts.push(new ByteArrayCoder(value.predicateDataLength).encode(value.predicateData));
37382
36961
  return concat(parts);
37383
36962
  }
37384
36963
  static decodeData(messageData) {
@@ -37398,21 +36977,21 @@ This unreleased fuel-core build may include features and updates not yet support
37398
36977
  const amount = decoded;
37399
36978
  [decoded, o] = new B256Coder().decode(data, o);
37400
36979
  const nonce = decoded;
37401
- [decoded, o] = new NumberCoder("u16").decode(data, o);
36980
+ [decoded, o] = new NumberCoder("u8").decode(data, o);
37402
36981
  const witnessIndex = Number(decoded);
37403
36982
  [decoded, o] = new BigNumberCoder("u64").decode(data, o);
37404
36983
  const predicateGasUsed = decoded;
37405
36984
  [decoded, o] = new NumberCoder("u32").decode(data, o);
37406
36985
  const dataLength2 = decoded;
37407
- [decoded, o] = new BigNumberCoder("u64").decode(data, o);
36986
+ [decoded, o] = new NumberCoder("u32").decode(data, o);
37408
36987
  const predicateLength = decoded;
37409
- [decoded, o] = new BigNumberCoder("u64").decode(data, o);
36988
+ [decoded, o] = new NumberCoder("u32").decode(data, o);
37410
36989
  const predicateDataLength = decoded;
37411
36990
  [decoded, o] = new ByteArrayCoder(dataLength2).decode(data, o);
37412
36991
  const messageData = decoded;
37413
- [decoded, o] = new ByteArrayCoder(predicateLength.toNumber()).decode(data, o);
36992
+ [decoded, o] = new ByteArrayCoder(predicateLength).decode(data, o);
37414
36993
  const predicate = decoded;
37415
- [decoded, o] = new ByteArrayCoder(predicateDataLength.toNumber()).decode(data, o);
36994
+ [decoded, o] = new ByteArrayCoder(predicateDataLength).decode(data, o);
37416
36995
  const predicateData = decoded;
37417
36996
  return [
37418
36997
  {
@@ -37724,7 +37303,7 @@ This unreleased fuel-core build may include features and updates not yet support
37724
37303
  }
37725
37304
  };
37726
37305
  var PolicyType = /* @__PURE__ */ ((PolicyType2) => {
37727
- PolicyType2[PolicyType2["Tip"] = 1] = "Tip";
37306
+ PolicyType2[PolicyType2["GasPrice"] = 1] = "GasPrice";
37728
37307
  PolicyType2[PolicyType2["WitnessLimit"] = 2] = "WitnessLimit";
37729
37308
  PolicyType2[PolicyType2["Maturity"] = 4] = "Maturity";
37730
37309
  PolicyType2[PolicyType2["MaxFee"] = 8] = "MaxFee";
@@ -37772,9 +37351,9 @@ This unreleased fuel-core build may include features and updates not yet support
37772
37351
  let o = offset;
37773
37352
  const policies = [];
37774
37353
  if (policyTypes & 1) {
37775
- const [tip, nextOffset] = new BigNumberCoder("u64").decode(data, o);
37354
+ const [gasPrice, nextOffset] = new BigNumberCoder("u64").decode(data, o);
37776
37355
  o = nextOffset;
37777
- policies.push({ type: 1, data: tip });
37356
+ policies.push({ type: 1, data: gasPrice });
37778
37357
  }
37779
37358
  if (policyTypes & 2) {
37780
37359
  const [witnessLimit, nextOffset] = new BigNumberCoder("u64").decode(data, o);
@@ -38006,15 +37585,15 @@ This unreleased fuel-core build may include features and updates not yet support
38006
37585
  encode(value) {
38007
37586
  const parts = [];
38008
37587
  parts.push(new BigNumberCoder("u64").encode(value.scriptGasLimit));
38009
- parts.push(new B256Coder().encode(value.receiptsRoot));
38010
- parts.push(new BigNumberCoder("u64").encode(value.scriptLength));
38011
- parts.push(new BigNumberCoder("u64").encode(value.scriptDataLength));
37588
+ parts.push(new NumberCoder("u32").encode(value.scriptLength));
37589
+ parts.push(new NumberCoder("u32").encode(value.scriptDataLength));
38012
37590
  parts.push(new NumberCoder("u32").encode(value.policyTypes));
38013
- parts.push(new NumberCoder("u16").encode(value.inputsCount));
38014
- parts.push(new NumberCoder("u16").encode(value.outputsCount));
38015
- parts.push(new NumberCoder("u16").encode(value.witnessesCount));
38016
- parts.push(new ByteArrayCoder(value.scriptLength.toNumber()).encode(value.script));
38017
- parts.push(new ByteArrayCoder(value.scriptDataLength.toNumber()).encode(value.scriptData));
37591
+ parts.push(new NumberCoder("u8").encode(value.inputsCount));
37592
+ parts.push(new NumberCoder("u8").encode(value.outputsCount));
37593
+ parts.push(new NumberCoder("u8").encode(value.witnessesCount));
37594
+ parts.push(new B256Coder().encode(value.receiptsRoot));
37595
+ parts.push(new ByteArrayCoder(value.scriptLength).encode(value.script));
37596
+ parts.push(new ByteArrayCoder(value.scriptDataLength).encode(value.scriptData));
38018
37597
  parts.push(new PoliciesCoder().encode(value.policies));
38019
37598
  parts.push(new ArrayCoder(new InputCoder(), value.inputsCount).encode(value.inputs));
38020
37599
  parts.push(new ArrayCoder(new OutputCoder(), value.outputsCount).encode(value.outputs));
@@ -38026,23 +37605,23 @@ This unreleased fuel-core build may include features and updates not yet support
38026
37605
  let o = offset;
38027
37606
  [decoded, o] = new BigNumberCoder("u64").decode(data, o);
38028
37607
  const scriptGasLimit = decoded;
38029
- [decoded, o] = new B256Coder().decode(data, o);
38030
- const receiptsRoot = decoded;
38031
- [decoded, o] = new BigNumberCoder("u64").decode(data, o);
37608
+ [decoded, o] = new NumberCoder("u32").decode(data, o);
38032
37609
  const scriptLength = decoded;
38033
- [decoded, o] = new BigNumberCoder("u64").decode(data, o);
37610
+ [decoded, o] = new NumberCoder("u32").decode(data, o);
38034
37611
  const scriptDataLength = decoded;
38035
37612
  [decoded, o] = new NumberCoder("u32").decode(data, o);
38036
37613
  const policyTypes = decoded;
38037
- [decoded, o] = new NumberCoder("u16").decode(data, o);
37614
+ [decoded, o] = new NumberCoder("u8").decode(data, o);
38038
37615
  const inputsCount = decoded;
38039
- [decoded, o] = new NumberCoder("u16").decode(data, o);
37616
+ [decoded, o] = new NumberCoder("u8").decode(data, o);
38040
37617
  const outputsCount = decoded;
38041
- [decoded, o] = new NumberCoder("u16").decode(data, o);
37618
+ [decoded, o] = new NumberCoder("u8").decode(data, o);
38042
37619
  const witnessesCount = decoded;
38043
- [decoded, o] = new ByteArrayCoder(scriptLength.toNumber()).decode(data, o);
37620
+ [decoded, o] = new B256Coder().decode(data, o);
37621
+ const receiptsRoot = decoded;
37622
+ [decoded, o] = new ByteArrayCoder(scriptLength).decode(data, o);
38044
37623
  const script = decoded;
38045
- [decoded, o] = new ByteArrayCoder(scriptDataLength.toNumber()).decode(data, o);
37624
+ [decoded, o] = new ByteArrayCoder(scriptDataLength).decode(data, o);
38046
37625
  const scriptData = decoded;
38047
37626
  [decoded, o] = new PoliciesCoder().decode(data, o, policyTypes);
38048
37627
  const policies = decoded;
@@ -38080,19 +37659,18 @@ This unreleased fuel-core build may include features and updates not yet support
38080
37659
  }
38081
37660
  encode(value) {
38082
37661
  const parts = [];
38083
- parts.push(new NumberCoder("u16").encode(value.bytecodeWitnessIndex));
38084
- parts.push(new B256Coder().encode(value.salt));
38085
- parts.push(new BigNumberCoder("u64").encode(value.storageSlotsCount));
37662
+ parts.push(new NumberCoder("u32").encode(value.bytecodeLength));
37663
+ parts.push(new NumberCoder("u8").encode(value.bytecodeWitnessIndex));
38086
37664
  parts.push(new NumberCoder("u32").encode(value.policyTypes));
38087
- parts.push(new NumberCoder("u16").encode(value.inputsCount));
38088
- parts.push(new NumberCoder("u16").encode(value.outputsCount));
38089
- parts.push(new NumberCoder("u16").encode(value.witnessesCount));
37665
+ parts.push(new NumberCoder("u16").encode(value.storageSlotsCount));
37666
+ parts.push(new NumberCoder("u8").encode(value.inputsCount));
37667
+ parts.push(new NumberCoder("u8").encode(value.outputsCount));
37668
+ parts.push(new NumberCoder("u8").encode(value.witnessesCount));
37669
+ parts.push(new B256Coder().encode(value.salt));
37670
+ parts.push(new PoliciesCoder().encode(value.policies));
38090
37671
  parts.push(
38091
- new ArrayCoder(new StorageSlotCoder(), value.storageSlotsCount.toNumber()).encode(
38092
- value.storageSlots
38093
- )
37672
+ new ArrayCoder(new StorageSlotCoder(), value.storageSlotsCount).encode(value.storageSlots)
38094
37673
  );
38095
- parts.push(new PoliciesCoder().encode(value.policies));
38096
37674
  parts.push(new ArrayCoder(new InputCoder(), value.inputsCount).encode(value.inputs));
38097
37675
  parts.push(new ArrayCoder(new OutputCoder(), value.outputsCount).encode(value.outputs));
38098
37676
  parts.push(new ArrayCoder(new WitnessCoder(), value.witnessesCount).encode(value.witnesses));
@@ -38101,27 +37679,26 @@ This unreleased fuel-core build may include features and updates not yet support
38101
37679
  decode(data, offset) {
38102
37680
  let decoded;
38103
37681
  let o = offset;
38104
- [decoded, o] = new NumberCoder("u16").decode(data, o);
37682
+ [decoded, o] = new NumberCoder("u32").decode(data, o);
37683
+ const bytecodeLength = decoded;
37684
+ [decoded, o] = new NumberCoder("u8").decode(data, o);
38105
37685
  const bytecodeWitnessIndex = decoded;
38106
- [decoded, o] = new B256Coder().decode(data, o);
38107
- const salt = decoded;
38108
- [decoded, o] = new BigNumberCoder("u64").decode(data, o);
38109
- const storageSlotsCount = decoded;
38110
37686
  [decoded, o] = new NumberCoder("u32").decode(data, o);
38111
37687
  const policyTypes = decoded;
38112
37688
  [decoded, o] = new NumberCoder("u16").decode(data, o);
37689
+ const storageSlotsCount = decoded;
37690
+ [decoded, o] = new NumberCoder("u8").decode(data, o);
38113
37691
  const inputsCount = decoded;
38114
- [decoded, o] = new NumberCoder("u16").decode(data, o);
37692
+ [decoded, o] = new NumberCoder("u8").decode(data, o);
38115
37693
  const outputsCount = decoded;
38116
- [decoded, o] = new NumberCoder("u16").decode(data, o);
37694
+ [decoded, o] = new NumberCoder("u8").decode(data, o);
38117
37695
  const witnessesCount = decoded;
38118
- [decoded, o] = new ArrayCoder(new StorageSlotCoder(), storageSlotsCount.toNumber()).decode(
38119
- data,
38120
- o
38121
- );
38122
- const storageSlots = decoded;
37696
+ [decoded, o] = new B256Coder().decode(data, o);
37697
+ const salt = decoded;
38123
37698
  [decoded, o] = new PoliciesCoder().decode(data, o, policyTypes);
38124
37699
  const policies = decoded;
37700
+ [decoded, o] = new ArrayCoder(new StorageSlotCoder(), storageSlotsCount).decode(data, o);
37701
+ const storageSlots = decoded;
38125
37702
  [decoded, o] = new ArrayCoder(new InputCoder(), inputsCount).decode(data, o);
38126
37703
  const inputs = decoded;
38127
37704
  [decoded, o] = new ArrayCoder(new OutputCoder(), outputsCount).decode(data, o);
@@ -38131,6 +37708,7 @@ This unreleased fuel-core build may include features and updates not yet support
38131
37708
  return [
38132
37709
  {
38133
37710
  type: 1,
37711
+ bytecodeLength,
38134
37712
  bytecodeWitnessIndex,
38135
37713
  policyTypes,
38136
37714
  storageSlotsCount,
@@ -38159,7 +37737,6 @@ This unreleased fuel-core build may include features and updates not yet support
38159
37737
  parts.push(new OutputContractCoder().encode(value.outputContract));
38160
37738
  parts.push(new BigNumberCoder("u64").encode(value.mintAmount));
38161
37739
  parts.push(new B256Coder().encode(value.mintAssetId));
38162
- parts.push(new BigNumberCoder("u64").encode(value.gasPrice));
38163
37740
  return concat(parts);
38164
37741
  }
38165
37742
  decode(data, offset) {
@@ -38175,8 +37752,6 @@ This unreleased fuel-core build may include features and updates not yet support
38175
37752
  const mintAmount = decoded;
38176
37753
  [decoded, o] = new B256Coder().decode(data, o);
38177
37754
  const mintAssetId = decoded;
38178
- [decoded, o] = new BigNumberCoder("u64").decode(data, o);
38179
- const gasPrice = decoded;
38180
37755
  return [
38181
37756
  {
38182
37757
  type: 2,
@@ -38184,8 +37759,7 @@ This unreleased fuel-core build may include features and updates not yet support
38184
37759
  inputContract,
38185
37760
  outputContract,
38186
37761
  mintAmount,
38187
- mintAssetId,
38188
- gasPrice
37762
+ mintAssetId
38189
37763
  },
38190
37764
  o
38191
37765
  ];
@@ -38492,6 +38066,159 @@ This unreleased fuel-core build may include features and updates not yet support
38492
38066
  // src/providers/provider.ts
38493
38067
  var import_graphql_request = __toESM(require_dist2());
38494
38068
 
38069
+ // ../../node_modules/.pnpm/ramda@0.29.0/node_modules/ramda/es/internal/_isPlaceholder.js
38070
+ function _isPlaceholder(a) {
38071
+ return a != null && typeof a === "object" && a["@@functional/placeholder"] === true;
38072
+ }
38073
+
38074
+ // ../../node_modules/.pnpm/ramda@0.29.0/node_modules/ramda/es/internal/_curry1.js
38075
+ function _curry1(fn) {
38076
+ return function f1(a) {
38077
+ if (arguments.length === 0 || _isPlaceholder(a)) {
38078
+ return f1;
38079
+ } else {
38080
+ return fn.apply(this, arguments);
38081
+ }
38082
+ };
38083
+ }
38084
+
38085
+ // ../../node_modules/.pnpm/ramda@0.29.0/node_modules/ramda/es/internal/_isArray.js
38086
+ var isArray_default = Array.isArray || function _isArray(val) {
38087
+ return val != null && val.length >= 0 && Object.prototype.toString.call(val) === "[object Array]";
38088
+ };
38089
+
38090
+ // ../../node_modules/.pnpm/ramda@0.29.0/node_modules/ramda/es/type.js
38091
+ var type = /* @__PURE__ */ _curry1(function type2(val) {
38092
+ return val === null ? "Null" : val === void 0 ? "Undefined" : Object.prototype.toString.call(val).slice(8, -1);
38093
+ });
38094
+ var type_default = type;
38095
+
38096
+ // ../../node_modules/.pnpm/ramda@0.29.0/node_modules/ramda/es/internal/_toISOString.js
38097
+ var pad = function pad2(n) {
38098
+ return (n < 10 ? "0" : "") + n;
38099
+ };
38100
+ var _toISOString = typeof Date.prototype.toISOString === "function" ? function _toISOString2(d) {
38101
+ return d.toISOString();
38102
+ } : function _toISOString3(d) {
38103
+ 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";
38104
+ };
38105
+
38106
+ // ../../node_modules/.pnpm/ramda@0.29.0/node_modules/ramda/es/internal/_isInteger.js
38107
+ var isInteger_default = Number.isInteger || function _isInteger(n) {
38108
+ return n << 0 === n;
38109
+ };
38110
+
38111
+ // ../../node_modules/.pnpm/ramda@0.29.0/node_modules/ramda/es/internal/_cloneRegExp.js
38112
+ function _cloneRegExp(pattern) {
38113
+ 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" : ""));
38114
+ }
38115
+
38116
+ // ../../node_modules/.pnpm/ramda@0.29.0/node_modules/ramda/es/internal/_clone.js
38117
+ function _clone(value, deep, map) {
38118
+ map || (map = new _ObjectMap());
38119
+ if (_isPrimitive(value)) {
38120
+ return value;
38121
+ }
38122
+ var copy = function copy2(copiedValue) {
38123
+ var cachedCopy = map.get(value);
38124
+ if (cachedCopy) {
38125
+ return cachedCopy;
38126
+ }
38127
+ map.set(value, copiedValue);
38128
+ for (var key in value) {
38129
+ if (Object.prototype.hasOwnProperty.call(value, key)) {
38130
+ copiedValue[key] = deep ? _clone(value[key], true, map) : value[key];
38131
+ }
38132
+ }
38133
+ return copiedValue;
38134
+ };
38135
+ switch (type_default(value)) {
38136
+ case "Object":
38137
+ return copy(Object.create(Object.getPrototypeOf(value)));
38138
+ case "Array":
38139
+ return copy([]);
38140
+ case "Date":
38141
+ return new Date(value.valueOf());
38142
+ case "RegExp":
38143
+ return _cloneRegExp(value);
38144
+ case "Int8Array":
38145
+ case "Uint8Array":
38146
+ case "Uint8ClampedArray":
38147
+ case "Int16Array":
38148
+ case "Uint16Array":
38149
+ case "Int32Array":
38150
+ case "Uint32Array":
38151
+ case "Float32Array":
38152
+ case "Float64Array":
38153
+ case "BigInt64Array":
38154
+ case "BigUint64Array":
38155
+ return value.slice();
38156
+ default:
38157
+ return value;
38158
+ }
38159
+ }
38160
+ function _isPrimitive(param) {
38161
+ var type3 = typeof param;
38162
+ return param == null || type3 != "object" && type3 != "function";
38163
+ }
38164
+ var _ObjectMap = /* @__PURE__ */ function() {
38165
+ function _ObjectMap2() {
38166
+ this.map = {};
38167
+ this.length = 0;
38168
+ }
38169
+ _ObjectMap2.prototype.set = function(key, value) {
38170
+ const hashedKey = this.hash(key);
38171
+ let bucket = this.map[hashedKey];
38172
+ if (!bucket) {
38173
+ this.map[hashedKey] = bucket = [];
38174
+ }
38175
+ bucket.push([key, value]);
38176
+ this.length += 1;
38177
+ };
38178
+ _ObjectMap2.prototype.hash = function(key) {
38179
+ let hashedKey = [];
38180
+ for (var value in key) {
38181
+ hashedKey.push(Object.prototype.toString.call(key[value]));
38182
+ }
38183
+ return hashedKey.join();
38184
+ };
38185
+ _ObjectMap2.prototype.get = function(key) {
38186
+ if (this.length <= 180) {
38187
+ for (const p in this.map) {
38188
+ const bucket2 = this.map[p];
38189
+ for (let i = 0; i < bucket2.length; i += 1) {
38190
+ const element = bucket2[i];
38191
+ if (element[0] === key) {
38192
+ return element[1];
38193
+ }
38194
+ }
38195
+ }
38196
+ return;
38197
+ }
38198
+ const hashedKey = this.hash(key);
38199
+ const bucket = this.map[hashedKey];
38200
+ if (!bucket) {
38201
+ return;
38202
+ }
38203
+ for (let i = 0; i < bucket.length; i += 1) {
38204
+ const element = bucket[i];
38205
+ if (element[0] === key) {
38206
+ return element[1];
38207
+ }
38208
+ }
38209
+ };
38210
+ return _ObjectMap2;
38211
+ }();
38212
+
38213
+ // ../../node_modules/.pnpm/ramda@0.29.0/node_modules/ramda/es/clone.js
38214
+ var clone2 = /* @__PURE__ */ _curry1(function clone3(value) {
38215
+ return value != null && typeof value.clone === "function" ? value.clone() : _clone(value, true);
38216
+ });
38217
+ var clone_default = clone2;
38218
+
38219
+ // ../../node_modules/.pnpm/ramda@0.29.0/node_modules/ramda/es/trim.js
38220
+ var hasProtoTrim = typeof String.prototype.trim === "function";
38221
+
38495
38222
  // ../../node_modules/.pnpm/tslib@2.6.0/node_modules/tslib/tslib.es6.mjs
38496
38223
  var __assign = function() {
38497
38224
  __assign = Object.assign || function __assign2(t) {
@@ -41659,10 +41386,14 @@ spurious results.`);
41659
41386
  // src/providers/__generated__/operations.ts
41660
41387
  var ReceiptFragmentFragmentDoc = lib_default2`
41661
41388
  fragment receiptFragment on Receipt {
41662
- id
41389
+ contract {
41390
+ id
41391
+ }
41663
41392
  pc
41664
41393
  is
41665
- to
41394
+ to {
41395
+ id
41396
+ }
41666
41397
  toAddress
41667
41398
  amount
41668
41399
  assetId
@@ -41700,16 +41431,10 @@ spurious results.`);
41700
41431
  id
41701
41432
  }
41702
41433
  time
41703
- receipts {
41704
- ...receiptFragment
41705
- }
41706
41434
  programState {
41707
41435
  returnType
41708
41436
  data
41709
41437
  }
41710
- receipts {
41711
- ...receiptFragment
41712
- }
41713
41438
  }
41714
41439
  ... on FailureStatus {
41715
41440
  block {
@@ -41717,24 +41442,26 @@ spurious results.`);
41717
41442
  }
41718
41443
  time
41719
41444
  reason
41720
- receipts {
41721
- ...receiptFragment
41722
- }
41723
41445
  }
41724
41446
  ... on SqueezedOutStatus {
41725
41447
  reason
41726
41448
  }
41727
41449
  }
41728
- ${ReceiptFragmentFragmentDoc}`;
41450
+ `;
41729
41451
  var TransactionFragmentFragmentDoc = lib_default2`
41730
41452
  fragment transactionFragment on Transaction {
41731
41453
  id
41732
41454
  rawPayload
41455
+ gasPrice
41456
+ receipts {
41457
+ ...receiptFragment
41458
+ }
41733
41459
  status {
41734
41460
  ...transactionStatusFragment
41735
41461
  }
41736
41462
  }
41737
- ${TransactionStatusFragmentFragmentDoc}`;
41463
+ ${ReceiptFragmentFragmentDoc}
41464
+ ${TransactionStatusFragmentFragmentDoc}`;
41738
41465
  var InputEstimatePredicatesFragmentFragmentDoc = lib_default2`
41739
41466
  fragment inputEstimatePredicatesFragment on Input {
41740
41467
  ... on InputCoin {
@@ -41752,46 +41479,6 @@ spurious results.`);
41752
41479
  }
41753
41480
  }
41754
41481
  ${InputEstimatePredicatesFragmentFragmentDoc}`;
41755
- var DryRunFailureStatusFragmentFragmentDoc = lib_default2`
41756
- fragment dryRunFailureStatusFragment on DryRunFailureStatus {
41757
- reason
41758
- programState {
41759
- returnType
41760
- data
41761
- }
41762
- }
41763
- `;
41764
- var DryRunSuccessStatusFragmentFragmentDoc = lib_default2`
41765
- fragment dryRunSuccessStatusFragment on DryRunSuccessStatus {
41766
- programState {
41767
- returnType
41768
- data
41769
- }
41770
- }
41771
- `;
41772
- var DryRunTransactionStatusFragmentFragmentDoc = lib_default2`
41773
- fragment dryRunTransactionStatusFragment on DryRunTransactionStatus {
41774
- ... on DryRunFailureStatus {
41775
- ...dryRunFailureStatusFragment
41776
- }
41777
- ... on DryRunSuccessStatus {
41778
- ...dryRunSuccessStatusFragment
41779
- }
41780
- }
41781
- ${DryRunFailureStatusFragmentFragmentDoc}
41782
- ${DryRunSuccessStatusFragmentFragmentDoc}`;
41783
- var DryRunTransactionExecutionStatusFragmentFragmentDoc = lib_default2`
41784
- fragment dryRunTransactionExecutionStatusFragment on DryRunTransactionExecutionStatus {
41785
- id
41786
- status {
41787
- ...dryRunTransactionStatusFragment
41788
- }
41789
- receipts {
41790
- ...receiptFragment
41791
- }
41792
- }
41793
- ${DryRunTransactionStatusFragmentFragmentDoc}
41794
- ${ReceiptFragmentFragmentDoc}`;
41795
41482
  var CoinFragmentFragmentDoc = lib_default2`
41796
41483
  fragment coinFragment on Coin {
41797
41484
  __typename
@@ -41799,6 +41486,7 @@ ${ReceiptFragmentFragmentDoc}`;
41799
41486
  owner
41800
41487
  amount
41801
41488
  assetId
41489
+ maturity
41802
41490
  blockCreated
41803
41491
  txCreatedIdx
41804
41492
  }
@@ -41843,6 +41531,7 @@ ${ReceiptFragmentFragmentDoc}`;
41843
41531
  prevRoot
41844
41532
  time
41845
41533
  applicationHash
41534
+ messageReceiptRoot
41846
41535
  messageReceiptCount
41847
41536
  }
41848
41537
  commitBlockHeader {
@@ -41854,6 +41543,7 @@ ${ReceiptFragmentFragmentDoc}`;
41854
41543
  prevRoot
41855
41544
  time
41856
41545
  applicationHash
41546
+ messageReceiptRoot
41857
41547
  messageReceiptCount
41858
41548
  }
41859
41549
  sender
@@ -41873,8 +41563,8 @@ ${ReceiptFragmentFragmentDoc}`;
41873
41563
  var BlockFragmentFragmentDoc = lib_default2`
41874
41564
  fragment blockFragment on Block {
41875
41565
  id
41876
- height
41877
41566
  header {
41567
+ height
41878
41568
  time
41879
41569
  }
41880
41570
  transactions {
@@ -41932,11 +41622,6 @@ ${ReceiptFragmentFragmentDoc}`;
41932
41622
  `;
41933
41623
  var GasCostsFragmentFragmentDoc = lib_default2`
41934
41624
  fragment GasCostsFragment on GasCosts {
41935
- version {
41936
- ... on Version {
41937
- value
41938
- }
41939
- }
41940
41625
  add
41941
41626
  addi
41942
41627
  aloc
@@ -41949,6 +41634,7 @@ ${ReceiptFragmentFragmentDoc}`;
41949
41634
  cb
41950
41635
  cfei
41951
41636
  cfsi
41637
+ croo
41952
41638
  div
41953
41639
  divi
41954
41640
  ecr1
@@ -42031,9 +41717,6 @@ ${ReceiptFragmentFragmentDoc}`;
42031
41717
  ccp {
42032
41718
  ...DependentCostFragment
42033
41719
  }
42034
- croo {
42035
- ...DependentCostFragment
42036
- }
42037
41720
  csiz {
42038
41721
  ...DependentCostFragment
42039
41722
  }
@@ -42093,11 +41776,6 @@ ${ReceiptFragmentFragmentDoc}`;
42093
41776
  ${DependentCostFragmentFragmentDoc}`;
42094
41777
  var ConsensusParametersFragmentFragmentDoc = lib_default2`
42095
41778
  fragment consensusParametersFragment on ConsensusParameters {
42096
- version {
42097
- ... on Version {
42098
- value
42099
- }
42100
- }
42101
41779
  txParams {
42102
41780
  ...TxParametersFragment
42103
41781
  }
@@ -42157,9 +41835,18 @@ ${ConsensusParametersFragmentFragmentDoc}`;
42157
41835
  fragment nodeInfoFragment on NodeInfo {
42158
41836
  utxoValidation
42159
41837
  vmBacktrace
41838
+ minGasPrice
42160
41839
  maxTx
42161
41840
  maxDepth
42162
41841
  nodeVersion
41842
+ peers {
41843
+ id
41844
+ addresses
41845
+ clientVersion
41846
+ blockHeight
41847
+ lastHeartbeatMs
41848
+ appScore
41849
+ }
42163
41850
  }
42164
41851
  `;
42165
41852
  var GetVersionDocument = lib_default2`
@@ -42194,9 +41881,13 @@ ${ConsensusParametersFragmentFragmentDoc}`;
42194
41881
  query getTransactionWithReceipts($transactionId: TransactionId!) {
42195
41882
  transaction(id: $transactionId) {
42196
41883
  ...transactionFragment
41884
+ receipts {
41885
+ ...receiptFragment
41886
+ }
42197
41887
  }
42198
41888
  }
42199
- ${TransactionFragmentFragmentDoc}`;
41889
+ ${TransactionFragmentFragmentDoc}
41890
+ ${ReceiptFragmentFragmentDoc}`;
42200
41891
  var GetTransactionsDocument = lib_default2`
42201
41892
  query getTransactions($after: String, $before: String, $first: Int, $last: Int) {
42202
41893
  transactions(after: $after, before: $before, first: $first, last: $last) {
@@ -42324,20 +42015,6 @@ ${MessageCoinFragmentFragmentDoc}`;
42324
42015
  }
42325
42016
  }
42326
42017
  ${BalanceFragmentFragmentDoc}`;
42327
- var GetLatestGasPriceDocument = lib_default2`
42328
- query getLatestGasPrice {
42329
- latestGasPrice {
42330
- gasPrice
42331
- }
42332
- }
42333
- `;
42334
- var EstimateGasPriceDocument = lib_default2`
42335
- query estimateGasPrice($blockHorizon: U32!) {
42336
- estimateGasPrice(blockHorizon: $blockHorizon) {
42337
- gasPrice
42338
- }
42339
- }
42340
- `;
42341
42018
  var GetBalancesDocument = lib_default2`
42342
42019
  query getBalances($filter: BalanceFilterInput!, $after: String, $before: String, $first: Int, $last: Int) {
42343
42020
  balances(
@@ -42392,12 +42069,12 @@ ${MessageCoinFragmentFragmentDoc}`;
42392
42069
  }
42393
42070
  `;
42394
42071
  var DryRunDocument = lib_default2`
42395
- mutation dryRun($encodedTransactions: [HexString!]!, $utxoValidation: Boolean) {
42396
- dryRun(txs: $encodedTransactions, utxoValidation: $utxoValidation) {
42397
- ...dryRunTransactionExecutionStatusFragment
42072
+ mutation dryRun($encodedTransaction: HexString!, $utxoValidation: Boolean) {
42073
+ dryRun(tx: $encodedTransaction, utxoValidation: $utxoValidation) {
42074
+ ...receiptFragment
42398
42075
  }
42399
42076
  }
42400
- ${DryRunTransactionExecutionStatusFragmentFragmentDoc}`;
42077
+ ${ReceiptFragmentFragmentDoc}`;
42401
42078
  var SubmitDocument = lib_default2`
42402
42079
  mutation submit($encodedTransaction: HexString!) {
42403
42080
  submit(tx: $encodedTransaction) {
@@ -42480,12 +42157,6 @@ ${MessageCoinFragmentFragmentDoc}`;
42480
42157
  getBalance(variables, options) {
42481
42158
  return requester(GetBalanceDocument, variables, options);
42482
42159
  },
42483
- getLatestGasPrice(variables, options) {
42484
- return requester(GetLatestGasPriceDocument, variables, options);
42485
- },
42486
- estimateGasPrice(variables, options) {
42487
- return requester(EstimateGasPriceDocument, variables, options);
42488
- },
42489
42160
  getBalances(variables, options) {
42490
42161
  return requester(GetBalancesDocument, variables, options);
42491
42162
  },
@@ -42553,14 +42224,11 @@ ${MessageCoinFragmentFragmentDoc}`;
42553
42224
  let data;
42554
42225
  let errors;
42555
42226
  try {
42556
- const sanitizedText = text.replace(/\s/g, "");
42557
- ({ data, errors } = JSON.parse(sanitizedText.replace(/^data:/, "")));
42227
+ ({ data, errors } = JSON.parse(text.replace(/^data:/, "")));
42558
42228
  } catch (e) {
42559
42229
  throw new FuelError(
42560
42230
  ErrorCode.STREAM_PARSING_ERROR,
42561
- `Error while parsing stream data response: ${text}
42562
-
42563
- Thrown error: ${e}`
42231
+ `Error while parsing stream data response: ${text}`
42564
42232
  );
42565
42233
  }
42566
42234
  if (Array.isArray(errors)) {
@@ -42644,6 +42312,9 @@ Thrown error: ${e}`
42644
42312
  }
42645
42313
  };
42646
42314
 
42315
+ // ../address/dist/configs.mjs
42316
+ var ZeroBytes32 = "0x0000000000000000000000000000000000000000000000000000000000000000";
42317
+
42647
42318
  // src/providers/transaction-request/input.ts
42648
42319
  var inputify = (value) => {
42649
42320
  const { type: type3 } = value;
@@ -42654,7 +42325,7 @@ Thrown error: ${e}`
42654
42325
  return {
42655
42326
  type: InputType.Coin,
42656
42327
  txID: hexlify(arrayify(value.id).slice(0, 32)),
42657
- outputIndex: toNumber2(arrayify(value.id).slice(32, 34)),
42328
+ outputIndex: arrayify(value.id)[32],
42658
42329
  owner: hexlify(value.owner),
42659
42330
  amount: bn(value.amount),
42660
42331
  assetId: hexlify(value.assetId),
@@ -42663,9 +42334,10 @@ Thrown error: ${e}`
42663
42334
  txIndex: toNumber2(arrayify(value.txPointer).slice(8, 16))
42664
42335
  },
42665
42336
  witnessIndex: value.witnessIndex,
42337
+ maturity: value.maturity ?? 0,
42666
42338
  predicateGasUsed: bn(value.predicateGasUsed),
42667
- predicateLength: bn(predicate.length),
42668
- predicateDataLength: bn(predicateData.length),
42339
+ predicateLength: predicate.length,
42340
+ predicateDataLength: predicateData.length,
42669
42341
  predicate: hexlify(predicate),
42670
42342
  predicateData: hexlify(predicateData)
42671
42343
  };
@@ -42696,8 +42368,8 @@ Thrown error: ${e}`
42696
42368
  nonce: hexlify(value.nonce),
42697
42369
  witnessIndex: value.witnessIndex,
42698
42370
  predicateGasUsed: bn(value.predicateGasUsed),
42699
- predicateLength: bn(predicate.length),
42700
- predicateDataLength: bn(predicateData.length),
42371
+ predicateLength: predicate.length,
42372
+ predicateDataLength: predicateData.length,
42701
42373
  predicate: hexlify(predicate),
42702
42374
  predicateData: hexlify(predicateData),
42703
42375
  data: hexlify(data),
@@ -42854,8 +42526,8 @@ Thrown error: ${e}`
42854
42526
  case "CALL" /* Call */: {
42855
42527
  const callReceipt = {
42856
42528
  type: ReceiptType.Call,
42857
- from: hexOrZero(receipt.id || receipt.contractId),
42858
- to: hexOrZero(receipt?.to),
42529
+ from: hexOrZero(receipt.contract?.id),
42530
+ to: hexOrZero(receipt?.to?.id),
42859
42531
  amount: bn(receipt.amount),
42860
42532
  assetId: hexOrZero(receipt.assetId),
42861
42533
  gas: bn(receipt.gas),
@@ -42869,7 +42541,7 @@ Thrown error: ${e}`
42869
42541
  case "RETURN" /* Return */: {
42870
42542
  const returnReceipt = {
42871
42543
  type: ReceiptType.Return,
42872
- id: hexOrZero(receipt.id || receipt.contractId),
42544
+ id: hexOrZero(receipt.contract?.id),
42873
42545
  val: bn(receipt.val),
42874
42546
  pc: bn(receipt.pc),
42875
42547
  is: bn(receipt.is)
@@ -42879,7 +42551,7 @@ Thrown error: ${e}`
42879
42551
  case "RETURN_DATA" /* ReturnData */: {
42880
42552
  const returnDataReceipt = {
42881
42553
  type: ReceiptType.ReturnData,
42882
- id: hexOrZero(receipt.id || receipt.contractId),
42554
+ id: hexOrZero(receipt.contract?.id),
42883
42555
  ptr: bn(receipt.ptr),
42884
42556
  len: bn(receipt.len),
42885
42557
  digest: hexOrZero(receipt.digest),
@@ -42891,7 +42563,7 @@ Thrown error: ${e}`
42891
42563
  case "PANIC" /* Panic */: {
42892
42564
  const panicReceipt = {
42893
42565
  type: ReceiptType.Panic,
42894
- id: hexOrZero(receipt.id),
42566
+ id: hexOrZero(receipt.contract?.id),
42895
42567
  reason: bn(receipt.reason),
42896
42568
  pc: bn(receipt.pc),
42897
42569
  is: bn(receipt.is),
@@ -42902,7 +42574,7 @@ Thrown error: ${e}`
42902
42574
  case "REVERT" /* Revert */: {
42903
42575
  const revertReceipt = {
42904
42576
  type: ReceiptType.Revert,
42905
- id: hexOrZero(receipt.id || receipt.contractId),
42577
+ id: hexOrZero(receipt.contract?.id),
42906
42578
  val: bn(receipt.ra),
42907
42579
  pc: bn(receipt.pc),
42908
42580
  is: bn(receipt.is)
@@ -42912,7 +42584,7 @@ Thrown error: ${e}`
42912
42584
  case "LOG" /* Log */: {
42913
42585
  const logReceipt = {
42914
42586
  type: ReceiptType.Log,
42915
- id: hexOrZero(receipt.id || receipt.contractId),
42587
+ id: hexOrZero(receipt.contract?.id),
42916
42588
  val0: bn(receipt.ra),
42917
42589
  val1: bn(receipt.rb),
42918
42590
  val2: bn(receipt.rc),
@@ -42925,7 +42597,7 @@ Thrown error: ${e}`
42925
42597
  case "LOG_DATA" /* LogData */: {
42926
42598
  const logDataReceipt = {
42927
42599
  type: ReceiptType.LogData,
42928
- id: hexOrZero(receipt.id || receipt.contractId),
42600
+ id: hexOrZero(receipt.contract?.id),
42929
42601
  val0: bn(receipt.ra),
42930
42602
  val1: bn(receipt.rb),
42931
42603
  ptr: bn(receipt.ptr),
@@ -42939,8 +42611,8 @@ Thrown error: ${e}`
42939
42611
  case "TRANSFER" /* Transfer */: {
42940
42612
  const transferReceipt = {
42941
42613
  type: ReceiptType.Transfer,
42942
- from: hexOrZero(receipt.id || receipt.contractId),
42943
- to: hexOrZero(receipt.toAddress || receipt?.to),
42614
+ from: hexOrZero(receipt.contract?.id),
42615
+ to: hexOrZero(receipt.toAddress || receipt?.to?.id),
42944
42616
  amount: bn(receipt.amount),
42945
42617
  assetId: hexOrZero(receipt.assetId),
42946
42618
  pc: bn(receipt.pc),
@@ -42951,8 +42623,8 @@ Thrown error: ${e}`
42951
42623
  case "TRANSFER_OUT" /* TransferOut */: {
42952
42624
  const transferOutReceipt = {
42953
42625
  type: ReceiptType.TransferOut,
42954
- from: hexOrZero(receipt.id || receipt.contractId),
42955
- to: hexOrZero(receipt.toAddress || receipt.to),
42626
+ from: hexOrZero(receipt.contract?.id),
42627
+ to: hexOrZero(receipt.toAddress || receipt.to?.id),
42956
42628
  amount: bn(receipt.amount),
42957
42629
  assetId: hexOrZero(receipt.assetId),
42958
42630
  pc: bn(receipt.pc),
@@ -42995,7 +42667,7 @@ Thrown error: ${e}`
42995
42667
  return receiptMessageOut;
42996
42668
  }
42997
42669
  case "MINT" /* Mint */: {
42998
- const contractId = hexOrZero(receipt.id || receipt.contractId);
42670
+ const contractId = hexOrZero(receipt.contract?.id);
42999
42671
  const subId = hexOrZero(receipt.subId);
43000
42672
  const assetId = ReceiptMintCoder.getAssetId(contractId, subId);
43001
42673
  const mintReceipt = {
@@ -43010,7 +42682,7 @@ Thrown error: ${e}`
43010
42682
  return mintReceipt;
43011
42683
  }
43012
42684
  case "BURN" /* Burn */: {
43013
- const contractId = hexOrZero(receipt.id || receipt.contractId);
42685
+ const contractId = hexOrZero(receipt.contract?.id);
43014
42686
  const subId = hexOrZero(receipt.subId);
43015
42687
  const assetId = ReceiptBurnCoder.getAssetId(contractId, subId);
43016
42688
  const burnReceipt = {
@@ -43030,6 +42702,7 @@ Thrown error: ${e}`
43030
42702
  }
43031
42703
 
43032
42704
  // src/providers/utils/gas.ts
42705
+ var calculatePriceWithFactor = (gas, gasPrice, priceFactor) => bn(Math.ceil(gas.mul(gasPrice).toNumber() / priceFactor.toNumber()));
43033
42706
  var getGasUsedFromReceipts = (receipts) => {
43034
42707
  const scriptResult = receipts.filter(
43035
42708
  (receipt) => receipt.type === ReceiptType.ScriptResult
@@ -43050,28 +42723,18 @@ Thrown error: ${e}`
43050
42723
  }
43051
42724
  function gasUsedByInputs(inputs, txBytesSize, gasCosts) {
43052
42725
  const witnessCache = [];
43053
- const chargeableInputs = inputs.filter((input) => {
43054
- const isCoinOrMessage = "owner" in input || "sender" in input;
43055
- if (isCoinOrMessage) {
43056
- if ("predicate" in input && input.predicate && input.predicate !== "0x") {
43057
- return true;
43058
- }
43059
- if (!witnessCache.includes(input.witnessIndex)) {
43060
- witnessCache.push(input.witnessIndex);
43061
- return true;
43062
- }
43063
- }
43064
- return false;
43065
- });
43066
- const vmInitializationCost = resolveGasDependentCosts(txBytesSize, gasCosts.vmInitialization);
43067
- const totalGas = chargeableInputs.reduce((total, input) => {
42726
+ const totalGas = inputs.reduce((total, input) => {
43068
42727
  if ("predicate" in input && input.predicate && input.predicate !== "0x") {
43069
42728
  return total.add(
43070
- vmInitializationCost.add(resolveGasDependentCosts(arrayify(input.predicate).length, gasCosts.contractRoot)).add(bn(input.predicateGasUsed))
42729
+ resolveGasDependentCosts(txBytesSize, gasCosts.vmInitialization).add(resolveGasDependentCosts(arrayify(input.predicate).length, gasCosts.contractRoot)).add(bn(input.predicateGasUsed))
43071
42730
  );
43072
42731
  }
43073
- return total.add(gasCosts.ecr1);
43074
- }, bn(0));
42732
+ if ("witnessIndex" in input && !witnessCache.includes(input.witnessIndex)) {
42733
+ witnessCache.push(input.witnessIndex);
42734
+ return total.add(gasCosts.ecr1);
42735
+ }
42736
+ return total;
42737
+ }, bn());
43075
42738
  return totalGas;
43076
42739
  }
43077
42740
  function getMinGas(params) {
@@ -43083,20 +42746,12 @@ Thrown error: ${e}`
43083
42746
  return minGas;
43084
42747
  }
43085
42748
  function getMaxGas(params) {
43086
- const {
43087
- gasPerByte,
43088
- witnessesLength,
43089
- witnessLimit,
43090
- minGas,
43091
- gasLimit = bn(0),
43092
- maxGasPerTx
43093
- } = params;
42749
+ const { gasPerByte, witnessesLength, witnessLimit, minGas, gasLimit = bn(0) } = params;
43094
42750
  let remainingAllowedWitnessGas = bn(0);
43095
42751
  if (witnessLimit?.gt(0) && witnessLimit.gte(witnessesLength)) {
43096
42752
  remainingAllowedWitnessGas = bn(witnessLimit).sub(witnessesLength).mul(gasPerByte);
43097
42753
  }
43098
- const maxGas = remainingAllowedWitnessGas.add(minGas).add(gasLimit);
43099
- return maxGas.gte(maxGasPerTx) ? maxGasPerTx : maxGas;
42754
+ return remainingAllowedWitnessGas.add(minGas).add(gasLimit);
43100
42755
  }
43101
42756
  function calculateMetadataGasForTxCreate({
43102
42757
  gasCosts,
@@ -43118,10 +42773,6 @@ Thrown error: ${e}`
43118
42773
  }) {
43119
42774
  return resolveGasDependentCosts(txBytesSize, gasCosts.s256);
43120
42775
  }
43121
- var calculateGasFee = (params) => {
43122
- const { gas, gasPrice, priceFactor, tip } = params;
43123
- return gas.mul(gasPrice).div(priceFactor).add(tip);
43124
- };
43125
42776
 
43126
42777
  // src/providers/utils/json.ts
43127
42778
  function normalize2(object) {
@@ -43251,7 +42902,7 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
43251
42902
  // src/providers/transaction-request/transaction-request.ts
43252
42903
  var BaseTransactionRequest = class {
43253
42904
  /** Gas price for transaction */
43254
- tip;
42905
+ gasPrice;
43255
42906
  /** Block until which tx cannot be included */
43256
42907
  maturity;
43257
42908
  /** The maximum fee payable by this transaction using BASE_ASSET. */
@@ -43264,34 +42915,38 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
43264
42915
  outputs = [];
43265
42916
  /** List of witnesses */
43266
42917
  witnesses = [];
42918
+ /** Base asset ID - should be fetched from the chain */
42919
+ baseAssetId = ZeroBytes32;
43267
42920
  /**
43268
42921
  * Constructor for initializing a base transaction request.
43269
42922
  *
43270
42923
  * @param baseTransactionRequest - Optional object containing properties to initialize the transaction request.
43271
42924
  */
43272
42925
  constructor({
43273
- tip,
42926
+ gasPrice,
43274
42927
  maturity,
43275
42928
  maxFee,
43276
42929
  witnessLimit,
43277
42930
  inputs,
43278
42931
  outputs,
43279
- witnesses
42932
+ witnesses,
42933
+ baseAssetId
43280
42934
  } = {}) {
43281
- this.tip = bn(tip);
42935
+ this.gasPrice = bn(gasPrice);
43282
42936
  this.maturity = maturity ?? 0;
43283
42937
  this.witnessLimit = witnessLimit ? bn(witnessLimit) : void 0;
43284
42938
  this.maxFee = maxFee ? bn(maxFee) : void 0;
43285
42939
  this.inputs = inputs ?? [];
43286
42940
  this.outputs = outputs ?? [];
43287
42941
  this.witnesses = witnesses ?? [];
42942
+ this.baseAssetId = baseAssetId ?? ZeroBytes32;
43288
42943
  }
43289
42944
  static getPolicyMeta(req) {
43290
42945
  let policyTypes = 0;
43291
42946
  const policies = [];
43292
- if (req.tip) {
43293
- policyTypes += PolicyType.Tip;
43294
- policies.push({ data: req.tip, type: PolicyType.Tip });
42947
+ if (req.gasPrice) {
42948
+ policyTypes += PolicyType.GasPrice;
42949
+ policies.push({ data: req.gasPrice, type: PolicyType.GasPrice });
43295
42950
  }
43296
42951
  if (req.witnessLimit) {
43297
42952
  policyTypes += PolicyType.WitnessLimit;
@@ -43478,10 +43133,10 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
43478
43133
  * @param predicate - Predicate bytes.
43479
43134
  * @param predicateData - Predicate data bytes.
43480
43135
  */
43481
- addCoinInput(coin) {
43136
+ addCoinInput(coin, predicate) {
43482
43137
  const { assetId, owner, amount } = coin;
43483
43138
  let witnessIndex;
43484
- if (coin.predicate) {
43139
+ if (predicate) {
43485
43140
  witnessIndex = 0;
43486
43141
  } else {
43487
43142
  witnessIndex = this.getCoinInputWitnessIndexByOwner(owner);
@@ -43496,7 +43151,9 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
43496
43151
  amount,
43497
43152
  assetId,
43498
43153
  txPointer: "0x00000000000000000000000000000000",
43499
- witnessIndex
43154
+ witnessIndex,
43155
+ predicate: predicate?.bytes,
43156
+ predicateData: predicate?.predicateDataBytes
43500
43157
  };
43501
43158
  this.pushInput(input);
43502
43159
  this.addChangeOutput(owner, assetId);
@@ -43507,13 +43164,11 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
43507
43164
  *
43508
43165
  * @param message - Message resource.
43509
43166
  * @param predicate - Predicate bytes.
43510
- * @param predicateData - Predicate data bytes.
43511
43167
  */
43512
- addMessageInput(message) {
43168
+ addMessageInput(message, predicate) {
43513
43169
  const { recipient, sender, amount } = message;
43514
- const assetId = BaseAssetId;
43515
43170
  let witnessIndex;
43516
- if (message.predicate) {
43171
+ if (predicate) {
43517
43172
  witnessIndex = 0;
43518
43173
  } else {
43519
43174
  witnessIndex = this.getCoinInputWitnessIndexByOwner(recipient);
@@ -43527,10 +43182,12 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
43527
43182
  sender: sender.toB256(),
43528
43183
  recipient: recipient.toB256(),
43529
43184
  amount,
43530
- witnessIndex
43185
+ witnessIndex,
43186
+ predicate: predicate?.bytes,
43187
+ predicateData: predicate?.predicateDataBytes
43531
43188
  };
43532
43189
  this.pushInput(input);
43533
- this.addChangeOutput(recipient, assetId);
43190
+ this.addChangeOutput(recipient, this.baseAssetId);
43534
43191
  }
43535
43192
  /**
43536
43193
  * Adds a single resource to the transaction by adding a coin/message input and a
@@ -43558,6 +43215,32 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
43558
43215
  resources.forEach((resource) => this.addResource(resource));
43559
43216
  return this;
43560
43217
  }
43218
+ /**
43219
+ * Adds multiple resources to the transaction by adding coin/message inputs and change
43220
+ * outputs from the related assetIds.
43221
+ *
43222
+ * @param resources - The resources to add.
43223
+ * @returns This transaction.
43224
+ */
43225
+ addPredicateResource(resource, predicate) {
43226
+ if (isCoin(resource)) {
43227
+ this.addCoinInput(resource, predicate);
43228
+ } else {
43229
+ this.addMessageInput(resource, predicate);
43230
+ }
43231
+ return this;
43232
+ }
43233
+ /**
43234
+ * Adds multiple predicate coin/message inputs to the transaction and change outputs
43235
+ * from the related assetIds.
43236
+ *
43237
+ * @param resources - The resources to add.
43238
+ * @returns This transaction.
43239
+ */
43240
+ addPredicateResources(resources, predicate) {
43241
+ resources.forEach((resource) => this.addPredicateResource(resource, predicate));
43242
+ return this;
43243
+ }
43561
43244
  /**
43562
43245
  * Adds a coin output to the transaction.
43563
43246
  *
@@ -43565,12 +43248,12 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
43565
43248
  * @param amount - Amount of coin.
43566
43249
  * @param assetId - Asset ID of coin.
43567
43250
  */
43568
- addCoinOutput(to, amount, assetId = BaseAssetId) {
43251
+ addCoinOutput(to, amount, assetId) {
43569
43252
  this.pushOutput({
43570
43253
  type: OutputType.Coin,
43571
43254
  to: addressify(to).toB256(),
43572
43255
  amount,
43573
- assetId
43256
+ assetId: assetId ?? this.baseAssetId
43574
43257
  });
43575
43258
  return this;
43576
43259
  }
@@ -43597,7 +43280,7 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
43597
43280
  * @param to - Address of the owner.
43598
43281
  * @param assetId - Asset ID of coin.
43599
43282
  */
43600
- addChangeOutput(to, assetId = BaseAssetId) {
43283
+ addChangeOutput(to, assetId) {
43601
43284
  const changeOutput = this.getChangeOutputs().find(
43602
43285
  (output3) => hexlify(output3.assetId) === assetId
43603
43286
  );
@@ -43605,7 +43288,7 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
43605
43288
  this.pushOutput({
43606
43289
  type: OutputType.Change,
43607
43290
  to: addressify(to).toB256(),
43608
- assetId
43291
+ assetId: assetId ?? this.baseAssetId
43609
43292
  });
43610
43293
  }
43611
43294
  }
@@ -43637,7 +43320,7 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
43637
43320
  }
43638
43321
  calculateMaxGas(chainInfo, minGas) {
43639
43322
  const { consensusParameters } = chainInfo;
43640
- const { gasPerByte, maxGasPerTx } = consensusParameters;
43323
+ const { gasPerByte } = consensusParameters;
43641
43324
  const witnessesLength = this.toTransaction().witnesses.reduce(
43642
43325
  (acc, wit) => acc + wit.dataLength,
43643
43326
  0
@@ -43646,8 +43329,7 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
43646
43329
  gasPerByte,
43647
43330
  minGas,
43648
43331
  witnessesLength,
43649
- witnessLimit: this.witnessLimit,
43650
- maxGasPerTx
43332
+ witnessLimit: this.witnessLimit
43651
43333
  });
43652
43334
  }
43653
43335
  /**
@@ -43657,6 +43339,12 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
43657
43339
  * @param quantities - CoinQuantity Array.
43658
43340
  */
43659
43341
  fundWithFakeUtxos(quantities, resourcesOwner) {
43342
+ let idCounter = 0;
43343
+ const generateId = () => {
43344
+ const counterString = String(idCounter++);
43345
+ const id = ZeroBytes32.slice(0, -counterString.length).concat(counterString);
43346
+ return id;
43347
+ };
43660
43348
  const findAssetInput = (assetId) => this.inputs.find((input) => {
43661
43349
  if ("assetId" in input) {
43662
43350
  return input.assetId === assetId;
@@ -43665,27 +43353,24 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
43665
43353
  });
43666
43354
  const updateAssetInput = (assetId, quantity) => {
43667
43355
  const assetInput = findAssetInput(assetId);
43668
- let usedQuantity = quantity;
43669
- if (assetId === BaseAssetId) {
43670
- usedQuantity = bn("1000000000000000000");
43671
- }
43672
43356
  if (assetInput && "assetId" in assetInput) {
43673
- assetInput.id = hexlify(randomBytes3(34));
43674
- assetInput.amount = usedQuantity;
43357
+ assetInput.id = generateId();
43358
+ assetInput.amount = quantity;
43675
43359
  } else {
43676
43360
  this.addResources([
43677
43361
  {
43678
- id: hexlify(randomBytes3(34)),
43679
- amount: usedQuantity,
43362
+ id: generateId(),
43363
+ amount: quantity,
43680
43364
  assetId,
43681
43365
  owner: resourcesOwner || Address.fromRandom(),
43366
+ maturity: 0,
43682
43367
  blockCreated: bn(1),
43683
43368
  txCreatedIdx: bn(1)
43684
43369
  }
43685
43370
  ]);
43686
43371
  }
43687
43372
  };
43688
- updateAssetInput(BaseAssetId, bn(1e11));
43373
+ updateAssetInput(this.baseAssetId, bn(1e11));
43689
43374
  quantities.forEach((q) => updateAssetInput(q.assetId, q.amount));
43690
43375
  }
43691
43376
  /**
@@ -43710,7 +43395,7 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
43710
43395
  toJSON() {
43711
43396
  return normalizeJSON(this);
43712
43397
  }
43713
- updatePredicateGasUsed(inputs) {
43398
+ updatePredicateInputs(inputs) {
43714
43399
  this.inputs.forEach((i) => {
43715
43400
  let correspondingInput;
43716
43401
  switch (i.type) {
@@ -43732,15 +43417,6 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
43732
43417
  }
43733
43418
  });
43734
43419
  }
43735
- shiftPredicateData() {
43736
- this.inputs.forEach((input) => {
43737
- if ("predicateData" in input && "paddPredicateData" in input && typeof input.paddPredicateData === "function") {
43738
- input.predicateData = input.paddPredicateData(
43739
- BaseTransactionRequest.getPolicyMeta(this).policies.length
43740
- );
43741
- }
43742
- });
43743
- }
43744
43420
  };
43745
43421
 
43746
43422
  // src/providers/transaction-request/hash-transaction.ts
@@ -43874,8 +43550,9 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
43874
43550
  return {
43875
43551
  type: TransactionType.Create,
43876
43552
  ...baseTransaction,
43553
+ bytecodeLength: baseTransaction.witnesses[bytecodeWitnessIndex].dataLength / 4,
43877
43554
  bytecodeWitnessIndex,
43878
- storageSlotsCount: bn(storageSlots.length),
43555
+ storageSlotsCount: storageSlots.length,
43879
43556
  salt: this.salt ? hexlify(this.salt) : ZeroBytes32,
43880
43557
  storageSlots
43881
43558
  };
@@ -43989,8 +43666,8 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
43989
43666
  type: TransactionType.Script,
43990
43667
  scriptGasLimit: this.gasLimit,
43991
43668
  ...super.getBaseTransaction(),
43992
- scriptLength: bn(script.length),
43993
- scriptDataLength: bn(scriptData.length),
43669
+ scriptLength: script.length,
43670
+ scriptDataLength: scriptData.length,
43994
43671
  receiptsRoot: ZeroBytes32,
43995
43672
  script: hexlify(script),
43996
43673
  scriptData: hexlify(scriptData)
@@ -44054,7 +43731,7 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
44054
43731
  }
44055
43732
  calculateMaxGas(chainInfo, minGas) {
44056
43733
  const { consensusParameters } = chainInfo;
44057
- const { gasPerByte, maxGasPerTx } = consensusParameters;
43734
+ const { gasPerByte } = consensusParameters;
44058
43735
  const witnessesLength = this.toTransaction().witnesses.reduce(
44059
43736
  (acc, wit) => acc + wit.dataLength,
44060
43737
  0
@@ -44064,8 +43741,7 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
44064
43741
  minGas,
44065
43742
  witnessesLength,
44066
43743
  witnessLimit: this.witnessLimit,
44067
- gasLimit: this.gasLimit,
44068
- maxGasPerTx
43744
+ gasLimit: this.gasLimit
44069
43745
  });
44070
43746
  }
44071
43747
  /**
@@ -44138,29 +43814,13 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
44138
43814
  }
44139
43815
  }
44140
43816
  };
44141
- var cacheTxInputsFromOwner = (inputs, owner) => inputs.reduce(
44142
- (acc, input) => {
44143
- if (input.type === InputType.Coin && input.owner === owner) {
44144
- acc.utxos.push(input.id);
44145
- }
44146
- if (input.type === InputType.Message && input.recipient === owner) {
44147
- acc.messages.push(input.nonce);
44148
- }
44149
- return acc;
44150
- },
44151
- {
44152
- utxos: [],
44153
- messages: []
44154
- }
44155
- );
44156
43817
 
44157
43818
  // src/providers/transaction-summary/calculate-transaction-fee.ts
44158
43819
  var calculateTransactionFee = (params) => {
44159
43820
  const {
44160
- gasPrice,
43821
+ gasUsed,
44161
43822
  rawPayload,
44162
- tip,
44163
- consensusParameters: { gasCosts, feeParams, maxGasPerTx }
43823
+ consensusParameters: { gasCosts, feeParams }
44164
43824
  } = params;
44165
43825
  const gasPerByte = bn(feeParams.gasPerByte);
44166
43826
  const gasPriceFactor = bn(feeParams.gasPriceFactor);
@@ -44170,7 +43830,8 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
44170
43830
  return {
44171
43831
  fee: bn(0),
44172
43832
  minFee: bn(0),
44173
- maxFee: bn(0)
43833
+ maxFee: bn(0),
43834
+ feeFromGasUsed: bn(0)
44174
43835
  };
44175
43836
  }
44176
43837
  const { type: type3, witnesses, inputs, policies } = transaction;
@@ -44202,6 +43863,7 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
44202
43863
  metadataGas,
44203
43864
  txBytesSize: transactionBytes.length
44204
43865
  });
43866
+ const gasPrice = bn(policies.find((policy) => policy.type === PolicyType.GasPrice)?.data);
44205
43867
  const witnessLimit = policies.find((policy) => policy.type === PolicyType.WitnessLimit)?.data;
44206
43868
  const witnessesLength = witnesses.reduce((acc, wit) => acc + wit.dataLength, 0);
44207
43869
  const maxGas = getMaxGas({
@@ -44209,25 +43871,17 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
44209
43871
  minGas,
44210
43872
  witnessesLength,
44211
43873
  gasLimit,
44212
- witnessLimit,
44213
- maxGasPerTx
44214
- });
44215
- const minFee = calculateGasFee({
44216
- gasPrice,
44217
- gas: minGas,
44218
- priceFactor: gasPriceFactor,
44219
- tip
44220
- });
44221
- const maxFee = calculateGasFee({
44222
- gasPrice,
44223
- gas: maxGas,
44224
- priceFactor: gasPriceFactor,
44225
- tip
43874
+ witnessLimit
44226
43875
  });
43876
+ const feeFromGasUsed = calculatePriceWithFactor(gasUsed, gasPrice, gasPriceFactor);
43877
+ const minFee = calculatePriceWithFactor(minGas, gasPrice, gasPriceFactor);
43878
+ const maxFee = calculatePriceWithFactor(maxGas, gasPrice, gasPriceFactor);
43879
+ const fee = minFee.add(feeFromGasUsed);
44227
43880
  return {
43881
+ fee,
44228
43882
  minFee,
44229
43883
  maxFee,
44230
- fee: maxFee
43884
+ feeFromGasUsed
44231
43885
  };
44232
43886
  };
44233
43887
 
@@ -44781,9 +44435,7 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
44781
44435
  gqlTransactionStatus,
44782
44436
  abiMap = {},
44783
44437
  maxInputs,
44784
- gasCosts,
44785
- maxGasPerTx,
44786
- gasPrice
44438
+ gasCosts
44787
44439
  } = params;
44788
44440
  const gasUsed = getGasUsedFromReceipts(receipts);
44789
44441
  const rawPayload = hexlify(transactionBytes);
@@ -44797,14 +44449,11 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
44797
44449
  maxInputs
44798
44450
  });
44799
44451
  const typeName = getTransactionTypeName(transaction.type);
44800
- const tip = bn(transaction.policies?.find((policy) => policy.type === PolicyType.Tip)?.data);
44801
44452
  const { fee } = calculateTransactionFee({
44802
- gasPrice,
44453
+ gasUsed,
44803
44454
  rawPayload,
44804
- tip,
44805
44455
  consensusParameters: {
44806
44456
  gasCosts,
44807
- maxGasPerTx,
44808
44457
  feeParams: {
44809
44458
  gasPerByte,
44810
44459
  gasPriceFactor
@@ -44940,13 +44589,8 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
44940
44589
  const decodedTransaction = this.decodeTransaction(
44941
44590
  transaction
44942
44591
  );
44943
- let txReceipts = [];
44944
- if (transaction?.status && "receipts" in transaction.status) {
44945
- txReceipts = transaction.status.receipts;
44946
- }
44947
- const receipts = txReceipts.map(processGqlReceipt) || [];
44948
- const { gasPerByte, gasPriceFactor, gasCosts, maxGasPerTx } = this.provider.getGasConfig();
44949
- const gasPrice = await this.provider.getLatestGasPrice();
44592
+ const receipts = transaction.receipts?.map(processGqlReceipt) || [];
44593
+ const { gasPerByte, gasPriceFactor, gasCosts } = this.provider.getGasConfig();
44950
44594
  const maxInputs = this.provider.getChain().consensusParameters.maxInputs;
44951
44595
  const transactionSummary = assembleTransactionSummary({
44952
44596
  id: this.id,
@@ -44958,9 +44602,7 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
44958
44602
  gasPriceFactor,
44959
44603
  abiMap: contractsAbiMap,
44960
44604
  maxInputs,
44961
- gasCosts,
44962
- maxGasPerTx,
44963
- gasPrice
44605
+ gasCosts
44964
44606
  });
44965
44607
  return transactionSummary;
44966
44608
  }
@@ -45104,12 +44746,13 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
45104
44746
  gasPerByte: bn(feeParams.gasPerByte),
45105
44747
  maxMessageDataLength: bn(predicateParams.maxMessageDataLength),
45106
44748
  chainId: bn(consensusParameters.chainId),
44749
+ baseAssetId: consensusParameters.baseAssetId,
45107
44750
  gasCosts
45108
44751
  },
45109
44752
  gasCosts,
45110
44753
  latestBlock: {
45111
44754
  id: latestBlock.id,
45112
- height: bn(latestBlock.height),
44755
+ height: bn(latestBlock.header.height),
45113
44756
  time: latestBlock.header.time,
45114
44757
  transactions: latestBlock.transactions.map((i) => ({
45115
44758
  id: i.id
@@ -45203,8 +44846,10 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
45203
44846
  * Returns some helpful parameters related to gas fees.
45204
44847
  */
45205
44848
  getGasConfig() {
44849
+ const { minGasPrice } = this.getNode();
45206
44850
  const { maxGasPerTx, maxGasPerPredicate, gasPriceFactor, gasPerByte, gasCosts } = this.getChain().consensusParameters;
45207
44851
  return {
44852
+ minGasPrice,
45208
44853
  maxGasPerTx,
45209
44854
  maxGasPerPredicate,
45210
44855
  gasPriceFactor,
@@ -45302,7 +44947,7 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
45302
44947
  */
45303
44948
  async getBlockNumber() {
45304
44949
  const { chain } = await this.operations.getChain();
45305
- return bn(chain.latestBlock.height, 10);
44950
+ return bn(chain.latestBlock.header.height, 10);
45306
44951
  }
45307
44952
  /**
45308
44953
  * Returns the chain information.
@@ -45314,9 +44959,11 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
45314
44959
  const processedNodeInfo = {
45315
44960
  maxDepth: bn(nodeInfo.maxDepth),
45316
44961
  maxTx: bn(nodeInfo.maxTx),
44962
+ minGasPrice: bn(nodeInfo.minGasPrice),
45317
44963
  nodeVersion: nodeInfo.nodeVersion,
45318
44964
  utxoValidation: nodeInfo.utxoValidation,
45319
- vmBacktrace: nodeInfo.vmBacktrace
44965
+ vmBacktrace: nodeInfo.vmBacktrace,
44966
+ peers: nodeInfo.peers
45320
44967
  };
45321
44968
  _Provider.nodeInfoCache[this.url] = processedNodeInfo;
45322
44969
  return processedNodeInfo;
@@ -45342,6 +44989,17 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
45342
44989
  } = this.getChain();
45343
44990
  return chainId.toNumber();
45344
44991
  }
44992
+ /**
44993
+ * Returns the base asset ID
44994
+ *
44995
+ * @returns A promise that resolves to the base asset ID
44996
+ */
44997
+ getBaseAssetId() {
44998
+ const {
44999
+ consensusParameters: { baseAssetId }
45000
+ } = this.getChain();
45001
+ return baseAssetId;
45002
+ }
45345
45003
  /**
45346
45004
  * Submits a transaction to the chain to be executed.
45347
45005
  *
@@ -45402,13 +45060,14 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
45402
45060
  return this.estimateTxDependencies(transactionRequest);
45403
45061
  }
45404
45062
  const encodedTransaction = hexlify(transactionRequest.toTransactionBytes());
45405
- const { dryRun: dryRunStatuses } = await this.operations.dryRun({
45406
- encodedTransactions: encodedTransaction,
45063
+ const { dryRun: gqlReceipts } = await this.operations.dryRun({
45064
+ encodedTransaction,
45407
45065
  utxoValidation: utxoValidation || false
45408
45066
  });
45409
- const [{ receipts: rawReceipts, status }] = dryRunStatuses;
45410
- const receipts = rawReceipts.map(processGqlReceipt);
45411
- return { receipts, dryrunStatus: status };
45067
+ const receipts = gqlReceipts.map(processGqlReceipt);
45068
+ return {
45069
+ receipts
45070
+ };
45412
45071
  }
45413
45072
  /**
45414
45073
  * Verifies whether enough gas is available to complete transaction.
@@ -45447,6 +45106,9 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
45447
45106
  * If there are missing variable outputs,
45448
45107
  * `addVariableOutputs` is called on the transaction.
45449
45108
  *
45109
+ * @privateRemarks
45110
+ * TODO: Investigate support for missing contract IDs
45111
+ * TODO: Add support for missing output messages
45450
45112
  *
45451
45113
  * @param transactionRequest - The transaction request object.
45452
45114
  * @returns A promise.
@@ -45459,19 +45121,16 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
45459
45121
  missingContractIds: []
45460
45122
  };
45461
45123
  }
45124
+ await this.estimatePredicates(transactionRequest);
45462
45125
  let receipts = [];
45463
45126
  const missingContractIds = [];
45464
45127
  let outputVariables = 0;
45465
- let dryrunStatus;
45466
45128
  for (let attempt = 0; attempt < MAX_RETRIES; attempt++) {
45467
- const {
45468
- dryRun: [{ receipts: rawReceipts, status }]
45469
- } = await this.operations.dryRun({
45470
- encodedTransactions: [hexlify(transactionRequest.toTransactionBytes())],
45129
+ const { dryRun: gqlReceipts } = await this.operations.dryRun({
45130
+ encodedTransaction: hexlify(transactionRequest.toTransactionBytes()),
45471
45131
  utxoValidation: false
45472
45132
  });
45473
- receipts = rawReceipts.map(processGqlReceipt);
45474
- dryrunStatus = status;
45133
+ receipts = gqlReceipts.map(processGqlReceipt);
45475
45134
  const { missingOutputVariables, missingOutputContractIds } = getReceiptsWithMissingData(receipts);
45476
45135
  const hasMissingOutputs = missingOutputVariables.length !== 0 || missingOutputContractIds.length !== 0;
45477
45136
  if (hasMissingOutputs) {
@@ -45481,11 +45140,6 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
45481
45140
  transactionRequest.addContractInputAndOutput(Address.fromString(contractId));
45482
45141
  missingContractIds.push(contractId);
45483
45142
  });
45484
- const { maxFee } = await this.estimateTxGasAndFee({
45485
- transactionRequest,
45486
- optimizeGas: false
45487
- });
45488
- transactionRequest.maxFee = maxFee;
45489
45143
  } else {
45490
45144
  break;
45491
45145
  }
@@ -45493,133 +45147,7 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
45493
45147
  return {
45494
45148
  receipts,
45495
45149
  outputVariables,
45496
- missingContractIds,
45497
- dryrunStatus
45498
- };
45499
- }
45500
- /**
45501
- * Dry runs multiple transactions and checks for missing dependencies in batches.
45502
- *
45503
- * Transactions are dry run in batches. After each dry run, transactions requiring
45504
- * further modifications are identified. The method iteratively updates these transactions
45505
- * and performs subsequent dry runs until all dependencies for each transaction are satisfied.
45506
- *
45507
- * @param transactionRequests - Array of transaction request objects.
45508
- * @returns A promise that resolves to an array of results for each transaction.
45509
- */
45510
- async estimateMultipleTxDependencies(transactionRequests) {
45511
- const results = transactionRequests.map(() => ({
45512
- receipts: [],
45513
- outputVariables: 0,
45514
- missingContractIds: [],
45515
- dryrunStatus: void 0
45516
- }));
45517
- const allRequests = clone_default(transactionRequests);
45518
- const serializedTransactionsMap = /* @__PURE__ */ new Map();
45519
- allRequests.forEach((req, index) => {
45520
- if (req.type === TransactionType.Script) {
45521
- serializedTransactionsMap.set(index, hexlify(req.toTransactionBytes()));
45522
- }
45523
- });
45524
- let transactionsToProcess = Array.from(serializedTransactionsMap.keys());
45525
- let attempt = 0;
45526
- while (transactionsToProcess.length > 0 && attempt < MAX_RETRIES) {
45527
- const encodedTransactions = transactionsToProcess.map(
45528
- (index) => serializedTransactionsMap.get(index)
45529
- );
45530
- const dryRunResults = await this.operations.dryRun({
45531
- encodedTransactions,
45532
- utxoValidation: false
45533
- });
45534
- const nextRoundTransactions = [];
45535
- for (let i = 0; i < dryRunResults.dryRun.length; i++) {
45536
- const currentResultIndex = transactionsToProcess[i];
45537
- const { receipts: rawReceipts, status } = dryRunResults.dryRun[i];
45538
- results[currentResultIndex].receipts = rawReceipts.map(processGqlReceipt);
45539
- results[currentResultIndex].dryrunStatus = status;
45540
- const { missingOutputVariables, missingOutputContractIds } = getReceiptsWithMissingData(
45541
- results[currentResultIndex].receipts
45542
- );
45543
- const hasMissingOutputs = missingOutputVariables.length > 0 || missingOutputContractIds.length > 0;
45544
- const requestToProcess = allRequests[currentResultIndex];
45545
- if (hasMissingOutputs && requestToProcess?.type === TransactionType.Script) {
45546
- results[currentResultIndex].outputVariables += missingOutputVariables.length;
45547
- requestToProcess.addVariableOutputs(missingOutputVariables.length);
45548
- missingOutputContractIds.forEach(({ contractId }) => {
45549
- requestToProcess.addContractInputAndOutput(Address.fromString(contractId));
45550
- results[currentResultIndex].missingContractIds.push(contractId);
45551
- });
45552
- const { maxFee } = await this.estimateTxGasAndFee({
45553
- transactionRequest: requestToProcess,
45554
- optimizeGas: false
45555
- });
45556
- requestToProcess.maxFee = maxFee;
45557
- serializedTransactionsMap.set(
45558
- currentResultIndex,
45559
- hexlify(requestToProcess.toTransactionBytes())
45560
- );
45561
- nextRoundTransactions.push(currentResultIndex);
45562
- allRequests[currentResultIndex] = requestToProcess;
45563
- }
45564
- }
45565
- transactionsToProcess = nextRoundTransactions;
45566
- attempt += 1;
45567
- }
45568
- return results;
45569
- }
45570
- async dryRunMultipleTransactions(transactionRequests, { utxoValidation, estimateTxDependencies = true } = {}) {
45571
- if (estimateTxDependencies) {
45572
- return this.estimateMultipleTxDependencies(transactionRequests);
45573
- }
45574
- const encodedTransactions = transactionRequests.map((tx) => hexlify(tx.toTransactionBytes()));
45575
- const { dryRun: dryRunStatuses } = await this.operations.dryRun({
45576
- encodedTransactions,
45577
- utxoValidation: utxoValidation || false
45578
- });
45579
- const results = dryRunStatuses.map(({ receipts: rawReceipts, status }) => {
45580
- const receipts = rawReceipts.map(processGqlReceipt);
45581
- return { receipts, dryrunStatus: status };
45582
- });
45583
- return results;
45584
- }
45585
- async estimateTxGasAndFee(params) {
45586
- const { transactionRequest, optimizeGas = true } = params;
45587
- let { gasPrice } = params;
45588
- const chainInfo = this.getChain();
45589
- const { gasPriceFactor } = this.getGasConfig();
45590
- const minGas = transactionRequest.calculateMinGas(chainInfo);
45591
- if (!gasPrice) {
45592
- gasPrice = await this.estimateGasPrice(10);
45593
- }
45594
- const minFee = calculateGasFee({
45595
- gasPrice: bn(gasPrice),
45596
- gas: minGas,
45597
- priceFactor: gasPriceFactor,
45598
- tip: transactionRequest.tip
45599
- }).add(1);
45600
- let gasLimit = bn(0);
45601
- if (transactionRequest.type === TransactionType.Script) {
45602
- gasLimit = transactionRequest.gasLimit;
45603
- if (!optimizeGas) {
45604
- transactionRequest.gasLimit = minGas;
45605
- gasLimit = transactionRequest.calculateMaxGas(chainInfo, minGas);
45606
- transactionRequest.gasLimit = gasLimit;
45607
- }
45608
- }
45609
- const maxGas = transactionRequest.calculateMaxGas(chainInfo, minGas);
45610
- const maxFee = calculateGasFee({
45611
- gasPrice: bn(gasPrice),
45612
- gas: maxGas,
45613
- priceFactor: gasPriceFactor,
45614
- tip: transactionRequest.tip
45615
- }).add(1);
45616
- return {
45617
- minGas,
45618
- minFee,
45619
- maxGas,
45620
- maxFee,
45621
- gasPrice,
45622
- gasLimit
45150
+ missingContractIds
45623
45151
  };
45624
45152
  }
45625
45153
  /**
@@ -45637,17 +45165,15 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
45637
45165
  if (estimateTxDependencies) {
45638
45166
  return this.estimateTxDependencies(transactionRequest);
45639
45167
  }
45640
- const encodedTransactions = [hexlify(transactionRequest.toTransactionBytes())];
45641
- const { dryRun: dryRunStatuses } = await this.operations.dryRun({
45642
- encodedTransactions,
45168
+ const encodedTransaction = hexlify(transactionRequest.toTransactionBytes());
45169
+ const { dryRun: gqlReceipts } = await this.operations.dryRun({
45170
+ encodedTransaction,
45643
45171
  utxoValidation: true
45644
45172
  });
45645
- const callResult = dryRunStatuses.map((dryRunStatus) => {
45646
- const { id, receipts, status } = dryRunStatus;
45647
- const processedReceipts = receipts.map(processGqlReceipt);
45648
- return { id, receipts: processedReceipts, status };
45649
- });
45650
- return { receipts: callResult[0].receipts };
45173
+ const receipts = gqlReceipts.map(processGqlReceipt);
45174
+ return {
45175
+ receipts
45176
+ };
45651
45177
  }
45652
45178
  /**
45653
45179
  * Returns a transaction cost to enable user
@@ -45664,80 +45190,80 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
45664
45190
  * @param tolerance - The tolerance to add on top of the gasUsed.
45665
45191
  * @returns A promise that resolves to the transaction cost object.
45666
45192
  */
45667
- async getTransactionCost(transactionRequestLike, { resourcesOwner, signatureCallback, quantitiesToContract = [] } = {}) {
45193
+ async getTransactionCost(transactionRequestLike, forwardingQuantities = [], {
45194
+ estimateTxDependencies = true,
45195
+ estimatePredicates = true,
45196
+ resourcesOwner,
45197
+ signatureCallback
45198
+ } = {}) {
45668
45199
  const txRequestClone = clone_default(transactionRequestify(transactionRequestLike));
45200
+ const chainInfo = this.getChain();
45201
+ const { gasPriceFactor, minGasPrice, maxGasPerTx } = this.getGasConfig();
45202
+ const gasPrice = max(txRequestClone.gasPrice, minGasPrice);
45669
45203
  const isScriptTransaction = txRequestClone.type === TransactionType.Script;
45670
45204
  const coinOutputsQuantities = txRequestClone.getCoinOutputsQuantities();
45671
- const allQuantities = mergeQuantities(coinOutputsQuantities, quantitiesToContract);
45205
+ const allQuantities = mergeQuantities(coinOutputsQuantities, forwardingQuantities);
45672
45206
  txRequestClone.fundWithFakeUtxos(allQuantities, resourcesOwner?.address);
45673
- txRequestClone.maxFee = bn(0);
45674
- if (isScriptTransaction) {
45675
- txRequestClone.gasLimit = bn(0);
45676
- }
45677
- if (resourcesOwner && "populateTransactionPredicateData" in resourcesOwner) {
45678
- resourcesOwner.populateTransactionPredicateData(txRequestClone);
45207
+ if (estimatePredicates) {
45208
+ if (isScriptTransaction) {
45209
+ txRequestClone.gasLimit = bn(0);
45210
+ }
45211
+ if (resourcesOwner && "populateTransactionPredicateData" in resourcesOwner) {
45212
+ resourcesOwner.populateTransactionPredicateData(txRequestClone);
45213
+ }
45214
+ await this.estimatePredicates(txRequestClone);
45679
45215
  }
45680
- const signedRequest = clone_default(txRequestClone);
45681
- let addedSignatures = 0;
45682
45216
  if (signatureCallback && isScriptTransaction) {
45683
- const lengthBefore = signedRequest.witnesses.length;
45684
- await signatureCallback(signedRequest);
45685
- addedSignatures = signedRequest.witnesses.length - lengthBefore;
45686
- }
45687
- await this.estimatePredicates(signedRequest);
45688
- let { maxFee, maxGas, minFee, minGas, gasPrice, gasLimit } = await this.estimateTxGasAndFee({
45689
- transactionRequest: signedRequest,
45690
- optimizeGas: false
45691
- });
45692
- txRequestClone.maxFee = maxFee;
45217
+ await signatureCallback(txRequestClone);
45218
+ }
45219
+ const minGas = txRequestClone.calculateMinGas(chainInfo);
45220
+ const maxGas = txRequestClone.calculateMaxGas(chainInfo, minGas);
45693
45221
  let receipts = [];
45694
45222
  let missingContractIds = [];
45695
45223
  let outputVariables = 0;
45696
- let gasUsed = bn(0);
45697
- txRequestClone.updatePredicateGasUsed(signedRequest.inputs);
45698
- if (isScriptTransaction) {
45699
- if (signatureCallback) {
45700
- await signatureCallback(txRequestClone);
45701
- }
45702
- txRequestClone.gasLimit = gasLimit;
45224
+ if (isScriptTransaction && estimateTxDependencies) {
45225
+ txRequestClone.gasPrice = bn(0);
45226
+ txRequestClone.gasLimit = bn(maxGasPerTx.sub(maxGas).toNumber() * 0.9);
45703
45227
  const result = await this.estimateTxDependencies(txRequestClone);
45704
45228
  receipts = result.receipts;
45705
45229
  outputVariables = result.outputVariables;
45706
45230
  missingContractIds = result.missingContractIds;
45707
- gasUsed = getGasUsedFromReceipts(receipts);
45708
- txRequestClone.gasLimit = gasUsed;
45709
- ({ maxFee, maxGas, minFee, minGas, gasPrice } = await this.estimateTxGasAndFee({
45710
- transactionRequest: txRequestClone,
45711
- gasPrice
45712
- }));
45713
45231
  }
45232
+ const gasUsed = isScriptTransaction ? getGasUsedFromReceipts(receipts) : minGas;
45233
+ const usedFee = calculatePriceWithFactor(
45234
+ gasUsed,
45235
+ gasPrice,
45236
+ gasPriceFactor
45237
+ ).normalizeZeroToOne();
45238
+ const minFee = calculatePriceWithFactor(minGas, gasPrice, gasPriceFactor).normalizeZeroToOne();
45239
+ const maxFee = calculatePriceWithFactor(maxGas, gasPrice, gasPriceFactor).normalizeZeroToOne();
45714
45240
  return {
45715
45241
  requiredQuantities: allQuantities,
45716
45242
  receipts,
45717
45243
  gasUsed,
45244
+ minGasPrice,
45718
45245
  gasPrice,
45719
45246
  minGas,
45720
45247
  maxGas,
45248
+ usedFee,
45721
45249
  minFee,
45722
45250
  maxFee,
45251
+ estimatedInputs: txRequestClone.inputs,
45723
45252
  outputVariables,
45724
- missingContractIds,
45725
- addedSignatures,
45726
- estimatedPredicates: txRequestClone.inputs
45253
+ missingContractIds
45727
45254
  };
45728
45255
  }
45729
- async getResourcesForTransaction(owner, transactionRequestLike, quantitiesToContract = []) {
45256
+ async getResourcesForTransaction(owner, transactionRequestLike, forwardingQuantities = []) {
45730
45257
  const ownerAddress = Address.fromAddressOrString(owner);
45731
45258
  const transactionRequest = transactionRequestify(clone_default(transactionRequestLike));
45732
- const transactionCost = await this.getTransactionCost(transactionRequest, {
45733
- quantitiesToContract
45734
- });
45259
+ const transactionCost = await this.getTransactionCost(transactionRequest, forwardingQuantities);
45735
45260
  transactionRequest.addResources(
45736
45261
  await this.getResourcesToSpend(ownerAddress, transactionCost.requiredQuantities)
45737
45262
  );
45738
- const { requiredQuantities, ...txCost } = await this.getTransactionCost(transactionRequest, {
45739
- quantitiesToContract
45740
- });
45263
+ const { requiredQuantities, ...txCost } = await this.getTransactionCost(
45264
+ transactionRequest,
45265
+ forwardingQuantities
45266
+ );
45741
45267
  const resources = await this.getResourcesToSpend(ownerAddress, requiredQuantities);
45742
45268
  return {
45743
45269
  resources,
@@ -45761,6 +45287,7 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
45761
45287
  assetId: coin.assetId,
45762
45288
  amount: bn(coin.amount),
45763
45289
  owner: Address.fromAddressOrString(coin.owner),
45290
+ maturity: bn(coin.maturity).toNumber(),
45764
45291
  blockCreated: bn(coin.blockCreated),
45765
45292
  txCreatedIdx: bn(coin.txCreatedIdx)
45766
45293
  }));
@@ -45812,6 +45339,7 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
45812
45339
  amount: bn(coin.amount),
45813
45340
  assetId: coin.assetId,
45814
45341
  owner: Address.fromAddressOrString(coin.owner),
45342
+ maturity: bn(coin.maturity).toNumber(),
45815
45343
  blockCreated: bn(coin.blockCreated),
45816
45344
  txCreatedIdx: bn(coin.txCreatedIdx)
45817
45345
  };
@@ -45844,7 +45372,7 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
45844
45372
  }
45845
45373
  return {
45846
45374
  id: block2.id,
45847
- height: bn(block2.height),
45375
+ height: bn(block2.header.height),
45848
45376
  time: block2.header.time,
45849
45377
  transactionIds: block2.transactions.map((tx) => tx.id)
45850
45378
  };
@@ -45859,7 +45387,7 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
45859
45387
  const { blocks: fetchedData } = await this.operations.getBlocks(params);
45860
45388
  const blocks = fetchedData.edges.map(({ node: block2 }) => ({
45861
45389
  id: block2.id,
45862
- height: bn(block2.height),
45390
+ height: bn(block2.header.height),
45863
45391
  time: block2.header.time,
45864
45392
  transactionIds: block2.transactions.map((tx) => tx.id)
45865
45393
  }));
@@ -45886,7 +45414,7 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
45886
45414
  }
45887
45415
  return {
45888
45416
  id: block2.id,
45889
- height: bn(block2.height, 10),
45417
+ height: bn(block2.header.height, 10),
45890
45418
  time: block2.header.time,
45891
45419
  transactionIds: block2.transactions.map((tx) => tx.id),
45892
45420
  transactions: block2.transactions.map(
@@ -46066,6 +45594,7 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
46066
45594
  prevRoot: messageBlockHeader.prevRoot,
46067
45595
  time: messageBlockHeader.time,
46068
45596
  applicationHash: messageBlockHeader.applicationHash,
45597
+ messageReceiptRoot: messageBlockHeader.messageReceiptRoot,
46069
45598
  messageReceiptCount: bn(messageBlockHeader.messageReceiptCount)
46070
45599
  },
46071
45600
  commitBlockHeader: {
@@ -46077,6 +45606,7 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
46077
45606
  prevRoot: commitBlockHeader.prevRoot,
46078
45607
  time: commitBlockHeader.time,
46079
45608
  applicationHash: commitBlockHeader.applicationHash,
45609
+ messageReceiptRoot: commitBlockHeader.messageReceiptRoot,
46080
45610
  messageReceiptCount: bn(commitBlockHeader.messageReceiptCount)
46081
45611
  },
46082
45612
  sender: Address.fromAddressOrString(sender),
@@ -46086,16 +45616,6 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
46086
45616
  data
46087
45617
  };
46088
45618
  }
46089
- async getLatestGasPrice() {
46090
- const { latestGasPrice } = await this.operations.getLatestGasPrice();
46091
- return bn(latestGasPrice.gasPrice);
46092
- }
46093
- async estimateGasPrice(blockHorizon) {
46094
- const { estimateGasPrice } = await this.operations.estimateGasPrice({
46095
- blockHorizon: String(blockHorizon)
46096
- });
46097
- return bn(estimateGasPrice.gasPrice);
46098
- }
46099
45619
  /**
46100
45620
  * Returns Message Proof for given transaction id and the message id from MessageOut receipt.
46101
45621
  *
@@ -46341,8 +45861,9 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
46341
45861
  * @param assetId - The asset ID to check the balance for.
46342
45862
  * @returns A promise that resolves to the balance amount.
46343
45863
  */
46344
- async getBalance(assetId = BaseAssetId) {
46345
- const amount = await this.provider.getBalance(this.address, assetId);
45864
+ async getBalance(assetId) {
45865
+ const assetIdToFetch = assetId ?? this.provider.getBaseAssetId();
45866
+ const amount = await this.provider.getBalance(this.address, assetIdToFetch);
46346
45867
  return amount;
46347
45868
  }
46348
45869
  /**
@@ -46379,33 +45900,37 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
46379
45900
  * @param fee - The estimated transaction fee.
46380
45901
  * @returns A promise that resolves when the resources are added to the transaction.
46381
45902
  */
46382
- async fund(request, params) {
46383
- const { addedSignatures, estimatedPredicates, maxFee: fee, requiredQuantities } = params;
46384
- const txRequest = request;
46385
- const requiredQuantitiesWithFee = addAmountToCoinQuantities({
45903
+ async fund(request, coinQuantities, fee) {
45904
+ const baseAssetId = this.provider.getBaseAssetId();
45905
+ const updatedQuantities = addAmountToAsset({
46386
45906
  amount: bn(fee),
46387
- assetId: BaseAssetId,
46388
- coinQuantities: requiredQuantities
45907
+ assetId: baseAssetId,
45908
+ coinQuantities
46389
45909
  });
46390
45910
  const quantitiesDict = {};
46391
- requiredQuantitiesWithFee.forEach(({ amount, assetId }) => {
45911
+ updatedQuantities.forEach(({ amount, assetId }) => {
46392
45912
  quantitiesDict[assetId] = {
46393
45913
  required: amount,
46394
45914
  owned: bn(0)
46395
45915
  };
46396
45916
  });
46397
- txRequest.inputs.forEach((input) => {
45917
+ const cachedUtxos = [];
45918
+ const cachedMessages = [];
45919
+ const owner = this.address.toB256();
45920
+ request.inputs.forEach((input) => {
46398
45921
  const isResource = "amount" in input;
46399
45922
  if (isResource) {
46400
45923
  const isCoin2 = "owner" in input;
46401
45924
  if (isCoin2) {
46402
45925
  const assetId = String(input.assetId);
46403
- if (quantitiesDict[assetId]) {
45926
+ if (input.owner === owner && quantitiesDict[assetId]) {
46404
45927
  const amount = bn(input.amount);
46405
45928
  quantitiesDict[assetId].owned = quantitiesDict[assetId].owned.add(amount);
45929
+ cachedUtxos.push(input.id);
46406
45930
  }
46407
- } else if (input.amount && quantitiesDict[BaseAssetId]) {
46408
- quantitiesDict[BaseAssetId].owned = quantitiesDict[BaseAssetId].owned.add(input.amount);
45931
+ } else if (input.recipient === owner && input.amount && quantitiesDict[baseAssetId]) {
45932
+ quantitiesDict[baseAssetId].owned = quantitiesDict[baseAssetId].owned.add(input.amount);
45933
+ cachedMessages.push(input.nonce);
46409
45934
  }
46410
45935
  }
46411
45936
  });
@@ -46420,23 +45945,12 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
46420
45945
  });
46421
45946
  const needsToBeFunded = missingQuantities.length;
46422
45947
  if (needsToBeFunded) {
46423
- const excludedIds = cacheTxInputsFromOwner(txRequest.inputs, this.address.toB256());
46424
- const resources = await this.getResourcesToSpend(missingQuantities, excludedIds);
46425
- txRequest.addResources(resources);
46426
- }
46427
- txRequest.shiftPredicateData();
46428
- txRequest.updatePredicateGasUsed(estimatedPredicates);
46429
- const requestToBeReEstimate = clone_default(txRequest);
46430
- if (addedSignatures) {
46431
- Array.from({ length: addedSignatures }).forEach(
46432
- () => requestToBeReEstimate.addEmptyWitness()
46433
- );
45948
+ const resources = await this.getResourcesToSpend(missingQuantities, {
45949
+ messages: cachedMessages,
45950
+ utxos: cachedUtxos
45951
+ });
45952
+ request.addResources(resources);
46434
45953
  }
46435
- const { maxFee } = await this.provider.estimateTxGasAndFee({
46436
- transactionRequest: requestToBeReEstimate
46437
- });
46438
- txRequest.maxFee = maxFee;
46439
- return txRequest;
46440
45954
  }
46441
45955
  /**
46442
45956
  * A helper that creates a transfer transaction request and returns it.
@@ -46444,25 +45958,29 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
46444
45958
  * @param destination - The address of the destination.
46445
45959
  * @param amount - The amount of coins to transfer.
46446
45960
  * @param assetId - The asset ID of the coins to transfer.
46447
- * @param txParams - The transaction parameters (gasLimit, tip, maturity, maxFee, witnessLimit).
45961
+ * @param txParams - The transaction parameters (gasLimit, gasPrice, maturity).
46448
45962
  * @returns A promise that resolves to the prepared transaction request.
46449
45963
  */
46450
- async createTransfer(destination, amount, assetId = BaseAssetId, txParams = {}) {
46451
- const request = new ScriptTransactionRequest(txParams);
46452
- request.addCoinOutput(Address.fromAddressOrString(destination), amount, assetId);
46453
- const txCost = await this.provider.getTransactionCost(request, {
45964
+ async createTransfer(destination, amount, assetId, txParams = {}) {
45965
+ const { minGasPrice } = this.provider.getGasConfig();
45966
+ const assetIdToTransfer = assetId ?? this.provider.getBaseAssetId();
45967
+ const params = { gasPrice: minGasPrice, ...txParams };
45968
+ const request = new ScriptTransactionRequest(params);
45969
+ request.addCoinOutput(Address.fromAddressOrString(destination), amount, assetIdToTransfer);
45970
+ const { maxFee, requiredQuantities, gasUsed, estimatedInputs } = await this.provider.getTransactionCost(request, [], {
46454
45971
  estimateTxDependencies: true,
46455
45972
  resourcesOwner: this
46456
45973
  });
46457
- if ("gasLimit" in txParams) {
46458
- this.validateGas({
46459
- gasUsed: txCost.gasUsed,
46460
- gasLimit: request.gasLimit
46461
- });
46462
- }
46463
- request.gasLimit = txCost.gasUsed;
46464
- request.maxFee = txCost.maxFee;
46465
- await this.fund(request, txCost);
45974
+ request.gasPrice = bn(txParams.gasPrice ?? minGasPrice);
45975
+ request.gasLimit = bn(txParams.gasLimit ?? gasUsed);
45976
+ this.validateGas({
45977
+ gasUsed,
45978
+ gasPrice: request.gasPrice,
45979
+ gasLimit: request.gasLimit,
45980
+ minGasPrice
45981
+ });
45982
+ await this.fund(request, requiredQuantities, maxFee);
45983
+ request.updatePredicateInputs(estimatedInputs);
46466
45984
  return request;
46467
45985
  }
46468
45986
  /**
@@ -46474,14 +45992,15 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
46474
45992
  * @param txParams - The transaction parameters (gasLimit, gasPrice, maturity).
46475
45993
  * @returns A promise that resolves to the transaction response.
46476
45994
  */
46477
- async transfer(destination, amount, assetId = BaseAssetId, txParams = {}) {
45995
+ async transfer(destination, amount, assetId, txParams = {}) {
46478
45996
  if (bn(amount).lte(0)) {
46479
45997
  throw new FuelError(
46480
45998
  ErrorCode.INVALID_TRANSFER_AMOUNT,
46481
45999
  "Transfer amount must be a positive number."
46482
46000
  );
46483
46001
  }
46484
- const request = await this.createTransfer(destination, amount, assetId, txParams);
46002
+ const assetIdToTransfer = assetId ?? this.provider.getBaseAssetId();
46003
+ const request = await this.createTransfer(destination, amount, assetIdToTransfer, txParams);
46485
46004
  return this.sendTransaction(request, { estimateTxDependencies: false });
46486
46005
  }
46487
46006
  /**
@@ -46493,7 +46012,7 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
46493
46012
  * @param txParams - The optional transaction parameters.
46494
46013
  * @returns A promise that resolves to the transaction response.
46495
46014
  */
46496
- async transferToContract(contractId, amount, assetId = BaseAssetId, txParams = {}) {
46015
+ async transferToContract(contractId, amount, assetId, txParams = {}) {
46497
46016
  if (bn(amount).lte(0)) {
46498
46017
  throw new FuelError(
46499
46018
  ErrorCode.INVALID_TRANSFER_AMOUNT,
@@ -46501,30 +46020,32 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
46501
46020
  );
46502
46021
  }
46503
46022
  const contractAddress = Address.fromAddressOrString(contractId);
46023
+ const { minGasPrice } = this.provider.getGasConfig();
46024
+ const assetIdToTransfer = assetId ?? this.provider.getBaseAssetId();
46025
+ const params = { gasPrice: minGasPrice, ...txParams };
46504
46026
  const { script, scriptData } = await assembleTransferToContractScript({
46505
46027
  hexlifiedContractId: contractAddress.toB256(),
46506
46028
  amountToTransfer: bn(amount),
46507
- assetId
46029
+ assetId: assetIdToTransfer
46508
46030
  });
46509
46031
  const request = new ScriptTransactionRequest({
46510
- ...txParams,
46032
+ ...params,
46511
46033
  script,
46512
46034
  scriptData
46513
46035
  });
46514
46036
  request.addContractInputAndOutput(contractAddress);
46515
- const txCost = await this.provider.getTransactionCost(request, {
46516
- resourcesOwner: this,
46517
- quantitiesToContract: [{ amount: bn(amount), assetId: String(assetId) }]
46037
+ const { maxFee, requiredQuantities, gasUsed } = await this.provider.getTransactionCost(
46038
+ request,
46039
+ [{ amount: bn(amount), assetId: String(assetIdToTransfer) }]
46040
+ );
46041
+ request.gasLimit = bn(params.gasLimit ?? gasUsed);
46042
+ this.validateGas({
46043
+ gasUsed,
46044
+ gasPrice: request.gasPrice,
46045
+ gasLimit: request.gasLimit,
46046
+ minGasPrice
46518
46047
  });
46519
- if (txParams.gasLimit) {
46520
- this.validateGas({
46521
- gasUsed: txCost.gasUsed,
46522
- gasLimit: request.gasLimit
46523
- });
46524
- }
46525
- request.gasLimit = txCost.gasUsed;
46526
- request.maxFee = txCost.maxFee;
46527
- await this.fund(request, txCost);
46048
+ await this.fund(request, requiredQuantities, maxFee);
46528
46049
  return this.sendTransaction(request);
46529
46050
  }
46530
46051
  /**
@@ -46536,6 +46057,8 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
46536
46057
  * @returns A promise that resolves to the transaction response.
46537
46058
  */
46538
46059
  async withdrawToBaseLayer(recipient, amount, txParams = {}) {
46060
+ const { minGasPrice } = this.provider.getGasConfig();
46061
+ const baseAssetId = this.provider.getBaseAssetId();
46539
46062
  const recipientAddress = Address.fromAddressOrString(recipient);
46540
46063
  const recipientDataArray = arrayify(
46541
46064
  "0x".concat(recipientAddress.toHexString().substring(2).padStart(64, "0"))
@@ -46548,19 +46071,21 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
46548
46071
  ...recipientDataArray,
46549
46072
  ...amountDataArray
46550
46073
  ]);
46551
- const params = { script, ...txParams };
46074
+ const params = { script, gasPrice: minGasPrice, ...txParams };
46552
46075
  const request = new ScriptTransactionRequest(params);
46553
- const quantitiesToContract = [{ amount: bn(amount), assetId: BaseAssetId }];
46554
- const txCost = await this.provider.getTransactionCost(request, { quantitiesToContract });
46555
- if (txParams.gasLimit) {
46556
- this.validateGas({
46557
- gasUsed: txCost.gasUsed,
46558
- gasLimit: request.gasLimit
46559
- });
46560
- }
46561
- request.maxFee = txCost.maxFee;
46562
- request.gasLimit = txCost.gasUsed;
46563
- await this.fund(request, txCost);
46076
+ const forwardingQuantities = [{ amount: bn(amount), assetId: baseAssetId }];
46077
+ const { requiredQuantities, maxFee, gasUsed } = await this.provider.getTransactionCost(
46078
+ request,
46079
+ forwardingQuantities
46080
+ );
46081
+ request.gasLimit = bn(params.gasLimit ?? gasUsed);
46082
+ this.validateGas({
46083
+ gasUsed,
46084
+ gasPrice: request.gasPrice,
46085
+ gasLimit: request.gasLimit,
46086
+ minGasPrice
46087
+ });
46088
+ await this.fund(request, requiredQuantities, maxFee);
46564
46089
  return this.sendTransaction(request);
46565
46090
  }
46566
46091
  async signMessage(message) {
@@ -46618,7 +46143,18 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
46618
46143
  }
46619
46144
  return this.provider.simulate(transactionRequest, { estimateTxDependencies: false });
46620
46145
  }
46621
- validateGas({ gasUsed, gasLimit }) {
46146
+ validateGas({
46147
+ gasUsed,
46148
+ gasPrice,
46149
+ gasLimit,
46150
+ minGasPrice
46151
+ }) {
46152
+ if (minGasPrice.gt(gasPrice)) {
46153
+ throw new FuelError(
46154
+ ErrorCode.GAS_PRICE_TOO_LOW,
46155
+ `Gas price '${gasPrice}' is lower than the required: '${minGasPrice}'.`
46156
+ );
46157
+ }
46622
46158
  if (gasUsed.gt(gasLimit)) {
46623
46159
  throw new FuelError(
46624
46160
  ErrorCode.GAS_LIMIT_TOO_LOW,
@@ -48001,12 +47537,12 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
48001
47537
  };
48002
47538
 
48003
47539
  // ../../node_modules/.pnpm/uuid@9.0.0/node_modules/uuid/dist/esm-node/rng.js
48004
- var import_crypto16 = __toESM(__require("crypto"));
47540
+ var import_crypto15 = __toESM(__require("crypto"));
48005
47541
  var rnds8Pool = new Uint8Array(256);
48006
47542
  var poolPtr = rnds8Pool.length;
48007
47543
  function rng() {
48008
47544
  if (poolPtr > rnds8Pool.length - 16) {
48009
- import_crypto16.default.randomFillSync(rnds8Pool);
47545
+ import_crypto15.default.randomFillSync(rnds8Pool);
48010
47546
  poolPtr = 0;
48011
47547
  }
48012
47548
  return rnds8Pool.slice(poolPtr, poolPtr += 16);
@@ -48022,9 +47558,9 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
48022
47558
  }
48023
47559
 
48024
47560
  // ../../node_modules/.pnpm/uuid@9.0.0/node_modules/uuid/dist/esm-node/native.js
48025
- var import_crypto17 = __toESM(__require("crypto"));
47561
+ var import_crypto16 = __toESM(__require("crypto"));
48026
47562
  var native_default = {
48027
- randomUUID: import_crypto17.default.randomUUID
47563
+ randomUUID: import_crypto16.default.randomUUID
48028
47564
  };
48029
47565
 
48030
47566
  // ../../node_modules/.pnpm/uuid@9.0.0/node_modules/uuid/dist/esm-node/v4.js
@@ -48207,7 +47743,7 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
48207
47743
  * @param transactionRequestLike - The transaction request to send.
48208
47744
  * @returns A promise that resolves to the TransactionResponse object.
48209
47745
  */
48210
- async sendTransaction(transactionRequestLike, { estimateTxDependencies = false, awaitExecution } = {}) {
47746
+ async sendTransaction(transactionRequestLike, { estimateTxDependencies = true, awaitExecution } = {}) {
48211
47747
  const transactionRequest = transactionRequestify(transactionRequestLike);
48212
47748
  if (estimateTxDependencies) {
48213
47749
  await this.provider.estimateTxDependencies(transactionRequest);
@@ -50967,15 +50503,14 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
50967
50503
  process.env.GENESIS_SECRET || randomBytes22(32),
50968
50504
  wallet.provider
50969
50505
  );
50970
- const request = new ScriptTransactionRequest();
50971
- quantities.forEach((quantity) => {
50972
- const { amount, assetId } = coinQuantityfy(quantity);
50973
- request.addCoinOutput(wallet.address, amount, assetId);
50506
+ const resources = await genesisWallet.getResourcesToSpend(quantities);
50507
+ const { minGasPrice } = genesisWallet.provider.getGasConfig();
50508
+ const request = new ScriptTransactionRequest({
50509
+ gasLimit: 1e4,
50510
+ gasPrice: minGasPrice
50974
50511
  });
50975
- const txCost = await genesisWallet.provider.getTransactionCost(request);
50976
- request.gasLimit = txCost.gasUsed;
50977
- request.maxFee = txCost.maxFee;
50978
- await genesisWallet.fund(request, txCost);
50512
+ request.addResources(resources);
50513
+ quantities.map(coinQuantityfy).forEach(({ amount, assetId }) => request.addCoinOutput(wallet.address, amount, assetId));
50979
50514
  await genesisWallet.sendTransaction(request, { awaitExecution: true });
50980
50515
  };
50981
50516
 
@@ -51005,7 +50540,7 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
51005
50540
 
51006
50541
  // src/test-utils/launchNode.ts
51007
50542
  var import_child_process = __require("child_process");
51008
- var import_crypto21 = __require("crypto");
50543
+ var import_crypto20 = __require("crypto");
51009
50544
  var import_fs2 = __require("fs");
51010
50545
  var import_os = __toESM(__require("os"));
51011
50546
  var import_path8 = __toESM(__require("path"));
@@ -51054,12 +50589,12 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
51054
50589
  // eslint-disable-next-line no-async-promise-executor
51055
50590
  new Promise(async (resolve, reject) => {
51056
50591
  const remainingArgs = extractRemainingArgs(args, [
51057
- "--snapshot",
50592
+ "--chain",
51058
50593
  "--consensus-key",
51059
50594
  "--db-type",
51060
50595
  "--poa-instant"
51061
50596
  ]);
51062
- const chainConfigPath = getFlagValueFromArgs(args, "--snapshot");
50597
+ const chainConfigPath = getFlagValueFromArgs(args, "--chain");
51063
50598
  const consensusKey = getFlagValueFromArgs(args, "--consensus-key") || defaultConsensusKey;
51064
50599
  const dbTypeFlagValue = getFlagValueFromArgs(args, "--db-type");
51065
50600
  const useInMemoryDb = dbTypeFlagValue === "in-memory" || dbTypeFlagValue === void 0;
@@ -51077,55 +50612,37 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
51077
50612
  })).toString();
51078
50613
  let chainConfigPathToUse;
51079
50614
  const prefix = basePath || import_os.default.tmpdir();
51080
- const suffix = basePath ? "" : (0, import_crypto21.randomUUID)();
51081
- const tempDirPath = import_path8.default.join(prefix, ".fuels", suffix, "chainConfigs");
50615
+ const suffix = basePath ? "" : (0, import_crypto20.randomUUID)();
50616
+ const tempDirPath = import_path8.default.join(prefix, ".fuels", suffix);
51082
50617
  if (chainConfigPath) {
51083
50618
  chainConfigPathToUse = chainConfigPath;
51084
50619
  } else {
51085
50620
  if (!(0, import_fs2.existsSync)(tempDirPath)) {
51086
50621
  (0, import_fs2.mkdirSync)(tempDirPath, { recursive: true });
51087
50622
  }
51088
- let { stateConfigJson } = defaultChainConfigs;
51089
- const { chainConfigJson, metadataJson } = defaultChainConfigs;
51090
- stateConfigJson = {
51091
- ...stateConfigJson,
51092
- coins: [
51093
- ...stateConfigJson.coins.map((coin) => ({
51094
- ...coin,
51095
- amount: "18446744073709551615"
51096
- }))
51097
- ],
51098
- messages: stateConfigJson.messages.map((message) => ({
51099
- ...message,
51100
- amount: "18446744073709551615"
51101
- }))
51102
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
51103
- };
50623
+ const tempChainConfigFilePath = import_path8.default.join(tempDirPath, "chainConfig.json");
50624
+ let chainConfig = defaultChainConfig;
51104
50625
  if (!process.env.GENESIS_SECRET) {
51105
50626
  const pk = Signer.generatePrivateKey();
51106
50627
  const signer = new Signer(pk);
51107
50628
  process.env.GENESIS_SECRET = hexlify(pk);
51108
- stateConfigJson.coins.push({
51109
- tx_id: hexlify(randomBytes3(34)),
51110
- owner: signer.address.toHexString(),
51111
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
51112
- amount: "18446744073709551615",
51113
- asset_id: BaseAssetId,
51114
- output_index: 0,
51115
- tx_pointer_block_height: 0,
51116
- tx_pointer_tx_idx: 0
51117
- });
50629
+ chainConfig = {
50630
+ ...defaultChainConfig,
50631
+ initial_state: {
50632
+ ...defaultChainConfig.initial_state,
50633
+ coins: [
50634
+ ...defaultChainConfig.initial_state.coins,
50635
+ {
50636
+ owner: signer.address.toHexString(),
50637
+ amount: toHex(1e9),
50638
+ asset_id: defaultChainConfig?.consensus_parameters?.base_asset_id ?? ZeroBytes32
50639
+ }
50640
+ ]
50641
+ }
50642
+ };
51118
50643
  }
51119
- let fixedStateConfigJSON = JSON.stringify(stateConfigJson);
51120
- const regexMakeNumber = /("amount":)"(\d+)"/gm;
51121
- fixedStateConfigJSON = fixedStateConfigJSON.replace(regexMakeNumber, "$1$2");
51122
- const chainConfigWritePath = import_path8.default.join(tempDirPath, "chainConfig.json");
51123
- const stateConfigWritePath = import_path8.default.join(tempDirPath, "stateConfig.json");
51124
- const metadataWritePath = import_path8.default.join(tempDirPath, "metadata.json");
51125
- (0, import_fs2.writeFileSync)(chainConfigWritePath, JSON.stringify(chainConfigJson), "utf8");
51126
- (0, import_fs2.writeFileSync)(stateConfigWritePath, fixedStateConfigJSON, "utf8");
51127
- (0, import_fs2.writeFileSync)(metadataWritePath, JSON.stringify(metadataJson), "utf8");
51128
- chainConfigPathToUse = tempDirPath;
50644
+ (0, import_fs2.writeFileSync)(tempChainConfigFilePath, JSON.stringify(chainConfig), "utf8");
50645
+ chainConfigPathToUse = tempChainConfigFilePath;
51129
50646
  }
51130
50647
  const child = (0, import_child_process.spawn)(
51131
50648
  command,
@@ -51134,10 +50651,10 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
51134
50651
  ["--ip", ipToUse],
51135
50652
  ["--port", portToUse],
51136
50653
  useInMemoryDb ? ["--db-type", "in-memory"] : ["--db-path", tempDirPath],
51137
- ["--min-gas-price", "1"],
50654
+ ["--min-gas-price", "0"],
51138
50655
  poaInstant ? ["--poa-instant", "true"] : [],
51139
50656
  ["--consensus-key", consensusKey],
51140
- ["--snapshot", chainConfigPathToUse],
50657
+ ["--chain", chainConfigPathToUse],
51141
50658
  "--vm-backtrace",
51142
50659
  "--utxo-validation",
51143
50660
  "--debug",
@@ -51184,9 +50701,10 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
51184
50701
  })
51185
50702
  );
51186
50703
  var generateWallets = async (count, provider) => {
50704
+ const baseAssetId = provider.getBaseAssetId();
51187
50705
  const wallets = [];
51188
50706
  for (let i = 0; i < count; i += 1) {
51189
- const wallet = await generateTestWallet(provider, [[1e3, BaseAssetId]]);
50707
+ const wallet = await generateTestWallet(provider, [[1e3, baseAssetId]]);
51190
50708
  wallets.push(wallet);
51191
50709
  }
51192
50710
  return wallets;
@@ -51196,7 +50714,7 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
51196
50714
  walletCount = 10
51197
50715
  } = {}) => {
51198
50716
  const { cleanup: closeNode, ip, port } = await launchNode(launchNodeOptions || {});
51199
- const provider = await Provider.create(`http://${ip}:${port}/v1/graphql`);
50717
+ const provider = await Provider.create(`http://${ip}:${port}/graphql`);
51200
50718
  const wallets = await generateWallets(walletCount, provider);
51201
50719
  const cleanup = () => {
51202
50720
  closeNode();