@fuel-ts/account 0.94.6 → 0.94.8

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.
@@ -26,7 +26,6 @@ import { defaultConsensusKey, hexlify as hexlify2, defaultSnapshotConfigs } from
26
26
  import { existsSync, mkdirSync, rmSync, writeFileSync } from "fs";
27
27
  import os from "os";
28
28
  import path from "path";
29
- import { getPortPromise } from "portfinder";
30
29
 
31
30
  // src/signer/signer.ts
32
31
  import { Address } from "@fuel-ts/address";
@@ -219,12 +218,7 @@ var launchNode = async ({
219
218
  const graphQLStartSubstring = "Binding GraphQL provider to";
220
219
  const command = fuelCorePath || "fuel-core";
221
220
  const ipToUse = ip || "0.0.0.0";
222
- const portToUse = port || (await getPortPromise({
223
- port: 4e3,
224
- // tries 4000 first, then 4001, then 4002, etc.
225
- stopPort: 5e3
226
- // don't try ports above 5000
227
- })).toString();
221
+ const portToUse = port || "0";
228
222
  let snapshotDirToUse;
229
223
  const prefix = basePath || os.tmpdir();
230
224
  const suffix = basePath ? "" : randomUUID();
@@ -1796,6 +1790,7 @@ function assembleReceiptByType(receipt) {
1796
1790
  len: bn4(receipt.len),
1797
1791
  digest: hexOrZero(receipt.digest),
1798
1792
  pc: bn4(receipt.pc),
1793
+ data: hexOrZero(receipt.data),
1799
1794
  is: bn4(receipt.is)
1800
1795
  };
1801
1796
  return returnDataReceipt;
@@ -1844,6 +1839,7 @@ function assembleReceiptByType(receipt) {
1844
1839
  len: bn4(receipt.len),
1845
1840
  digest: hexOrZero(receipt.digest),
1846
1841
  pc: bn4(receipt.pc),
1842
+ data: hexOrZero(receipt.data),
1847
1843
  is: bn4(receipt.is)
1848
1844
  };
1849
1845
  return logDataReceipt;
@@ -1887,6 +1883,7 @@ function assembleReceiptByType(receipt) {
1887
1883
  const amount = bn4(receipt.amount);
1888
1884
  const data = receipt.data ? arrayify3(receipt.data) : Uint8Array.from([]);
1889
1885
  const digest = hexOrZero(receipt.digest);
1886
+ const len = bn4(receipt.len).toNumber();
1890
1887
  const messageId = InputMessageCoder.getMessageId({
1891
1888
  sender,
1892
1889
  recipient,
@@ -1900,6 +1897,7 @@ function assembleReceiptByType(receipt) {
1900
1897
  recipient,
1901
1898
  amount,
1902
1899
  nonce,
1900
+ len,
1903
1901
  data,
1904
1902
  digest,
1905
1903
  messageId
@@ -4116,25 +4114,7 @@ function getOperations({
4116
4114
 
4117
4115
  // src/providers/transaction-summary/receipt.ts
4118
4116
  import { ReceiptType as ReceiptType5 } from "@fuel-ts/transactions";
4119
- var processGqlReceipt = (gqlReceipt) => {
4120
- const receipt = assembleReceiptByType(gqlReceipt);
4121
- switch (receipt.type) {
4122
- case ReceiptType5.ReturnData: {
4123
- return {
4124
- ...receipt,
4125
- data: gqlReceipt.data || "0x"
4126
- };
4127
- }
4128
- case ReceiptType5.LogData: {
4129
- return {
4130
- ...receipt,
4131
- data: gqlReceipt.data || "0x"
4132
- };
4133
- }
4134
- default:
4135
- return receipt;
4136
- }
4137
- };
4117
+ var processGqlReceipt = (gqlReceipt) => assembleReceiptByType(gqlReceipt);
4138
4118
  var extractMintedAssetsFromReceipts = (receipts) => {
4139
4119
  const mintedAssets = [];
4140
4120
  receipts.forEach((receipt) => {
@@ -6155,7 +6135,7 @@ var rawAssets = [
6155
6135
  chainId: CHAIN_IDS.fuel.mainnet,
6156
6136
  contractId: "0x4ea6ccef1215d9479f1024dff70fc055ca538215d2c8c348beddffd54583d0e8",
6157
6137
  assetId: "0xa38a5a8beeb08d95744bc7f58528073f4052b254def59eba20c99c202b5acaa3",
6158
- decimals: 18
6138
+ decimals: 9
6159
6139
  }
6160
6140
  ]
6161
6141
  },
@@ -6175,7 +6155,7 @@ var rawAssets = [
6175
6155
  chainId: CHAIN_IDS.fuel.mainnet,
6176
6156
  contractId: "0x4ea6ccef1215d9479f1024dff70fc055ca538215d2c8c348beddffd54583d0e8",
6177
6157
  assetId: "0x239ed6e12b7ce4089ee245244e3bf906999a6429c2a9a445a1e1faf56914a4ab",
6178
- decimals: 18
6158
+ decimals: 9
6179
6159
  }
6180
6160
  ]
6181
6161
  },
@@ -6195,7 +6175,7 @@ var rawAssets = [
6195
6175
  chainId: CHAIN_IDS.fuel.mainnet,
6196
6176
  contractId: "0x4ea6ccef1215d9479f1024dff70fc055ca538215d2c8c348beddffd54583d0e8",
6197
6177
  assetId: "0xbae80f7fb8aa6b90d9b01ef726ec847cc4f59419c4d5f2ea88fec785d1b0e849",
6198
- decimals: 18
6178
+ decimals: 9
6199
6179
  }
6200
6180
  ]
6201
6181
  },
@@ -6215,7 +6195,7 @@ var rawAssets = [
6215
6195
  chainId: CHAIN_IDS.fuel.mainnet,
6216
6196
  contractId: "0x4ea6ccef1215d9479f1024dff70fc055ca538215d2c8c348beddffd54583d0e8",
6217
6197
  assetId: "0xf3f9a0ed0ce8eac5f89d6b83e41b3848212d5b5f56108c54a205bb228ca30c16",
6218
- decimals: 18
6198
+ decimals: 9
6219
6199
  }
6220
6200
  ]
6221
6201
  },
@@ -6235,7 +6215,7 @@ var rawAssets = [
6235
6215
  chainId: CHAIN_IDS.fuel.mainnet,
6236
6216
  contractId: "0x4ea6ccef1215d9479f1024dff70fc055ca538215d2c8c348beddffd54583d0e8",
6237
6217
  assetId: "0x7843c74bef935e837f2bcf67b5d64ecb46dd53ff86375530b0caf3699e8ffafe",
6238
- decimals: 18
6218
+ decimals: 9
6239
6219
  }
6240
6220
  ]
6241
6221
  },
@@ -6255,7 +6235,7 @@ var rawAssets = [
6255
6235
  chainId: CHAIN_IDS.fuel.mainnet,
6256
6236
  contractId: "0x4ea6ccef1215d9479f1024dff70fc055ca538215d2c8c348beddffd54583d0e8",
6257
6237
  assetId: "0x962792286fbc9b1d5860b4551362a12249362c21594c77abf4b3fe2bbe8d977a",
6258
- decimals: 18
6238
+ decimals: 9
6259
6239
  }
6260
6240
  ]
6261
6241
  },
@@ -6275,7 +6255,7 @@ var rawAssets = [
6275
6255
  chainId: CHAIN_IDS.fuel.mainnet,
6276
6256
  contractId: "0x4ea6ccef1215d9479f1024dff70fc055ca538215d2c8c348beddffd54583d0e8",
6277
6257
  assetId: "0x05fc623e57bd7bc1258efa8e4f62b05af5471d73df6f2c2dc11ecc81134c4f36",
6278
- decimals: 18
6258
+ decimals: 9
6279
6259
  }
6280
6260
  ]
6281
6261
  },
@@ -6295,7 +6275,7 @@ var rawAssets = [
6295
6275
  chainId: CHAIN_IDS.fuel.mainnet,
6296
6276
  contractId: "0x4ea6ccef1215d9479f1024dff70fc055ca538215d2c8c348beddffd54583d0e8",
6297
6277
  assetId: "0xaf3111a248ff7a3238cdeea845bb2d43cf3835f1f6b8c9d28360728b55b9ce5b",
6298
- decimals: 18
6278
+ decimals: 9
6299
6279
  }
6300
6280
  ]
6301
6281
  },
@@ -6315,7 +6295,7 @@ var rawAssets = [
6315
6295
  chainId: CHAIN_IDS.fuel.mainnet,
6316
6296
  contractId: "0x4ea6ccef1215d9479f1024dff70fc055ca538215d2c8c348beddffd54583d0e8",
6317
6297
  assetId: "0xafd219f513317b1750783c6581f55530d6cf189a5863fd18bd1b3ffcec1714b4",
6318
- decimals: 18
6298
+ decimals: 9
6319
6299
  }
6320
6300
  ]
6321
6301
  },
@@ -6335,7 +6315,7 @@ var rawAssets = [
6335
6315
  chainId: CHAIN_IDS.fuel.mainnet,
6336
6316
  contractId: "0x4ea6ccef1215d9479f1024dff70fc055ca538215d2c8c348beddffd54583d0e8",
6337
6317
  assetId: "0x89cb9401e55d49c3269654dd1cdfb0e80e57823a4a7db98ba8fc5953b120fef4",
6338
- decimals: 18
6318
+ decimals: 9
6339
6319
  }
6340
6320
  ]
6341
6321
  },
@@ -6395,7 +6375,7 @@ var rawAssets = [
6395
6375
  chainId: CHAIN_IDS.fuel.mainnet,
6396
6376
  contractId: "0x4ea6ccef1215d9479f1024dff70fc055ca538215d2c8c348beddffd54583d0e8",
6397
6377
  assetId: "0x1186afea9affb88809c210e13e2330b5258c2cef04bb8fff5eff372b7bd3f40f",
6398
- decimals: 18
6378
+ decimals: 9
6399
6379
  }
6400
6380
  ]
6401
6381
  },
@@ -6415,7 +6395,7 @@ var rawAssets = [
6415
6395
  chainId: CHAIN_IDS.fuel.mainnet,
6416
6396
  contractId: "0x4ea6ccef1215d9479f1024dff70fc055ca538215d2c8c348beddffd54583d0e8",
6417
6397
  assetId: "0x7a4f087c957d30218223c2baaaa365355c9ca81b6ea49004cfb1590a5399216f",
6418
- decimals: 18
6398
+ decimals: 9
6419
6399
  }
6420
6400
  ]
6421
6401
  },
@@ -6435,7 +6415,7 @@ var rawAssets = [
6435
6415
  chainId: CHAIN_IDS.fuel.mainnet,
6436
6416
  contractId: "0x4ea6ccef1215d9479f1024dff70fc055ca538215d2c8c348beddffd54583d0e8",
6437
6417
  assetId: "0x642a5db59ec323c2f846d4d4cf3e58d78aff64accf4f8f6455ba0aa3ef000a3b",
6438
- decimals: 18
6418
+ decimals: 9
6439
6419
  }
6440
6420
  ]
6441
6421
  },
@@ -6455,7 +6435,7 @@ var rawAssets = [
6455
6435
  chainId: CHAIN_IDS.fuel.mainnet,
6456
6436
  contractId: "0x4ea6ccef1215d9479f1024dff70fc055ca538215d2c8c348beddffd54583d0e8",
6457
6437
  assetId: "0x9e46f919fbf978f3cad7cd34cca982d5613af63ff8aab6c379e4faa179552958",
6458
- decimals: 18
6438
+ decimals: 9
6459
6439
  }
6460
6440
  ]
6461
6441
  },
@@ -6510,25 +6490,12 @@ var rawAssets = [
6510
6490
  address: "0x4c9edd5852cd905f086c759e8383e09bff1e68b3",
6511
6491
  decimals: 18
6512
6492
  },
6513
- {
6514
- type: "ethereum",
6515
- chainId: CHAIN_IDS.eth.sepolia,
6516
- address: "0xc6387efad0f184a90b34f397c3d6fd63135ef790",
6517
- decimals: 18
6518
- },
6519
6493
  {
6520
6494
  type: "fuel",
6521
6495
  chainId: CHAIN_IDS.fuel.mainnet,
6522
6496
  contractId: "0x4ea6ccef1215d9479f1024dff70fc055ca538215d2c8c348beddffd54583d0e8",
6523
6497
  assetId: "0xb6133b2ef9f6153eb869125d23dcf20d1e735331b5e41b15a6a7a6cec70e8651",
6524
- decimals: 18
6525
- },
6526
- {
6527
- type: "fuel",
6528
- chainId: CHAIN_IDS.fuel.testnet,
6529
- contractId: "0xC6387efAD0F184a90B34f397C3d6Fd63135ef790",
6530
- assetId: "0xf5c6d72d0f2c782fa47d8e228c198a08654e9fc66ca60ad85902b1d09046a7ab",
6531
- decimals: 18
6498
+ decimals: 9
6532
6499
  }
6533
6500
  ]
6534
6501
  },
@@ -6543,25 +6510,12 @@ var rawAssets = [
6543
6510
  address: "0x9d39a5de30e57443bff2a8307a4256c8797a3497",
6544
6511
  decimals: 18
6545
6512
  },
6546
- {
6547
- type: "ethereum",
6548
- chainId: CHAIN_IDS.eth.sepolia,
6549
- address: "0xb8f4f4eafc1d2a3c0a4d519bbf1114c311cc9b1b",
6550
- decimals: 18
6551
- },
6552
6513
  {
6553
6514
  type: "fuel",
6554
6515
  chainId: CHAIN_IDS.fuel.mainnet,
6555
6516
  contractId: "0x4ea6ccef1215d9479f1024dff70fc055ca538215d2c8c348beddffd54583d0e8",
6556
6517
  assetId: "0xd05563025104fc36496c15c7021ad6b31034b0e89a356f4f818045d1f48808bc",
6557
- decimals: 18
6558
- },
6559
- {
6560
- type: "fuel",
6561
- chainId: CHAIN_IDS.fuel.testnet,
6562
- contractId: "0xC6387efAD0F184a90B34f397C3d6Fd63135ef790",
6563
- assetId: "0xa86e37d385c08beddbb02c8260f9ec535d484c8ea908fc19d4e6dc8d5141fb2e",
6564
- decimals: 18
6518
+ decimals: 9
6565
6519
  }
6566
6520
  ]
6567
6521
  },
@@ -6581,7 +6535,7 @@ var rawAssets = [
6581
6535
  chainId: CHAIN_IDS.fuel.mainnet,
6582
6536
  contractId: "0x4ea6ccef1215d9479f1024dff70fc055ca538215d2c8c348beddffd54583d0e8",
6583
6537
  assetId: "0x78d4522ec607f6e8efb66ea49439d1ee48623cf763f9688a8eada025def033d9",
6584
- decimals: 18
6538
+ decimals: 9
6585
6539
  }
6586
6540
  ]
6587
6541
  },
@@ -6596,25 +6550,12 @@ var rawAssets = [
6596
6550
  address: "0x7f39C581F595B53c5cb19bD0b3f8dA6c935E2Ca0",
6597
6551
  decimals: 18
6598
6552
  },
6599
- {
6600
- type: "ethereum",
6601
- chainId: CHAIN_IDS.eth.sepolia,
6602
- address: "0xB82381A3fBD3FaFA77B3a7bE693342618240067b",
6603
- decimals: 18
6604
- },
6605
6553
  {
6606
6554
  type: "fuel",
6607
6555
  chainId: CHAIN_IDS.fuel.mainnet,
6608
6556
  contractId: "0x4ea6ccef1215d9479f1024dff70fc055ca538215d2c8c348beddffd54583d0e8",
6609
6557
  assetId: "0x1a7815cc9f75db5c24a5b0814bfb706bb9fe485333e98254015de8f48f84c67b",
6610
- decimals: 18
6611
- },
6612
- {
6613
- type: "fuel",
6614
- chainId: CHAIN_IDS.fuel.testnet,
6615
- contractId: "0xC6387efAD0F184a90B34f397C3d6Fd63135ef790",
6616
- assetId: "0x4c467e3fd4f32179e1aad3b92ebbdaa6ff6aeda5b8da5f8e64e96405eb52a7f5",
6617
- decimals: 18
6558
+ decimals: 9
6618
6559
  }
6619
6560
  ]
6620
6561
  },
@@ -6634,7 +6575,7 @@ var rawAssets = [
6634
6575
  chainId: CHAIN_IDS.fuel.mainnet,
6635
6576
  contractId: "0x4ea6ccef1215d9479f1024dff70fc055ca538215d2c8c348beddffd54583d0e8",
6636
6577
  assetId: "0x91b3559edb2619cde8ffb2aa7b3c3be97efd794ea46700db7092abeee62281b0",
6637
- decimals: 18
6578
+ decimals: 9
6638
6579
  }
6639
6580
  ]
6640
6581
  },
@@ -6654,7 +6595,7 @@ var rawAssets = [
6654
6595
  chainId: CHAIN_IDS.fuel.mainnet,
6655
6596
  contractId: "0x4ea6ccef1215d9479f1024dff70fc055ca538215d2c8c348beddffd54583d0e8",
6656
6597
  assetId: "0x1493d4ec82124de8f9b625682de69dcccda79e882b89a55a8c737b12de67bd68",
6657
- decimals: 18
6598
+ decimals: 9
6658
6599
  }
6659
6600
  ]
6660
6601
  },
@@ -6674,7 +6615,7 @@ var rawAssets = [
6674
6615
  chainId: CHAIN_IDS.fuel.mainnet,
6675
6616
  contractId: "0x4ea6ccef1215d9479f1024dff70fc055ca538215d2c8c348beddffd54583d0e8",
6676
6617
  assetId: "0xf2fc648c23a5db24610a1cf696acc4f0f6d9a7d6028dd9944964ab23f6e35995",
6677
- decimals: 18
6618
+ decimals: 9
6678
6619
  }
6679
6620
  ]
6680
6621
  },
@@ -6694,7 +6635,7 @@ var rawAssets = [
6694
6635
  chainId: CHAIN_IDS.fuel.mainnet,
6695
6636
  contractId: "0x4ea6ccef1215d9479f1024dff70fc055ca538215d2c8c348beddffd54583d0e8",
6696
6637
  assetId: "0x4fc8ac9f101df07e2c2dec4a53c8c42c439bdbe5e36ea2d863a61ff60afafc30",
6697
- decimals: 18
6638
+ decimals: 9
6698
6639
  }
6699
6640
  ]
6700
6641
  }