@fuel-ts/account 0.0.0-rc-2021-20240424121206 → 0.0.0-rc-1976-20240424150847

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 (56) hide show
  1. package/README.md +3 -3
  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 +686 -942
  12. package/dist/index.global.js.map +1 -1
  13. package/dist/index.js +605 -865
  14. package/dist/index.js.map +1 -1
  15. package/dist/index.mjs +448 -707
  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 +327 -821
  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/message.d.ts +1 -7
  26. package/dist/providers/message.d.ts.map +1 -1
  27. package/dist/providers/provider.d.ts +34 -37
  28. package/dist/providers/provider.d.ts.map +1 -1
  29. package/dist/providers/transaction-request/create-transaction-request.d.ts +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 +33 -12
  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/providers/utils/merge-quantities.d.ts +1 -1
  47. package/dist/providers/utils/merge-quantities.d.ts.map +1 -1
  48. package/dist/test-utils/launchNode.d.ts.map +1 -1
  49. package/dist/test-utils.global.js +1218 -1690
  50. package/dist/test-utils.global.js.map +1 -1
  51. package/dist/test-utils.js +604 -846
  52. package/dist/test-utils.js.map +1 -1
  53. package/dist/test-utils.mjs +458 -700
  54. package/dist/test-utils.mjs.map +1 -1
  55. package/dist/wallet/base-wallet-unlocked.d.ts.map +1 -1
  56. 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
@@ -6201,9 +6201,9 @@
6201
6201
  }
6202
6202
  });
6203
6203
 
6204
- // ../../node_modules/.pnpm/graphql@16.6.0/node_modules/graphql/jsutils/isObjectLike.js
6204
+ // ../../node_modules/.pnpm/graphql@16.8.1/node_modules/graphql/jsutils/isObjectLike.js
6205
6205
  var require_isObjectLike = __commonJS({
6206
- "../../node_modules/.pnpm/graphql@16.6.0/node_modules/graphql/jsutils/isObjectLike.js"(exports) {
6206
+ "../../node_modules/.pnpm/graphql@16.8.1/node_modules/graphql/jsutils/isObjectLike.js"(exports) {
6207
6207
  "use strict";
6208
6208
  Object.defineProperty(exports, "__esModule", {
6209
6209
  value: true
@@ -6215,9 +6215,9 @@
6215
6215
  }
6216
6216
  });
6217
6217
 
6218
- // ../../node_modules/.pnpm/graphql@16.6.0/node_modules/graphql/jsutils/invariant.js
6218
+ // ../../node_modules/.pnpm/graphql@16.8.1/node_modules/graphql/jsutils/invariant.js
6219
6219
  var require_invariant = __commonJS({
6220
- "../../node_modules/.pnpm/graphql@16.6.0/node_modules/graphql/jsutils/invariant.js"(exports) {
6220
+ "../../node_modules/.pnpm/graphql@16.8.1/node_modules/graphql/jsutils/invariant.js"(exports) {
6221
6221
  "use strict";
6222
6222
  Object.defineProperty(exports, "__esModule", {
6223
6223
  value: true
@@ -6234,9 +6234,9 @@
6234
6234
  }
6235
6235
  });
6236
6236
 
6237
- // ../../node_modules/.pnpm/graphql@16.6.0/node_modules/graphql/language/location.js
6237
+ // ../../node_modules/.pnpm/graphql@16.8.1/node_modules/graphql/language/location.js
6238
6238
  var require_location = __commonJS({
6239
- "../../node_modules/.pnpm/graphql@16.6.0/node_modules/graphql/language/location.js"(exports) {
6239
+ "../../node_modules/.pnpm/graphql@16.8.1/node_modules/graphql/language/location.js"(exports) {
6240
6240
  "use strict";
6241
6241
  Object.defineProperty(exports, "__esModule", {
6242
6242
  value: true
@@ -6263,9 +6263,9 @@
6263
6263
  }
6264
6264
  });
6265
6265
 
6266
- // ../../node_modules/.pnpm/graphql@16.6.0/node_modules/graphql/language/printLocation.js
6266
+ // ../../node_modules/.pnpm/graphql@16.8.1/node_modules/graphql/language/printLocation.js
6267
6267
  var require_printLocation = __commonJS({
6268
- "../../node_modules/.pnpm/graphql@16.6.0/node_modules/graphql/language/printLocation.js"(exports) {
6268
+ "../../node_modules/.pnpm/graphql@16.8.1/node_modules/graphql/language/printLocation.js"(exports) {
6269
6269
  "use strict";
6270
6270
  Object.defineProperty(exports, "__esModule", {
6271
6271
  value: true
@@ -6321,9 +6321,9 @@
6321
6321
  }
6322
6322
  });
6323
6323
 
6324
- // ../../node_modules/.pnpm/graphql@16.6.0/node_modules/graphql/error/GraphQLError.js
6324
+ // ../../node_modules/.pnpm/graphql@16.8.1/node_modules/graphql/error/GraphQLError.js
6325
6325
  var require_GraphQLError = __commonJS({
6326
- "../../node_modules/.pnpm/graphql@16.6.0/node_modules/graphql/error/GraphQLError.js"(exports) {
6326
+ "../../node_modules/.pnpm/graphql@16.8.1/node_modules/graphql/error/GraphQLError.js"(exports) {
6327
6327
  "use strict";
6328
6328
  Object.defineProperty(exports, "__esModule", {
6329
6329
  value: true
@@ -6493,9 +6493,9 @@
6493
6493
  }
6494
6494
  });
6495
6495
 
6496
- // ../../node_modules/.pnpm/graphql@16.6.0/node_modules/graphql/error/syntaxError.js
6496
+ // ../../node_modules/.pnpm/graphql@16.8.1/node_modules/graphql/error/syntaxError.js
6497
6497
  var require_syntaxError = __commonJS({
6498
- "../../node_modules/.pnpm/graphql@16.6.0/node_modules/graphql/error/syntaxError.js"(exports) {
6498
+ "../../node_modules/.pnpm/graphql@16.8.1/node_modules/graphql/error/syntaxError.js"(exports) {
6499
6499
  "use strict";
6500
6500
  Object.defineProperty(exports, "__esModule", {
6501
6501
  value: true
@@ -6511,9 +6511,9 @@
6511
6511
  }
6512
6512
  });
6513
6513
 
6514
- // ../../node_modules/.pnpm/graphql@16.6.0/node_modules/graphql/language/ast.js
6514
+ // ../../node_modules/.pnpm/graphql@16.8.1/node_modules/graphql/language/ast.js
6515
6515
  var require_ast = __commonJS({
6516
- "../../node_modules/.pnpm/graphql@16.6.0/node_modules/graphql/language/ast.js"(exports) {
6516
+ "../../node_modules/.pnpm/graphql@16.8.1/node_modules/graphql/language/ast.js"(exports) {
6517
6517
  "use strict";
6518
6518
  Object.defineProperty(exports, "__esModule", {
6519
6519
  value: true
@@ -6695,9 +6695,9 @@
6695
6695
  }
6696
6696
  });
6697
6697
 
6698
- // ../../node_modules/.pnpm/graphql@16.6.0/node_modules/graphql/language/directiveLocation.js
6698
+ // ../../node_modules/.pnpm/graphql@16.8.1/node_modules/graphql/language/directiveLocation.js
6699
6699
  var require_directiveLocation = __commonJS({
6700
- "../../node_modules/.pnpm/graphql@16.6.0/node_modules/graphql/language/directiveLocation.js"(exports) {
6700
+ "../../node_modules/.pnpm/graphql@16.8.1/node_modules/graphql/language/directiveLocation.js"(exports) {
6701
6701
  "use strict";
6702
6702
  Object.defineProperty(exports, "__esModule", {
6703
6703
  value: true
@@ -6729,9 +6729,9 @@
6729
6729
  }
6730
6730
  });
6731
6731
 
6732
- // ../../node_modules/.pnpm/graphql@16.6.0/node_modules/graphql/language/kinds.js
6732
+ // ../../node_modules/.pnpm/graphql@16.8.1/node_modules/graphql/language/kinds.js
6733
6733
  var require_kinds = __commonJS({
6734
- "../../node_modules/.pnpm/graphql@16.6.0/node_modules/graphql/language/kinds.js"(exports) {
6734
+ "../../node_modules/.pnpm/graphql@16.8.1/node_modules/graphql/language/kinds.js"(exports) {
6735
6735
  "use strict";
6736
6736
  Object.defineProperty(exports, "__esModule", {
6737
6737
  value: true
@@ -6787,9 +6787,9 @@
6787
6787
  }
6788
6788
  });
6789
6789
 
6790
- // ../../node_modules/.pnpm/graphql@16.6.0/node_modules/graphql/language/characterClasses.js
6790
+ // ../../node_modules/.pnpm/graphql@16.8.1/node_modules/graphql/language/characterClasses.js
6791
6791
  var require_characterClasses = __commonJS({
6792
- "../../node_modules/.pnpm/graphql@16.6.0/node_modules/graphql/language/characterClasses.js"(exports) {
6792
+ "../../node_modules/.pnpm/graphql@16.8.1/node_modules/graphql/language/characterClasses.js"(exports) {
6793
6793
  "use strict";
6794
6794
  Object.defineProperty(exports, "__esModule", {
6795
6795
  value: true
@@ -6818,9 +6818,9 @@
6818
6818
  }
6819
6819
  });
6820
6820
 
6821
- // ../../node_modules/.pnpm/graphql@16.6.0/node_modules/graphql/language/blockString.js
6821
+ // ../../node_modules/.pnpm/graphql@16.8.1/node_modules/graphql/language/blockString.js
6822
6822
  var require_blockString = __commonJS({
6823
- "../../node_modules/.pnpm/graphql@16.6.0/node_modules/graphql/language/blockString.js"(exports) {
6823
+ "../../node_modules/.pnpm/graphql@16.8.1/node_modules/graphql/language/blockString.js"(exports) {
6824
6824
  "use strict";
6825
6825
  Object.defineProperty(exports, "__esModule", {
6826
6826
  value: true
@@ -6937,9 +6937,9 @@
6937
6937
  }
6938
6938
  });
6939
6939
 
6940
- // ../../node_modules/.pnpm/graphql@16.6.0/node_modules/graphql/language/tokenKind.js
6940
+ // ../../node_modules/.pnpm/graphql@16.8.1/node_modules/graphql/language/tokenKind.js
6941
6941
  var require_tokenKind = __commonJS({
6942
- "../../node_modules/.pnpm/graphql@16.6.0/node_modules/graphql/language/tokenKind.js"(exports) {
6942
+ "../../node_modules/.pnpm/graphql@16.8.1/node_modules/graphql/language/tokenKind.js"(exports) {
6943
6943
  "use strict";
6944
6944
  Object.defineProperty(exports, "__esModule", {
6945
6945
  value: true
@@ -6974,9 +6974,9 @@
6974
6974
  }
6975
6975
  });
6976
6976
 
6977
- // ../../node_modules/.pnpm/graphql@16.6.0/node_modules/graphql/language/lexer.js
6977
+ // ../../node_modules/.pnpm/graphql@16.8.1/node_modules/graphql/language/lexer.js
6978
6978
  var require_lexer = __commonJS({
6979
- "../../node_modules/.pnpm/graphql@16.6.0/node_modules/graphql/language/lexer.js"(exports) {
6979
+ "../../node_modules/.pnpm/graphql@16.8.1/node_modules/graphql/language/lexer.js"(exports) {
6980
6980
  "use strict";
6981
6981
  Object.defineProperty(exports, "__esModule", {
6982
6982
  value: true
@@ -7581,9 +7581,9 @@
7581
7581
  }
7582
7582
  });
7583
7583
 
7584
- // ../../node_modules/.pnpm/graphql@16.6.0/node_modules/graphql/jsutils/devAssert.js
7584
+ // ../../node_modules/.pnpm/graphql@16.8.1/node_modules/graphql/jsutils/devAssert.js
7585
7585
  var require_devAssert = __commonJS({
7586
- "../../node_modules/.pnpm/graphql@16.6.0/node_modules/graphql/jsutils/devAssert.js"(exports) {
7586
+ "../../node_modules/.pnpm/graphql@16.8.1/node_modules/graphql/jsutils/devAssert.js"(exports) {
7587
7587
  "use strict";
7588
7588
  Object.defineProperty(exports, "__esModule", {
7589
7589
  value: true
@@ -7598,9 +7598,9 @@
7598
7598
  }
7599
7599
  });
7600
7600
 
7601
- // ../../node_modules/.pnpm/graphql@16.6.0/node_modules/graphql/jsutils/inspect.js
7601
+ // ../../node_modules/.pnpm/graphql@16.8.1/node_modules/graphql/jsutils/inspect.js
7602
7602
  var require_inspect = __commonJS({
7603
- "../../node_modules/.pnpm/graphql@16.6.0/node_modules/graphql/jsutils/inspect.js"(exports) {
7603
+ "../../node_modules/.pnpm/graphql@16.8.1/node_modules/graphql/jsutils/inspect.js"(exports) {
7604
7604
  "use strict";
7605
7605
  Object.defineProperty(exports, "__esModule", {
7606
7606
  value: true
@@ -7690,9 +7690,9 @@
7690
7690
  }
7691
7691
  });
7692
7692
 
7693
- // ../../node_modules/.pnpm/graphql@16.6.0/node_modules/graphql/jsutils/instanceOf.js
7693
+ // ../../node_modules/.pnpm/graphql@16.8.1/node_modules/graphql/jsutils/instanceOf.js
7694
7694
  var require_instanceOf = __commonJS({
7695
- "../../node_modules/.pnpm/graphql@16.6.0/node_modules/graphql/jsutils/instanceOf.js"(exports) {
7695
+ "../../node_modules/.pnpm/graphql@16.8.1/node_modules/graphql/jsutils/instanceOf.js"(exports) {
7696
7696
  "use strict";
7697
7697
  Object.defineProperty(exports, "__esModule", {
7698
7698
  value: true
@@ -7702,8 +7702,7 @@
7702
7702
  var instanceOf4 = (
7703
7703
  /* c8 ignore next 6 */
7704
7704
  // FIXME: https://github.com/graphql/graphql-js/issues/2317
7705
- // eslint-disable-next-line no-undef
7706
- process.env.NODE_ENV === "production" ? function instanceOf5(value, constructor) {
7705
+ globalThis.process && globalThis.process.env.NODE_ENV === "production" ? function instanceOf5(value, constructor) {
7707
7706
  return value instanceof constructor;
7708
7707
  } : function instanceOf5(value, constructor) {
7709
7708
  if (value instanceof constructor) {
@@ -7739,9 +7738,9 @@ spurious results.`);
7739
7738
  }
7740
7739
  });
7741
7740
 
7742
- // ../../node_modules/.pnpm/graphql@16.6.0/node_modules/graphql/language/source.js
7741
+ // ../../node_modules/.pnpm/graphql@16.8.1/node_modules/graphql/language/source.js
7743
7742
  var require_source = __commonJS({
7744
- "../../node_modules/.pnpm/graphql@16.6.0/node_modules/graphql/language/source.js"(exports) {
7743
+ "../../node_modules/.pnpm/graphql@16.8.1/node_modules/graphql/language/source.js"(exports) {
7745
7744
  "use strict";
7746
7745
  Object.defineProperty(exports, "__esModule", {
7747
7746
  value: true
@@ -7783,9 +7782,9 @@ spurious results.`);
7783
7782
  }
7784
7783
  });
7785
7784
 
7786
- // ../../node_modules/.pnpm/graphql@16.6.0/node_modules/graphql/language/parser.js
7785
+ // ../../node_modules/.pnpm/graphql@16.8.1/node_modules/graphql/language/parser.js
7787
7786
  var require_parser = __commonJS({
7788
- "../../node_modules/.pnpm/graphql@16.6.0/node_modules/graphql/language/parser.js"(exports) {
7787
+ "../../node_modules/.pnpm/graphql@16.8.1/node_modules/graphql/language/parser.js"(exports) {
7789
7788
  "use strict";
7790
7789
  Object.defineProperty(exports, "__esModule", {
7791
7790
  value: true
@@ -9092,9 +9091,9 @@ spurious results.`);
9092
9091
  }
9093
9092
  });
9094
9093
 
9095
- // ../../node_modules/.pnpm/graphql@16.6.0/node_modules/graphql/language/printString.js
9094
+ // ../../node_modules/.pnpm/graphql@16.8.1/node_modules/graphql/language/printString.js
9096
9095
  var require_printString = __commonJS({
9097
- "../../node_modules/.pnpm/graphql@16.6.0/node_modules/graphql/language/printString.js"(exports) {
9096
+ "../../node_modules/.pnpm/graphql@16.8.1/node_modules/graphql/language/printString.js"(exports) {
9098
9097
  "use strict";
9099
9098
  Object.defineProperty(exports, "__esModule", {
9100
9099
  value: true
@@ -9277,9 +9276,9 @@ spurious results.`);
9277
9276
  }
9278
9277
  });
9279
9278
 
9280
- // ../../node_modules/.pnpm/graphql@16.6.0/node_modules/graphql/language/visitor.js
9279
+ // ../../node_modules/.pnpm/graphql@16.8.1/node_modules/graphql/language/visitor.js
9281
9280
  var require_visitor = __commonJS({
9282
- "../../node_modules/.pnpm/graphql@16.6.0/node_modules/graphql/language/visitor.js"(exports) {
9281
+ "../../node_modules/.pnpm/graphql@16.8.1/node_modules/graphql/language/visitor.js"(exports) {
9283
9282
  "use strict";
9284
9283
  Object.defineProperty(exports, "__esModule", {
9285
9284
  value: true
@@ -9488,9 +9487,9 @@ spurious results.`);
9488
9487
  }
9489
9488
  });
9490
9489
 
9491
- // ../../node_modules/.pnpm/graphql@16.6.0/node_modules/graphql/language/printer.js
9490
+ // ../../node_modules/.pnpm/graphql@16.8.1/node_modules/graphql/language/printer.js
9492
9491
  var require_printer = __commonJS({
9493
- "../../node_modules/.pnpm/graphql@16.6.0/node_modules/graphql/language/printer.js"(exports) {
9492
+ "../../node_modules/.pnpm/graphql@16.8.1/node_modules/graphql/language/printer.js"(exports) {
9494
9493
  "use strict";
9495
9494
  Object.defineProperty(exports, "__esModule", {
9496
9495
  value: true
@@ -19249,9 +19248,9 @@ spurious results.`);
19249
19248
  }
19250
19249
  });
19251
19250
 
19252
- // ../../node_modules/.pnpm/graphql-request@5.0.0_graphql@16.6.0/node_modules/graphql-request/dist/defaultJsonSerializer.js
19251
+ // ../../node_modules/.pnpm/graphql-request@5.0.0_graphql@16.8.1/node_modules/graphql-request/dist/defaultJsonSerializer.js
19253
19252
  var require_defaultJsonSerializer = __commonJS({
19254
- "../../node_modules/.pnpm/graphql-request@5.0.0_graphql@16.6.0/node_modules/graphql-request/dist/defaultJsonSerializer.js"(exports) {
19253
+ "../../node_modules/.pnpm/graphql-request@5.0.0_graphql@16.8.1/node_modules/graphql-request/dist/defaultJsonSerializer.js"(exports) {
19255
19254
  "use strict";
19256
19255
  Object.defineProperty(exports, "__esModule", { value: true });
19257
19256
  exports.defaultJsonSerializer = void 0;
@@ -19262,9 +19261,9 @@ spurious results.`);
19262
19261
  }
19263
19262
  });
19264
19263
 
19265
- // ../../node_modules/.pnpm/graphql-request@5.0.0_graphql@16.6.0/node_modules/graphql-request/dist/createRequestBody.js
19264
+ // ../../node_modules/.pnpm/graphql-request@5.0.0_graphql@16.8.1/node_modules/graphql-request/dist/createRequestBody.js
19266
19265
  var require_createRequestBody = __commonJS({
19267
- "../../node_modules/.pnpm/graphql-request@5.0.0_graphql@16.6.0/node_modules/graphql-request/dist/createRequestBody.js"(exports) {
19266
+ "../../node_modules/.pnpm/graphql-request@5.0.0_graphql@16.8.1/node_modules/graphql-request/dist/createRequestBody.js"(exports) {
19268
19267
  "use strict";
19269
19268
  var __importDefault = exports && exports.__importDefault || function(mod2) {
19270
19269
  return mod2 && mod2.__esModule ? mod2 : { "default": mod2 };
@@ -19313,9 +19312,9 @@ spurious results.`);
19313
19312
  }
19314
19313
  });
19315
19314
 
19316
- // ../../node_modules/.pnpm/graphql-request@5.0.0_graphql@16.6.0/node_modules/graphql-request/dist/parseArgs.js
19315
+ // ../../node_modules/.pnpm/graphql-request@5.0.0_graphql@16.8.1/node_modules/graphql-request/dist/parseArgs.js
19317
19316
  var require_parseArgs = __commonJS({
19318
- "../../node_modules/.pnpm/graphql-request@5.0.0_graphql@16.6.0/node_modules/graphql-request/dist/parseArgs.js"(exports) {
19317
+ "../../node_modules/.pnpm/graphql-request@5.0.0_graphql@16.8.1/node_modules/graphql-request/dist/parseArgs.js"(exports) {
19319
19318
  "use strict";
19320
19319
  Object.defineProperty(exports, "__esModule", { value: true });
19321
19320
  exports.parseBatchRequestsExtendedArgs = exports.parseRawRequestExtendedArgs = exports.parseRequestExtendedArgs = exports.parseBatchRequestArgs = exports.parseRawRequestArgs = exports.parseRequestArgs = void 0;
@@ -19377,9 +19376,9 @@ spurious results.`);
19377
19376
  }
19378
19377
  });
19379
19378
 
19380
- // ../../node_modules/.pnpm/graphql-request@5.0.0_graphql@16.6.0/node_modules/graphql-request/dist/types.js
19379
+ // ../../node_modules/.pnpm/graphql-request@5.0.0_graphql@16.8.1/node_modules/graphql-request/dist/types.js
19381
19380
  var require_types = __commonJS({
19382
- "../../node_modules/.pnpm/graphql-request@5.0.0_graphql@16.6.0/node_modules/graphql-request/dist/types.js"(exports) {
19381
+ "../../node_modules/.pnpm/graphql-request@5.0.0_graphql@16.8.1/node_modules/graphql-request/dist/types.js"(exports) {
19383
19382
  "use strict";
19384
19383
  var __extends = exports && exports.__extends || function() {
19385
19384
  var extendStatics = function(d, b) {
@@ -19437,9 +19436,9 @@ spurious results.`);
19437
19436
  }
19438
19437
  });
19439
19438
 
19440
- // ../../node_modules/.pnpm/graphql-request@5.0.0_graphql@16.6.0/node_modules/graphql-request/dist/graphql-ws.js
19439
+ // ../../node_modules/.pnpm/graphql-request@5.0.0_graphql@16.8.1/node_modules/graphql-request/dist/graphql-ws.js
19441
19440
  var require_graphql_ws = __commonJS({
19442
- "../../node_modules/.pnpm/graphql-request@5.0.0_graphql@16.6.0/node_modules/graphql-request/dist/graphql-ws.js"(exports) {
19441
+ "../../node_modules/.pnpm/graphql-request@5.0.0_graphql@16.8.1/node_modules/graphql-request/dist/graphql-ws.js"(exports) {
19443
19442
  "use strict";
19444
19443
  var __assign2 = exports && exports.__assign || function() {
19445
19444
  __assign2 = Object.assign || function(t) {
@@ -19809,9 +19808,9 @@ spurious results.`);
19809
19808
  }
19810
19809
  });
19811
19810
 
19812
- // ../../node_modules/.pnpm/graphql-request@5.0.0_graphql@16.6.0/node_modules/graphql-request/dist/index.js
19811
+ // ../../node_modules/.pnpm/graphql-request@5.0.0_graphql@16.8.1/node_modules/graphql-request/dist/index.js
19813
19812
  var require_dist2 = __commonJS({
19814
- "../../node_modules/.pnpm/graphql-request@5.0.0_graphql@16.6.0/node_modules/graphql-request/dist/index.js"(exports) {
19813
+ "../../node_modules/.pnpm/graphql-request@5.0.0_graphql@16.8.1/node_modules/graphql-request/dist/index.js"(exports) {
19815
19814
  "use strict";
19816
19815
  var __assign2 = exports && exports.__assign || function() {
19817
19816
  __assign2 = Object.assign || function(t) {
@@ -31914,8 +31913,8 @@ spurious results.`);
31914
31913
  // ../versions/dist/index.mjs
31915
31914
  function getBuiltinVersions() {
31916
31915
  return {
31917
- FORC: "0.51.1",
31918
- FUEL_CORE: "0.24.2",
31916
+ FORC: "0.49.3",
31917
+ FUEL_CORE: "0.22.1",
31919
31918
  FUELS: "0.81.0"
31920
31919
  };
31921
31920
  }
@@ -32193,753 +32192,521 @@ This unreleased fuel-core build may include features and updates not yet support
32193
32192
  __publicField3(DateTime, "TAI64_NULL", "");
32194
32193
  var chainConfig_default = {
32195
32194
  chain_name: "local_testnet",
32196
- consensus_parameters: {
32197
- V1: {
32198
- tx_params: {
32199
- V1: {
32200
- max_inputs: 255,
32201
- max_outputs: 255,
32202
- max_witnesses: 255,
32203
- max_gas_per_tx: 3e7,
32204
- max_size: 112640
32205
- }
32206
- },
32207
- predicate_params: {
32208
- V1: {
32209
- max_predicate_length: 102400,
32210
- max_predicate_data_length: 102400,
32211
- max_message_data_length: 102400,
32212
- max_gas_per_predicate: 3e7
32213
- }
32214
- },
32215
- script_params: {
32216
- V1: {
32217
- max_script_length: 102400,
32218
- max_script_data_length: 102400
32219
- }
32220
- },
32221
- contract_params: {
32222
- V1: {
32223
- contract_max_size: 102400,
32224
- max_storage_slots: 1760
32225
- }
32226
- },
32227
- fee_params: {
32228
- V1: {
32229
- gas_price_factor: 92,
32230
- gas_per_byte: 63
32231
- }
32232
- },
32233
- chain_id: 0,
32234
- gas_costs: {
32235
- V1: {
32236
- add: 2,
32237
- addi: 2,
32238
- aloc: 1,
32239
- and: 2,
32240
- andi: 2,
32241
- bal: 366,
32242
- bhei: 2,
32243
- bhsh: 2,
32244
- burn: 33949,
32245
- cb: 2,
32246
- cfei: 2,
32247
- cfsi: 2,
32248
- div: 2,
32249
- divi: 2,
32250
- eck1: 3347,
32251
- ecr1: 46165,
32252
- ed19: 4210,
32253
- eq: 2,
32254
- exp: 2,
32255
- expi: 2,
32256
- flag: 1,
32257
- gm: 2,
32258
- gt: 2,
32259
- gtf: 16,
32260
- ji: 2,
32261
- jmp: 2,
32262
- jne: 2,
32263
- jnei: 2,
32264
- jnzi: 2,
32265
- jmpf: 2,
32266
- jmpb: 2,
32267
- jnzf: 2,
32268
- jnzb: 2,
32269
- jnef: 2,
32270
- jneb: 2,
32271
- lb: 2,
32272
- log: 754,
32273
- lt: 2,
32274
- lw: 2,
32275
- mint: 35718,
32276
- mlog: 2,
32277
- mod: 2,
32278
- modi: 2,
32279
- move: 2,
32280
- movi: 2,
32281
- mroo: 5,
32282
- mul: 2,
32283
- muli: 2,
32284
- mldv: 4,
32285
- noop: 1,
32286
- not: 2,
32287
- or: 2,
32288
- ori: 2,
32289
- poph: 3,
32290
- popl: 3,
32291
- pshh: 4,
32292
- pshl: 4,
32293
- ret_contract: 733,
32294
- rvrt_contract: 722,
32295
- sb: 2,
32296
- sll: 2,
32297
- slli: 2,
32298
- srl: 2,
32299
- srli: 2,
32300
- srw: 253,
32301
- sub: 2,
32302
- subi: 2,
32303
- sw: 2,
32304
- sww: 29053,
32305
- time: 79,
32306
- tr: 46242,
32307
- tro: 33251,
32308
- wdcm: 3,
32309
- wqcm: 3,
32310
- wdop: 3,
32311
- wqop: 3,
32312
- wdml: 3,
32313
- wqml: 4,
32314
- wddv: 5,
32315
- wqdv: 7,
32316
- wdmd: 11,
32317
- wqmd: 18,
32318
- wdam: 9,
32319
- wqam: 12,
32320
- wdmm: 11,
32321
- wqmm: 11,
32322
- xor: 2,
32323
- xori: 2,
32324
- call: {
32325
- LightOperation: {
32326
- base: 21687,
32327
- units_per_gas: 4
32328
- }
32329
- },
32330
- ccp: {
32331
- LightOperation: {
32332
- base: 59,
32333
- units_per_gas: 20
32334
- }
32335
- },
32336
- croo: {
32337
- LightOperation: {
32338
- base: 1,
32339
- units_per_gas: 1
32340
- }
32341
- },
32342
- csiz: {
32343
- LightOperation: {
32344
- base: 59,
32345
- units_per_gas: 195
32346
- }
32347
- },
32348
- k256: {
32349
- LightOperation: {
32350
- base: 282,
32351
- units_per_gas: 3
32352
- }
32353
- },
32354
- ldc: {
32355
- LightOperation: {
32356
- base: 45,
32357
- units_per_gas: 65
32358
- }
32359
- },
32360
- logd: {
32361
- LightOperation: {
32362
- base: 1134,
32363
- units_per_gas: 2
32364
- }
32365
- },
32366
- mcl: {
32367
- LightOperation: {
32368
- base: 3,
32369
- units_per_gas: 523
32370
- }
32371
- },
32372
- mcli: {
32373
- LightOperation: {
32374
- base: 3,
32375
- units_per_gas: 526
32376
- }
32377
- },
32378
- mcp: {
32379
- LightOperation: {
32380
- base: 3,
32381
- units_per_gas: 448
32382
- }
32383
- },
32384
- mcpi: {
32385
- LightOperation: {
32386
- base: 7,
32387
- units_per_gas: 585
32388
- }
32389
- },
32390
- meq: {
32391
- LightOperation: {
32392
- base: 11,
32393
- units_per_gas: 1097
32394
- }
32395
- },
32396
- retd_contract: {
32397
- LightOperation: {
32398
- base: 1086,
32399
- units_per_gas: 2
32400
- }
32401
- },
32402
- s256: {
32403
- LightOperation: {
32404
- base: 45,
32405
- units_per_gas: 3
32406
- }
32407
- },
32408
- scwq: {
32409
- HeavyOperation: {
32410
- base: 30375,
32411
- gas_per_unit: 28628
32412
- }
32413
- },
32414
- smo: {
32415
- LightOperation: {
32416
- base: 64196,
32417
- units_per_gas: 1
32418
- }
32419
- },
32420
- srwq: {
32421
- HeavyOperation: {
32422
- base: 262,
32423
- gas_per_unit: 249
32424
- }
32425
- },
32426
- swwq: {
32427
- HeavyOperation: {
32428
- base: 28484,
32429
- gas_per_unit: 26613
32430
- }
32431
- },
32432
- contract_root: {
32433
- LightOperation: {
32434
- base: 45,
32435
- units_per_gas: 1
32436
- }
32437
- },
32438
- state_root: {
32439
- HeavyOperation: {
32440
- base: 350,
32441
- gas_per_unit: 176
32442
- }
32443
- },
32444
- new_storage_per_byte: 63,
32445
- vm_initialization: {
32446
- LightOperation: {
32447
- base: 1645,
32448
- units_per_gas: 14
32449
- }
32450
- }
32451
- }
32195
+ block_gas_limit: 5e9,
32196
+ initial_state: {
32197
+ coins: [
32198
+ {
32199
+ owner: "0x94ffcc53b892684acefaebc8a3d4a595e528a8cf664eeb3ef36f1020b0809d0d",
32200
+ amount: "0xFFFFFFFFFFFFFFFF",
32201
+ asset_id: "0x0000000000000000000000000000000000000000000000000000000000000000"
32452
32202
  },
32453
- base_asset_id: "0000000000000000000000000000000000000000000000000000000000000000",
32454
- block_gas_limit: 3e7,
32455
- privileged_address: "0000000000000000000000000000000000000000000000000000000000000000"
32456
- }
32203
+ {
32204
+ owner: "0x09c0b2d1a486c439a87bcba6b46a7a1a23f3897cc83a94521a96da5c23bc58db",
32205
+ amount: "0xFFFFFFFFFFFFFFFF",
32206
+ asset_id: "0x0000000000000000000000000000000000000000000000000000000000000000"
32207
+ },
32208
+ {
32209
+ owner: "0x09c0b2d1a486c439a87bcba6b46a7a1a23f3897cc83a94521a96da5c23bc58db",
32210
+ amount: "0xFFFFFFFFFFFFFFFF",
32211
+ asset_id: "0x0101010101010101010101010101010101010101010101010101010101010101"
32212
+ },
32213
+ {
32214
+ owner: "0x09c0b2d1a486c439a87bcba6b46a7a1a23f3897cc83a94521a96da5c23bc58db",
32215
+ amount: "0xFFFFFFFFFFFFFFFF",
32216
+ asset_id: "0x0202020202020202020202020202020202020202020202020202020202020202"
32217
+ },
32218
+ {
32219
+ owner: "0x5d99ee966b42cd8fc7bdd1364b389153a9e78b42b7d4a691470674e817888d4e",
32220
+ amount: "0xFFFFFFFFFFFFFFFF",
32221
+ asset_id: "0x0000000000000000000000000000000000000000000000000000000000000000"
32222
+ },
32223
+ {
32224
+ owner: "0x5d99ee966b42cd8fc7bdd1364b389153a9e78b42b7d4a691470674e817888d4e",
32225
+ amount: "0xFFFFFFFFFFFFFFFF",
32226
+ asset_id: "0x0101010101010101010101010101010101010101010101010101010101010101"
32227
+ },
32228
+ {
32229
+ owner: "0x5d99ee966b42cd8fc7bdd1364b389153a9e78b42b7d4a691470674e817888d4e",
32230
+ amount: "0xFFFFFFFFFFFFFFFF",
32231
+ asset_id: "0x0202020202020202020202020202020202020202020202020202020202020202"
32232
+ },
32233
+ {
32234
+ owner: "0xbdaad6a89e073e177895b3e5a9ccd15806749eda134a6438dae32fc5b6601f3f",
32235
+ amount: "0xFFFFFFFFFFFFFFFF",
32236
+ asset_id: "0x0000000000000000000000000000000000000000000000000000000000000000"
32237
+ },
32238
+ {
32239
+ owner: "0xbdaad6a89e073e177895b3e5a9ccd15806749eda134a6438dae32fc5b6601f3f",
32240
+ amount: "0xFFFFFFFFFFFFFFFF",
32241
+ asset_id: "0x0101010101010101010101010101010101010101010101010101010101010101"
32242
+ },
32243
+ {
32244
+ owner: "0xbdaad6a89e073e177895b3e5a9ccd15806749eda134a6438dae32fc5b6601f3f",
32245
+ amount: "0xFFFFFFFFFFFFFFFF",
32246
+ asset_id: "0x0202020202020202020202020202020202020202020202020202020202020202"
32247
+ },
32248
+ {
32249
+ owner: "0x95a7aa6cc32743f8706c40ef49a7423b47da763bb4bbc055b1f07254dc729036",
32250
+ amount: "0xFFFFFFFFFFFFFFFF",
32251
+ asset_id: "0x0000000000000000000000000000000000000000000000000000000000000000"
32252
+ },
32253
+ {
32254
+ owner: "0x95a7aa6cc32743f8706c40ef49a7423b47da763bb4bbc055b1f07254dc729036",
32255
+ amount: "0xFFFFFFFFFFFFFFFF",
32256
+ asset_id: "0x0101010101010101010101010101010101010101010101010101010101010101"
32257
+ },
32258
+ {
32259
+ owner: "0x95a7aa6cc32743f8706c40ef49a7423b47da763bb4bbc055b1f07254dc729036",
32260
+ amount: "0xFFFFFFFFFFFFFFFF",
32261
+ asset_id: "0x0202020202020202020202020202020202020202020202020202020202020202"
32262
+ },
32263
+ {
32264
+ owner: "0xcee104acd38b940c8f1c62c6d7ea00a0ad2241d6dee0509a4bf27297508870d3",
32265
+ amount: "0xFFFFFFFFFFFFFFFF",
32266
+ asset_id: "0x0000000000000000000000000000000000000000000000000000000000000000"
32267
+ },
32268
+ {
32269
+ owner: "0xcee104acd38b940c8f1c62c6d7ea00a0ad2241d6dee0509a4bf27297508870d3",
32270
+ amount: "0xFFFFFFFFFFFFFFFF",
32271
+ asset_id: "0x0101010101010101010101010101010101010101010101010101010101010101"
32272
+ },
32273
+ {
32274
+ owner: "0xcee104acd38b940c8f1c62c6d7ea00a0ad2241d6dee0509a4bf27297508870d3",
32275
+ amount: "0xFFFFFFFFFFFFFFFF",
32276
+ asset_id: "0x0202020202020202020202020202020202020202020202020202020202020202"
32277
+ },
32278
+ {
32279
+ owner: "0x7e3626e306588eba79cafab73f0709e55ab8f4bdfe8c8b75034a430fc56ece89",
32280
+ amount: "0xFFFFFFFFFFFFFFFF",
32281
+ asset_id: "0x0000000000000000000000000000000000000000000000000000000000000000"
32282
+ },
32283
+ {
32284
+ owner: "0x7e3626e306588eba79cafab73f0709e55ab8f4bdfe8c8b75034a430fc56ece89",
32285
+ amount: "0xFFFFFFFFFFFFFFFF",
32286
+ asset_id: "0x0101010101010101010101010101010101010101010101010101010101010101"
32287
+ },
32288
+ {
32289
+ owner: "0x7e3626e306588eba79cafab73f0709e55ab8f4bdfe8c8b75034a430fc56ece89",
32290
+ amount: "0xFFFFFFFFFFFFFFFF",
32291
+ asset_id: "0x0202020202020202020202020202020202020202020202020202020202020202"
32292
+ },
32293
+ {
32294
+ owner: "0x1c31df52b6df56407dd95f83082e8beb9cfc9532ac111d5bd8491651d95ba775",
32295
+ amount: "0xFFFFFFFFFFFFFFFF",
32296
+ asset_id: "0x0000000000000000000000000000000000000000000000000000000000000000"
32297
+ },
32298
+ {
32299
+ owner: "0x1c31df52b6df56407dd95f83082e8beb9cfc9532ac111d5bd8491651d95ba775",
32300
+ amount: "0xFFFFFFFFFFFFFFFF",
32301
+ asset_id: "0x0101010101010101010101010101010101010101010101010101010101010101"
32302
+ },
32303
+ {
32304
+ owner: "0x1c31df52b6df56407dd95f83082e8beb9cfc9532ac111d5bd8491651d95ba775",
32305
+ amount: "0xFFFFFFFFFFFFFFFF",
32306
+ asset_id: "0x0202020202020202020202020202020202020202020202020202020202020202"
32307
+ },
32308
+ {
32309
+ owner: "0x09dd7a49174d6fcc9f4c6f7942c18060a935ddd03ee69b594189b8c3581276ea",
32310
+ amount: "0xFFFFFFFFFFFFFFFF",
32311
+ asset_id: "0x0000000000000000000000000000000000000000000000000000000000000000"
32312
+ },
32313
+ {
32314
+ owner: "0x09dd7a49174d6fcc9f4c6f7942c18060a935ddd03ee69b594189b8c3581276ea",
32315
+ amount: "0xFFFFFFFFFFFFFFFF",
32316
+ asset_id: "0x0101010101010101010101010101010101010101010101010101010101010101"
32317
+ },
32318
+ {
32319
+ owner: "0x09dd7a49174d6fcc9f4c6f7942c18060a935ddd03ee69b594189b8c3581276ea",
32320
+ amount: "0xFFFFFFFFFFFFFFFF",
32321
+ asset_id: "0x0202020202020202020202020202020202020202020202020202020202020202"
32322
+ },
32323
+ {
32324
+ owner: "0x86604282dc604481b809845be49667607c470644f6822fc01eb0d22f167e08cf",
32325
+ amount: "0xFFFFFFFFFFFFFFFF",
32326
+ asset_id: "0x0000000000000000000000000000000000000000000000000000000000000000"
32327
+ },
32328
+ {
32329
+ owner: "0x86604282dc604481b809845be49667607c470644f6822fc01eb0d22f167e08cf",
32330
+ amount: "0xFFFFFFFFFFFFFFFF",
32331
+ asset_id: "0x0101010101010101010101010101010101010101010101010101010101010101"
32332
+ },
32333
+ {
32334
+ owner: "0x86604282dc604481b809845be49667607c470644f6822fc01eb0d22f167e08cf",
32335
+ amount: "0xFFFFFFFFFFFFFFFF",
32336
+ asset_id: "0x0202020202020202020202020202020202020202020202020202020202020202"
32337
+ },
32338
+ {
32339
+ owner: "0xbca334a06d19db5041c78fe2f465b07be5bec828f38b7796b2877e7d1542c950",
32340
+ amount: "0xFFFFFFFFFFFFFFFF",
32341
+ asset_id: "0x0000000000000000000000000000000000000000000000000000000000000000"
32342
+ },
32343
+ {
32344
+ owner: "0xbca334a06d19db5041c78fe2f465b07be5bec828f38b7796b2877e7d1542c950",
32345
+ amount: "0xFFFFFFFFFFFFFFFF",
32346
+ asset_id: "0x0101010101010101010101010101010101010101010101010101010101010101"
32347
+ },
32348
+ {
32349
+ owner: "0xbca334a06d19db5041c78fe2f465b07be5bec828f38b7796b2877e7d1542c950",
32350
+ amount: "0xFFFFFFFFFFFFFFFF",
32351
+ asset_id: "0x0202020202020202020202020202020202020202020202020202020202020202"
32352
+ },
32353
+ {
32354
+ owner: "0xbd9a1dc8d3ec3521c43f6c2c01611b4d0204c7610204ff0178488c8738a30bd2",
32355
+ amount: "0xFFFFFFFFFFFFFFFF",
32356
+ asset_id: "0x0000000000000000000000000000000000000000000000000000000000000000"
32357
+ },
32358
+ {
32359
+ owner: "0xbd9a1dc8d3ec3521c43f6c2c01611b4d0204c7610204ff0178488c8738a30bd2",
32360
+ amount: "0xFFFFFFFFFFFFFFFF",
32361
+ asset_id: "0x0101010101010101010101010101010101010101010101010101010101010101"
32362
+ },
32363
+ {
32364
+ owner: "0xbd9a1dc8d3ec3521c43f6c2c01611b4d0204c7610204ff0178488c8738a30bd2",
32365
+ amount: "0xFFFFFFFFFFFFFFFF",
32366
+ asset_id: "0x0202020202020202020202020202020202020202020202020202020202020202"
32367
+ },
32368
+ {
32369
+ owner: "0xb32197cf75efe05bf453c26178139f09b391582065549c1422bc92555ecffb64",
32370
+ amount: "0xFFFFFFFFFFFFFFFF",
32371
+ asset_id: "0x0000000000000000000000000000000000000000000000000000000000000000"
32372
+ },
32373
+ {
32374
+ owner: "0xb32197cf75efe05bf453c26178139f09b391582065549c1422bc92555ecffb64",
32375
+ amount: "0xFFFFFFFFFFFFFFFF",
32376
+ asset_id: "0x0101010101010101010101010101010101010101010101010101010101010101"
32377
+ },
32378
+ {
32379
+ owner: "0xb32197cf75efe05bf453c26178139f09b391582065549c1422bc92555ecffb64",
32380
+ amount: "0xFFFFFFFFFFFFFFFF",
32381
+ asset_id: "0x0202020202020202020202020202020202020202020202020202020202020202"
32382
+ },
32383
+ {
32384
+ owner: "0x3b24509ed4ab3c7959f5c9391c1445c59290cdb5f13d6f780922f376b7029f30",
32385
+ amount: "0xFFFFFFFFFFFFFFFF",
32386
+ asset_id: "0x0000000000000000000000000000000000000000000000000000000000000000"
32387
+ },
32388
+ {
32389
+ owner: "0x3b24509ed4ab3c7959f5c9391c1445c59290cdb5f13d6f780922f376b7029f30",
32390
+ amount: "0xFFFFFFFFFFFFFFFF",
32391
+ asset_id: "0x0101010101010101010101010101010101010101010101010101010101010101"
32392
+ },
32393
+ {
32394
+ owner: "0x3b24509ed4ab3c7959f5c9391c1445c59290cdb5f13d6f780922f376b7029f30",
32395
+ amount: "0xFFFFFFFFFFFFFFFF",
32396
+ asset_id: "0x0202020202020202020202020202020202020202020202020202020202020202"
32397
+ },
32398
+ {
32399
+ owner: "0x77c6f40b7da70d885f68efaad7c661327482a63ea10dcb4271de819438254ae1",
32400
+ amount: "0xFFFFFFFFFFFFFFFF",
32401
+ asset_id: "0x0000000000000000000000000000000000000000000000000000000000000000"
32402
+ },
32403
+ {
32404
+ owner: "0x77c6f40b7da70d885f68efaad7c661327482a63ea10dcb4271de819438254ae1",
32405
+ amount: "0xFFFFFFFFFFFFFFFF",
32406
+ asset_id: "0x0101010101010101010101010101010101010101010101010101010101010101"
32407
+ },
32408
+ {
32409
+ owner: "0x77c6f40b7da70d885f68efaad7c661327482a63ea10dcb4271de819438254ae1",
32410
+ amount: "0xFFFFFFFFFFFFFFFF",
32411
+ asset_id: "0x0202020202020202020202020202020202020202020202020202020202020202"
32412
+ },
32413
+ {
32414
+ owner: "0x6a2c4691c547c43924650dbd30620b184b5fe3fb6dbe5c4446110b08f6f405bf",
32415
+ amount: "0xFFFFFFFFFFFFFFFF",
32416
+ asset_id: "0x0000000000000000000000000000000000000000000000000000000000000000"
32417
+ },
32418
+ {
32419
+ owner: "0x6a2c4691c547c43924650dbd30620b184b5fe3fb6dbe5c4446110b08f6f405bf",
32420
+ amount: "0xFFFFFFFFFFFFFFFF",
32421
+ asset_id: "0x0101010101010101010101010101010101010101010101010101010101010101"
32422
+ },
32423
+ {
32424
+ owner: "0x6a2c4691c547c43924650dbd30620b184b5fe3fb6dbe5c4446110b08f6f405bf",
32425
+ amount: "0xFFFFFFFFFFFFFFFF",
32426
+ asset_id: "0x0202020202020202020202020202020202020202020202020202020202020202"
32427
+ },
32428
+ {
32429
+ owner: "0x49075a7538e2c88ebe1926ce4d898198a2a4e790d14512943a9864bc536b3c82",
32430
+ amount: "0xFFFFFFFFFFFFFFFF",
32431
+ asset_id: "0x0000000000000000000000000000000000000000000000000000000000000000"
32432
+ },
32433
+ {
32434
+ owner: "0x49075a7538e2c88ebe1926ce4d898198a2a4e790d14512943a9864bc536b3c82",
32435
+ amount: "0xFFFFFFFFFFFFFFFF",
32436
+ asset_id: "0x0101010101010101010101010101010101010101010101010101010101010101"
32437
+ },
32438
+ {
32439
+ owner: "0x49075a7538e2c88ebe1926ce4d898198a2a4e790d14512943a9864bc536b3c82",
32440
+ amount: "0xFFFFFFFFFFFFFFFF",
32441
+ asset_id: "0x0202020202020202020202020202020202020202020202020202020202020202"
32442
+ }
32443
+ ],
32444
+ messages: [
32445
+ {
32446
+ sender: "0xc43454aa38dd91f88109a4b7aef5efb96ce34e3f24992fe0f81d233ca686f80f",
32447
+ recipient: "0x69a2b736b60159b43bb8a4f98c0589f6da5fa3a3d101e8e269c499eb942753ba",
32448
+ nonce: "0101010101010101010101010101010101010101010101010101010101010101",
32449
+ amount: "0x000000000000FFFF",
32450
+ data: "",
32451
+ da_height: "0x00"
32452
+ },
32453
+ {
32454
+ sender: "0x69a2b736b60159b43bb8a4f98c0589f6da5fa3a3d101e8e269c499eb942753ba",
32455
+ recipient: "0xc43454aa38dd91f88109a4b7aef5efb96ce34e3f24992fe0f81d233ca686f80f",
32456
+ nonce: "0e1ef2963832068b0e1ef2963832068b0e1ef2963832068b0e1ef2963832068b",
32457
+ amount: "0xb04f3c08f59b309e",
32458
+ data: "",
32459
+ da_height: "0x00"
32460
+ }
32461
+ ]
32457
32462
  },
32458
- consensus: {
32459
- PoA: {
32460
- signing_key: "0x94ffcc53b892684acefaebc8a3d4a595e528a8cf664eeb3ef36f1020b0809d0d"
32461
- }
32462
- }
32463
- };
32464
- var metadata_default = {
32465
- chain_config: "chainConfig.json",
32466
- table_encoding: {
32467
- Json: {
32468
- filepath: "stateConfig.json"
32469
- }
32470
- }
32471
- };
32472
- var stateConfig_default = {
32473
- coins: [
32474
- {
32475
- tx_id: "0x260eabfd50937e92939fd92687e9302a72e91c5065f64f853f2ccbe02396fe09d665",
32476
- output_index: 0,
32477
- tx_pointer_block_height: 0,
32478
- tx_pointer_tx_idx: 0,
32479
- owner: "0x94ffcc53b892684acefaebc8a3d4a595e528a8cf664eeb3ef36f1020b0809d0d",
32480
- amount: 18446744073709552e3,
32481
- asset_id: "0x0000000000000000000000000000000000000000000000000000000000000000"
32482
- },
32483
- {
32484
- tx_id: "0x2a757c2317236f7883ac9bbbf7d402f034e0b725c544ef1c8725b1d2bd960f8c690f",
32485
- output_index: 0,
32486
- tx_pointer_block_height: 0,
32487
- tx_pointer_tx_idx: 0,
32488
- owner: "0x09c0b2d1a486c439a87bcba6b46a7a1a23f3897cc83a94521a96da5c23bc58db",
32489
- amount: 18446744073709552e3,
32490
- asset_id: "0x0000000000000000000000000000000000000000000000000000000000000000"
32491
- },
32492
- {
32493
- tx_id: "0x634ef6cda00bac63992bbde80c6d694d484d58025a5ca0c9c848f0d35a5a3eee74b2",
32494
- output_index: 0,
32495
- tx_pointer_block_height: 0,
32496
- tx_pointer_tx_idx: 0,
32497
- owner: "0x09c0b2d1a486c439a87bcba6b46a7a1a23f3897cc83a94521a96da5c23bc58db",
32498
- amount: 18446744073709552e3,
32499
- asset_id: "0x0101010101010101010101010101010101010101010101010101010101010101"
32500
- },
32501
- {
32502
- tx_id: "0xd3543bb1da137a7987a96a1bb71681fdd195ff25318c0d4a923aa30eb27ffa80bc7b",
32503
- output_index: 0,
32504
- tx_pointer_block_height: 0,
32505
- tx_pointer_tx_idx: 0,
32506
- owner: "0x09c0b2d1a486c439a87bcba6b46a7a1a23f3897cc83a94521a96da5c23bc58db",
32507
- amount: 18446744073709552e3,
32508
- asset_id: "0x0202020202020202020202020202020202020202020202020202020202020202"
32509
- },
32510
- {
32511
- tx_id: "0xa4d42cbb02adb32f5f3a9eab33a0ee7bdab8910ad9f615dfc86a7bb9e49a732bc58c",
32512
- output_index: 0,
32513
- tx_pointer_block_height: 0,
32514
- tx_pointer_tx_idx: 0,
32515
- owner: "0x5d99ee966b42cd8fc7bdd1364b389153a9e78b42b7d4a691470674e817888d4e",
32516
- amount: 18446744073709552e3,
32517
- asset_id: "0x0000000000000000000000000000000000000000000000000000000000000000"
32518
- },
32519
- {
32520
- tx_id: "0xc197cb09b1d89a7862b238e9500631bd43f291aadb7ff55c8129335349634e9fde3f",
32521
- output_index: 0,
32522
- tx_pointer_block_height: 0,
32523
- tx_pointer_tx_idx: 0,
32524
- owner: "0x5d99ee966b42cd8fc7bdd1364b389153a9e78b42b7d4a691470674e817888d4e",
32525
- amount: 18446744073709552e3,
32526
- asset_id: "0x0101010101010101010101010101010101010101010101010101010101010101"
32527
- },
32528
- {
32529
- tx_id: "0x4c4fc2451b9a9b16c520c1b89ec8968ce46823dd0396d84f7e3155861352fdce12c5",
32530
- output_index: 0,
32531
- tx_pointer_block_height: 0,
32532
- tx_pointer_tx_idx: 0,
32533
- owner: "0x5d99ee966b42cd8fc7bdd1364b389153a9e78b42b7d4a691470674e817888d4e",
32534
- amount: 18446744073709552e3,
32535
- asset_id: "0x0202020202020202020202020202020202020202020202020202020202020202"
32536
- },
32537
- {
32538
- tx_id: "0x68df8f08555086a1ab45591e6fe4bf2f538bcb80dd519108030b7e886d6a230c2531",
32539
- output_index: 0,
32540
- tx_pointer_block_height: 0,
32541
- tx_pointer_tx_idx: 0,
32542
- owner: "0xbdaad6a89e073e177895b3e5a9ccd15806749eda134a6438dae32fc5b6601f3f",
32543
- amount: 18446744073709552e3,
32544
- asset_id: "0x0000000000000000000000000000000000000000000000000000000000000000"
32545
- },
32546
- {
32547
- tx_id: "0x1b9bdaa290518373eb905e45ce7fcb89acedd24341ca7749ad47a938e4bf3ca9b7ce",
32548
- output_index: 0,
32549
- tx_pointer_block_height: 0,
32550
- tx_pointer_tx_idx: 0,
32551
- owner: "0xbdaad6a89e073e177895b3e5a9ccd15806749eda134a6438dae32fc5b6601f3f",
32552
- amount: 18446744073709552e3,
32553
- asset_id: "0x0101010101010101010101010101010101010101010101010101010101010101"
32554
- },
32555
- {
32556
- tx_id: "0xa5a2e9db3d1285337fe1183dc1eabe8f9cdcd470daf95cd5c522bbae292f53977f26",
32557
- output_index: 0,
32558
- tx_pointer_block_height: 0,
32559
- tx_pointer_tx_idx: 0,
32560
- owner: "0xbdaad6a89e073e177895b3e5a9ccd15806749eda134a6438dae32fc5b6601f3f",
32561
- amount: 18446744073709552e3,
32562
- asset_id: "0x0202020202020202020202020202020202020202020202020202020202020202"
32563
- },
32564
- {
32565
- tx_id: "0x13b685a1ea7c56309a92d69dd7e4808987ec90d62a1f9c9f2ec18e54746855c8c93c",
32566
- output_index: 0,
32567
- tx_pointer_block_height: 0,
32568
- tx_pointer_tx_idx: 0,
32569
- owner: "0x95a7aa6cc32743f8706c40ef49a7423b47da763bb4bbc055b1f07254dc729036",
32570
- amount: 18446744073709552e3,
32571
- asset_id: "0x0000000000000000000000000000000000000000000000000000000000000000"
32572
- },
32573
- {
32574
- tx_id: "0xf8f00a234cf3fbab86befc3fd9346d7fd1ac085233c9cb58c7447f30c75cbf87ed38",
32575
- output_index: 0,
32576
- tx_pointer_block_height: 0,
32577
- tx_pointer_tx_idx: 0,
32578
- owner: "0x95a7aa6cc32743f8706c40ef49a7423b47da763bb4bbc055b1f07254dc729036",
32579
- amount: 18446744073709552e3,
32580
- asset_id: "0x0101010101010101010101010101010101010101010101010101010101010101"
32581
- },
32582
- {
32583
- tx_id: "0x2a36c870f624b60fbd6f2b71332ca7f704c69296ceae4ddbf3a8ede79408088934be",
32584
- output_index: 0,
32585
- tx_pointer_block_height: 0,
32586
- tx_pointer_tx_idx: 0,
32587
- owner: "0x95a7aa6cc32743f8706c40ef49a7423b47da763bb4bbc055b1f07254dc729036",
32588
- amount: 18446744073709552e3,
32589
- asset_id: "0x0202020202020202020202020202020202020202020202020202020202020202"
32590
- },
32591
- {
32592
- tx_id: "0x9cd180d41e67a422da8a7683f036b463a7ed7efc0de31c1692adac90decbfebce78c",
32593
- output_index: 0,
32594
- tx_pointer_block_height: 0,
32595
- tx_pointer_tx_idx: 0,
32596
- owner: "0xcee104acd38b940c8f1c62c6d7ea00a0ad2241d6dee0509a4bf27297508870d3",
32597
- amount: 18446744073709552e3,
32598
- asset_id: "0x0000000000000000000000000000000000000000000000000000000000000000"
32599
- },
32600
- {
32601
- tx_id: "0xfeb4f2388fa22e6613ff85cf4e655f58acdfaa6299eba7f93b812cd1f0d7bbac48f0",
32602
- output_index: 0,
32603
- tx_pointer_block_height: 0,
32604
- tx_pointer_tx_idx: 0,
32605
- owner: "0xcee104acd38b940c8f1c62c6d7ea00a0ad2241d6dee0509a4bf27297508870d3",
32606
- amount: 18446744073709552e3,
32607
- asset_id: "0x0101010101010101010101010101010101010101010101010101010101010101"
32608
- },
32609
- {
32610
- tx_id: "0xc4d20299f43358dc32ab853f6631340b09278511b6adbaf34597ade6ef37efd018f1",
32611
- output_index: 0,
32612
- tx_pointer_block_height: 0,
32613
- tx_pointer_tx_idx: 0,
32614
- owner: "0xcee104acd38b940c8f1c62c6d7ea00a0ad2241d6dee0509a4bf27297508870d3",
32615
- amount: 18446744073709552e3,
32616
- asset_id: "0x0202020202020202020202020202020202020202020202020202020202020202"
32617
- },
32618
- {
32619
- tx_id: "0x437291414110b0aebaa8be5c0d9ff1e97d1130a24a6c9e028f2b1f6b0576be6aa961",
32620
- output_index: 0,
32621
- tx_pointer_block_height: 0,
32622
- tx_pointer_tx_idx: 0,
32623
- owner: "0x7e3626e306588eba79cafab73f0709e55ab8f4bdfe8c8b75034a430fc56ece89",
32624
- amount: 18446744073709552e3,
32625
- asset_id: "0x0000000000000000000000000000000000000000000000000000000000000000"
32626
- },
32627
- {
32628
- tx_id: "0x28131b9acc90c2058ee14f4094a474146ba5b779cb9021867164b3d41abad3d047a7",
32629
- output_index: 0,
32630
- tx_pointer_block_height: 0,
32631
- tx_pointer_tx_idx: 0,
32632
- owner: "0x7e3626e306588eba79cafab73f0709e55ab8f4bdfe8c8b75034a430fc56ece89",
32633
- amount: 18446744073709552e3,
32634
- asset_id: "0x0101010101010101010101010101010101010101010101010101010101010101"
32635
- },
32636
- {
32637
- tx_id: "0x033bb5f9b0e4f530d50af3a0f12dd510f799af495ef88baea3cf854a37da728d214b",
32638
- output_index: 0,
32639
- tx_pointer_block_height: 0,
32640
- tx_pointer_tx_idx: 0,
32641
- owner: "0x7e3626e306588eba79cafab73f0709e55ab8f4bdfe8c8b75034a430fc56ece89",
32642
- amount: 18446744073709552e3,
32643
- asset_id: "0x0202020202020202020202020202020202020202020202020202020202020202"
32644
- },
32645
- {
32646
- tx_id: "0x460591398552eca338dd9577f362b91b0f9297f308258734870350004dcc303c67e9",
32647
- output_index: 0,
32648
- tx_pointer_block_height: 0,
32649
- tx_pointer_tx_idx: 0,
32650
- owner: "0x1c31df52b6df56407dd95f83082e8beb9cfc9532ac111d5bd8491651d95ba775",
32651
- amount: 18446744073709552e3,
32652
- asset_id: "0x0000000000000000000000000000000000000000000000000000000000000000"
32653
- },
32654
- {
32655
- tx_id: "0x447a7c37aee972dcba72f05255c5145dd63125f0fc46ef98c216f775ee0421e23d2b",
32656
- output_index: 0,
32657
- tx_pointer_block_height: 0,
32658
- tx_pointer_tx_idx: 0,
32659
- owner: "0x1c31df52b6df56407dd95f83082e8beb9cfc9532ac111d5bd8491651d95ba775",
32660
- amount: 18446744073709552e3,
32661
- asset_id: "0x0101010101010101010101010101010101010101010101010101010101010101"
32662
- },
32663
- {
32664
- tx_id: "0xf4a5d727606260c7ac6333fa89e7aef474df8a13326716d4d02f6392ebb7b997d268",
32665
- output_index: 0,
32666
- tx_pointer_block_height: 0,
32667
- tx_pointer_tx_idx: 0,
32668
- owner: "0x1c31df52b6df56407dd95f83082e8beb9cfc9532ac111d5bd8491651d95ba775",
32669
- amount: 18446744073709552e3,
32670
- asset_id: "0x0202020202020202020202020202020202020202020202020202020202020202"
32671
- },
32672
- {
32673
- tx_id: "0x25a49b0731bf610f6706aa9e9e96e5967f7c50f4302a3c75d7c8141595896551c18d",
32674
- output_index: 0,
32675
- tx_pointer_block_height: 0,
32676
- tx_pointer_tx_idx: 0,
32677
- owner: "0x09dd7a49174d6fcc9f4c6f7942c18060a935ddd03ee69b594189b8c3581276ea",
32678
- amount: 18446744073709552e3,
32679
- asset_id: "0x0000000000000000000000000000000000000000000000000000000000000000"
32680
- },
32681
- {
32682
- tx_id: "0x0a6e3585881ef2edf3f7727762799089dc0b5923e8b3718b49044dd9ddcb33b68459",
32683
- output_index: 0,
32684
- tx_pointer_block_height: 0,
32685
- tx_pointer_tx_idx: 0,
32686
- owner: "0x09dd7a49174d6fcc9f4c6f7942c18060a935ddd03ee69b594189b8c3581276ea",
32687
- amount: 18446744073709552e3,
32688
- asset_id: "0x0101010101010101010101010101010101010101010101010101010101010101"
32689
- },
32690
- {
32691
- tx_id: "0xf73bbe0635f7b6d59a090a21d87288b82164d0f6101da830ce64eff64a2d2ff2ac37",
32692
- output_index: 0,
32693
- tx_pointer_block_height: 0,
32694
- tx_pointer_tx_idx: 0,
32695
- owner: "0x09dd7a49174d6fcc9f4c6f7942c18060a935ddd03ee69b594189b8c3581276ea",
32696
- amount: 18446744073709552e3,
32697
- asset_id: "0x0202020202020202020202020202020202020202020202020202020202020202"
32463
+ consensus_parameters: {
32464
+ tx_params: {
32465
+ max_inputs: 255,
32466
+ max_outputs: 255,
32467
+ max_witnesses: 255,
32468
+ max_gas_per_tx: 1e7,
32469
+ max_size: 17825792
32698
32470
  },
32699
- {
32700
- tx_id: "0x6cc44cb8d2a6462a591a77b6b9917eb6b22ad80d23d3cfd4f94c9da49c14b3cbac6e",
32701
- output_index: 0,
32702
- tx_pointer_block_height: 0,
32703
- tx_pointer_tx_idx: 0,
32704
- owner: "0x86604282dc604481b809845be49667607c470644f6822fc01eb0d22f167e08cf",
32705
- amount: 18446744073709552e3,
32706
- asset_id: "0x0000000000000000000000000000000000000000000000000000000000000000"
32471
+ predicate_params: {
32472
+ max_predicate_length: 1048576,
32473
+ max_predicate_data_length: 1048576,
32474
+ max_gas_per_predicate: 1e7,
32475
+ max_message_data_length: 1048576
32707
32476
  },
32708
- {
32709
- tx_id: "0xbf2305d284ea95227040df4cc727156cccc2ca6aa3b92ed86fea4db1c37e5905f926",
32710
- output_index: 0,
32711
- tx_pointer_block_height: 0,
32712
- tx_pointer_tx_idx: 0,
32713
- owner: "0x86604282dc604481b809845be49667607c470644f6822fc01eb0d22f167e08cf",
32714
- amount: 18446744073709552e3,
32715
- asset_id: "0x0101010101010101010101010101010101010101010101010101010101010101"
32477
+ script_params: {
32478
+ max_script_length: 1048576,
32479
+ max_script_data_length: 1048576
32716
32480
  },
32717
- {
32718
- tx_id: "0xf4e1c76c72ecae699696f5e7a62ccf1425f7395080d0ca7b25ab63d1f841f425b807",
32719
- output_index: 0,
32720
- tx_pointer_block_height: 0,
32721
- tx_pointer_tx_idx: 0,
32722
- owner: "0x86604282dc604481b809845be49667607c470644f6822fc01eb0d22f167e08cf",
32723
- amount: 18446744073709552e3,
32724
- asset_id: "0x0202020202020202020202020202020202020202020202020202020202020202"
32481
+ contract_params: {
32482
+ contract_max_size: 16777216,
32483
+ max_storage_slots: 255
32725
32484
  },
32726
- {
32727
- tx_id: "0x619c80ee9f4c27c2e134cec6c67bdb268ce7fb1d2ac229ca2a44ec7ac88b2da99669",
32728
- output_index: 0,
32729
- tx_pointer_block_height: 0,
32730
- tx_pointer_tx_idx: 0,
32731
- owner: "0xbca334a06d19db5041c78fe2f465b07be5bec828f38b7796b2877e7d1542c950",
32732
- amount: 18446744073709552e3,
32733
- asset_id: "0x0000000000000000000000000000000000000000000000000000000000000000"
32485
+ fee_params: {
32486
+ gas_price_factor: 92,
32487
+ gas_per_byte: 4
32734
32488
  },
32735
- {
32736
- tx_id: "0x978d5b6be047ffbf1474dc376a6baa33264629b809e4a8210d11aaa805ec6451585d",
32737
- output_index: 0,
32738
- tx_pointer_block_height: 0,
32739
- tx_pointer_tx_idx: 0,
32740
- owner: "0xbca334a06d19db5041c78fe2f465b07be5bec828f38b7796b2877e7d1542c950",
32741
- amount: 18446744073709552e3,
32742
- asset_id: "0x0101010101010101010101010101010101010101010101010101010101010101"
32489
+ base_asset_id: "0x0000000000000000000000000000000000000000000000000000000000000000"
32490
+ },
32491
+ gas_costs: {
32492
+ add: 1,
32493
+ addi: 1,
32494
+ aloc: 1,
32495
+ and: 1,
32496
+ andi: 1,
32497
+ bal: 13,
32498
+ bhei: 1,
32499
+ bhsh: 1,
32500
+ burn: 132,
32501
+ cb: 1,
32502
+ cfei: 1,
32503
+ cfsi: 1,
32504
+ croo: 16,
32505
+ div: 1,
32506
+ divi: 1,
32507
+ ecr1: 3e3,
32508
+ eck1: 951,
32509
+ ed19: 3e3,
32510
+ eq: 1,
32511
+ exp: 1,
32512
+ expi: 1,
32513
+ flag: 1,
32514
+ gm: 1,
32515
+ gt: 1,
32516
+ gtf: 1,
32517
+ ji: 1,
32518
+ jmp: 1,
32519
+ jne: 1,
32520
+ jnei: 1,
32521
+ jnzi: 1,
32522
+ jmpf: 1,
32523
+ jmpb: 1,
32524
+ jnzf: 1,
32525
+ jnzb: 1,
32526
+ jnef: 1,
32527
+ jneb: 1,
32528
+ lb: 1,
32529
+ log: 9,
32530
+ lt: 1,
32531
+ lw: 1,
32532
+ mint: 135,
32533
+ mlog: 1,
32534
+ modOp: 1,
32535
+ modi: 1,
32536
+ moveOp: 1,
32537
+ movi: 1,
32538
+ mroo: 2,
32539
+ mul: 1,
32540
+ muli: 1,
32541
+ mldv: 1,
32542
+ noop: 1,
32543
+ not: 1,
32544
+ or: 1,
32545
+ ori: 1,
32546
+ poph: 2,
32547
+ popl: 2,
32548
+ pshh: 2,
32549
+ pshl: 2,
32550
+ ret: 13,
32551
+ rvrt: 13,
32552
+ sb: 1,
32553
+ sll: 1,
32554
+ slli: 1,
32555
+ srl: 1,
32556
+ srli: 1,
32557
+ srw: 12,
32558
+ sub: 1,
32559
+ subi: 1,
32560
+ sw: 1,
32561
+ sww: 67,
32562
+ time: 1,
32563
+ tr: 105,
32564
+ tro: 60,
32565
+ wdcm: 1,
32566
+ wqcm: 1,
32567
+ wdop: 1,
32568
+ wqop: 1,
32569
+ wdml: 1,
32570
+ wqml: 1,
32571
+ wddv: 1,
32572
+ wqdv: 2,
32573
+ wdmd: 3,
32574
+ wqmd: 4,
32575
+ wdam: 2,
32576
+ wqam: 3,
32577
+ wdmm: 3,
32578
+ wqmm: 3,
32579
+ xor: 1,
32580
+ xori: 1,
32581
+ call: {
32582
+ LightOperation: {
32583
+ base: 144,
32584
+ units_per_gas: 214
32585
+ }
32743
32586
  },
32744
- {
32745
- tx_id: "0x673ba12fca6e52429896096262b8c59b61751976e552649fb1fe7369488fc10aa83c",
32746
- output_index: 0,
32747
- tx_pointer_block_height: 0,
32748
- tx_pointer_tx_idx: 0,
32749
- owner: "0xbca334a06d19db5041c78fe2f465b07be5bec828f38b7796b2877e7d1542c950",
32750
- amount: 18446744073709552e3,
32751
- asset_id: "0x0202020202020202020202020202020202020202020202020202020202020202"
32587
+ ccp: {
32588
+ LightOperation: {
32589
+ base: 15,
32590
+ units_per_gas: 103
32591
+ }
32752
32592
  },
32753
- {
32754
- tx_id: "0xc42a165104b9fcfa4a9ebffc707781ace233f1c0609c24c36a5c4bfcd407480ddb6c",
32755
- output_index: 0,
32756
- tx_pointer_block_height: 0,
32757
- tx_pointer_tx_idx: 0,
32758
- owner: "0xbd9a1dc8d3ec3521c43f6c2c01611b4d0204c7610204ff0178488c8738a30bd2",
32759
- amount: 18446744073709552e3,
32760
- asset_id: "0x0000000000000000000000000000000000000000000000000000000000000000"
32593
+ csiz: {
32594
+ LightOperation: {
32595
+ base: 17,
32596
+ units_per_gas: 790
32597
+ }
32761
32598
  },
32762
- {
32763
- tx_id: "0xb353fbcd94abba347f3ba25e17744e98da26e608ebccbbbd2e9d004997644bdf993c",
32764
- output_index: 0,
32765
- tx_pointer_block_height: 0,
32766
- tx_pointer_tx_idx: 0,
32767
- owner: "0xbd9a1dc8d3ec3521c43f6c2c01611b4d0204c7610204ff0178488c8738a30bd2",
32768
- amount: 18446744073709552e3,
32769
- asset_id: "0x0101010101010101010101010101010101010101010101010101010101010101"
32599
+ k256: {
32600
+ LightOperation: {
32601
+ base: 11,
32602
+ units_per_gas: 214
32603
+ }
32770
32604
  },
32771
- {
32772
- tx_id: "0xc34a6fcb241dec82f885019caf5e14bb6708b435afebfef0037ac447fbb6d30378a3",
32773
- output_index: 0,
32774
- tx_pointer_block_height: 0,
32775
- tx_pointer_tx_idx: 0,
32776
- owner: "0xbd9a1dc8d3ec3521c43f6c2c01611b4d0204c7610204ff0178488c8738a30bd2",
32777
- amount: 18446744073709552e3,
32778
- asset_id: "0x0202020202020202020202020202020202020202020202020202020202020202"
32605
+ ldc: {
32606
+ LightOperation: {
32607
+ base: 15,
32608
+ units_per_gas: 272
32609
+ }
32779
32610
  },
32780
- {
32781
- tx_id: "0x421dfb5811c905724f2f4c6370cd15eaeb590ddeb966f9a4b9f8d65991dfe5142e12",
32782
- output_index: 0,
32783
- tx_pointer_block_height: 0,
32784
- tx_pointer_tx_idx: 0,
32785
- owner: "0xb32197cf75efe05bf453c26178139f09b391582065549c1422bc92555ecffb64",
32786
- amount: 18446744073709552e3,
32787
- asset_id: "0x0000000000000000000000000000000000000000000000000000000000000000"
32611
+ logd: {
32612
+ LightOperation: {
32613
+ base: 26,
32614
+ units_per_gas: 64
32615
+ }
32788
32616
  },
32789
- {
32790
- tx_id: "0xa952c0487eefac5dda612011c4c82554c8660834461b9b815c6ae257b56b68005235",
32791
- output_index: 0,
32792
- tx_pointer_block_height: 0,
32793
- tx_pointer_tx_idx: 0,
32794
- owner: "0xb32197cf75efe05bf453c26178139f09b391582065549c1422bc92555ecffb64",
32795
- amount: 18446744073709552e3,
32796
- asset_id: "0x0101010101010101010101010101010101010101010101010101010101010101"
32617
+ mcl: {
32618
+ LightOperation: {
32619
+ base: 1,
32620
+ units_per_gas: 3333
32621
+ }
32797
32622
  },
32798
- {
32799
- tx_id: "0xebaccf91b3b213341d047b6e6af214f1f9729b3d6dadf9c1918a9fe412486af871db",
32800
- output_index: 0,
32801
- tx_pointer_block_height: 0,
32802
- tx_pointer_tx_idx: 0,
32803
- owner: "0xb32197cf75efe05bf453c26178139f09b391582065549c1422bc92555ecffb64",
32804
- amount: 18446744073709552e3,
32805
- asset_id: "0x0202020202020202020202020202020202020202020202020202020202020202"
32623
+ mcli: {
32624
+ LightOperation: {
32625
+ base: 1,
32626
+ units_per_gas: 3333
32627
+ }
32806
32628
  },
32807
- {
32808
- tx_id: "0xda6d61c153e7d735954408274f4ffe8459c2dbab720ce22a1ae9ffedd33077b5b19d",
32809
- output_index: 0,
32810
- tx_pointer_block_height: 0,
32811
- tx_pointer_tx_idx: 0,
32812
- owner: "0x3b24509ed4ab3c7959f5c9391c1445c59290cdb5f13d6f780922f376b7029f30",
32813
- amount: 18446744073709552e3,
32814
- asset_id: "0x0000000000000000000000000000000000000000000000000000000000000000"
32629
+ mcp: {
32630
+ LightOperation: {
32631
+ base: 1,
32632
+ units_per_gas: 2e3
32633
+ }
32815
32634
  },
32816
- {
32817
- tx_id: "0x508871600ef68c4f1e021dd0db219c733107151338aa95de530bd10dc61f6a69c144",
32818
- output_index: 0,
32819
- tx_pointer_block_height: 0,
32820
- tx_pointer_tx_idx: 0,
32821
- owner: "0x3b24509ed4ab3c7959f5c9391c1445c59290cdb5f13d6f780922f376b7029f30",
32822
- amount: 18446744073709552e3,
32823
- asset_id: "0x0101010101010101010101010101010101010101010101010101010101010101"
32635
+ mcpi: {
32636
+ LightOperation: {
32637
+ base: 3,
32638
+ units_per_gas: 2e3
32639
+ }
32824
32640
  },
32825
- {
32826
- tx_id: "0x509994738b4973e2dbbff9596b176a89fb07ee95f0ed575a4fe07a735a2a181f3200",
32827
- output_index: 0,
32828
- tx_pointer_block_height: 0,
32829
- tx_pointer_tx_idx: 0,
32830
- owner: "0x3b24509ed4ab3c7959f5c9391c1445c59290cdb5f13d6f780922f376b7029f30",
32831
- amount: 18446744073709552e3,
32832
- asset_id: "0x0202020202020202020202020202020202020202020202020202020202020202"
32641
+ meq: {
32642
+ LightOperation: {
32643
+ base: 1,
32644
+ units_per_gas: 2500
32645
+ }
32833
32646
  },
32834
- {
32835
- tx_id: "0x6cc0cb58df0e0606fc85481aaaf5f47e145a67240b298c184bcb7fd7367c3bbf9453",
32836
- output_index: 0,
32837
- tx_pointer_block_height: 0,
32838
- tx_pointer_tx_idx: 0,
32839
- owner: "0x77c6f40b7da70d885f68efaad7c661327482a63ea10dcb4271de819438254ae1",
32840
- amount: 18446744073709552e3,
32841
- asset_id: "0x0000000000000000000000000000000000000000000000000000000000000000"
32647
+ retd: {
32648
+ LightOperation: {
32649
+ base: 29,
32650
+ units_per_gas: 62
32651
+ }
32842
32652
  },
32843
- {
32844
- tx_id: "0x9ddea761afc31516307e1553647ac6cc26d4a82fed9a9e6a03b994cdbf2293b3e3b6",
32845
- output_index: 0,
32846
- tx_pointer_block_height: 0,
32847
- tx_pointer_tx_idx: 0,
32848
- owner: "0x77c6f40b7da70d885f68efaad7c661327482a63ea10dcb4271de819438254ae1",
32849
- amount: 18446744073709552e3,
32850
- asset_id: "0x0101010101010101010101010101010101010101010101010101010101010101"
32653
+ s256: {
32654
+ LightOperation: {
32655
+ base: 2,
32656
+ units_per_gas: 214
32657
+ }
32851
32658
  },
32852
- {
32853
- tx_id: "0x82dbc478ba63abf28b92d9dce0cb8c2e6c02833d436fe812a33cf78417e4a80c1306",
32854
- output_index: 0,
32855
- tx_pointer_block_height: 0,
32856
- tx_pointer_tx_idx: 0,
32857
- owner: "0x77c6f40b7da70d885f68efaad7c661327482a63ea10dcb4271de819438254ae1",
32858
- amount: 18446744073709552e3,
32859
- asset_id: "0x0202020202020202020202020202020202020202020202020202020202020202"
32659
+ scwq: {
32660
+ LightOperation: {
32661
+ base: 13,
32662
+ units_per_gas: 5
32663
+ }
32860
32664
  },
32861
- {
32862
- tx_id: "0xc3b0cb232c74009fd226a6246403f78bcc33d116579f41d9387c0d76c76942749c7c",
32863
- output_index: 0,
32864
- tx_pointer_block_height: 0,
32865
- tx_pointer_tx_idx: 0,
32866
- owner: "0x6a2c4691c547c43924650dbd30620b184b5fe3fb6dbe5c4446110b08f6f405bf",
32867
- amount: 18446744073709552e3,
32868
- asset_id: "0x0000000000000000000000000000000000000000000000000000000000000000"
32665
+ smo: {
32666
+ LightOperation: {
32667
+ base: 209,
32668
+ units_per_gas: 55
32669
+ }
32869
32670
  },
32870
- {
32871
- tx_id: "0x708ee45d18f94ab06458712745c92c7b9b6049ba345219d6697eae5208ec0328aeaf",
32872
- output_index: 0,
32873
- tx_pointer_block_height: 0,
32874
- tx_pointer_tx_idx: 0,
32875
- owner: "0x6a2c4691c547c43924650dbd30620b184b5fe3fb6dbe5c4446110b08f6f405bf",
32876
- amount: 18446744073709552e3,
32877
- asset_id: "0x0101010101010101010101010101010101010101010101010101010101010101"
32671
+ srwq: {
32672
+ LightOperation: {
32673
+ base: 47,
32674
+ units_per_gas: 5
32675
+ }
32878
32676
  },
32879
- {
32880
- tx_id: "0xfe26968c44ac5becc608ce543075ae9e677b7631f3beb7a11ba20703fdca3c0e3569",
32881
- output_index: 0,
32882
- tx_pointer_block_height: 0,
32883
- tx_pointer_tx_idx: 0,
32884
- owner: "0x6a2c4691c547c43924650dbd30620b184b5fe3fb6dbe5c4446110b08f6f405bf",
32885
- amount: 18446744073709552e3,
32886
- asset_id: "0x0202020202020202020202020202020202020202020202020202020202020202"
32677
+ swwq: {
32678
+ LightOperation: {
32679
+ base: 44,
32680
+ units_per_gas: 5
32681
+ }
32887
32682
  },
32888
- {
32889
- tx_id: "0xe0ec1d2c991feac69be4d0e84ad7c964616de08e16dccc4d2000b1900ba31082b993",
32890
- output_index: 0,
32891
- tx_pointer_block_height: 0,
32892
- tx_pointer_tx_idx: 0,
32893
- owner: "0x49075a7538e2c88ebe1926ce4d898198a2a4e790d14512943a9864bc536b3c82",
32894
- amount: 18446744073709552e3,
32895
- asset_id: "0x0000000000000000000000000000000000000000000000000000000000000000"
32683
+ contract_root: {
32684
+ LightOperation: {
32685
+ base: 75,
32686
+ units_per_gas: 1
32687
+ }
32896
32688
  },
32897
- {
32898
- tx_id: "0xfa82dbdd72252d1e6c76ee818bbac0441c3a705aff447f041c8b9fc3cb03f9ccd7e2",
32899
- output_index: 0,
32900
- tx_pointer_block_height: 0,
32901
- tx_pointer_tx_idx: 0,
32902
- owner: "0x49075a7538e2c88ebe1926ce4d898198a2a4e790d14512943a9864bc536b3c82",
32903
- amount: 18446744073709552e3,
32904
- asset_id: "0x0101010101010101010101010101010101010101010101010101010101010101"
32689
+ state_root: {
32690
+ LightOperation: {
32691
+ base: 412,
32692
+ units_per_gas: 1
32693
+ }
32905
32694
  },
32906
- {
32907
- tx_id: "0x324f45e47cef892ac3e0759f3b72207c77046f9938267af4bd4af2ae031b97cb36c8",
32908
- output_index: 0,
32909
- tx_pointer_block_height: 0,
32910
- tx_pointer_tx_idx: 0,
32911
- owner: "0x49075a7538e2c88ebe1926ce4d898198a2a4e790d14512943a9864bc536b3c82",
32912
- amount: 18446744073709552e3,
32913
- asset_id: "0x0202020202020202020202020202020202020202020202020202020202020202"
32914
- }
32915
- ],
32916
- messages: [
32917
- {
32918
- sender: "0xc43454aa38dd91f88109a4b7aef5efb96ce34e3f24992fe0f81d233ca686f80f",
32919
- recipient: "0x69a2b736b60159b43bb8a4f98c0589f6da5fa3a3d101e8e269c499eb942753ba",
32920
- nonce: "0101010101010101010101010101010101010101010101010101010101010101",
32921
- amount: 18446744073709552e3,
32922
- data: "",
32923
- da_height: 0
32695
+ vm_initialization: {
32696
+ HeavyOperation: {
32697
+ base: 2e3,
32698
+ gas_per_unit: 0
32699
+ }
32924
32700
  },
32925
- {
32926
- sender: "0x69a2b736b60159b43bb8a4f98c0589f6da5fa3a3d101e8e269c499eb942753ba",
32927
- recipient: "0xc43454aa38dd91f88109a4b7aef5efb96ce34e3f24992fe0f81d233ca686f80f",
32928
- nonce: "0e1ef2963832068b0e1ef2963832068b0e1ef2963832068b0e1ef2963832068b",
32929
- amount: 12704439083013452e3,
32930
- data: "",
32931
- da_height: 0
32701
+ new_storage_per_byte: 1
32702
+ },
32703
+ consensus: {
32704
+ PoA: {
32705
+ signing_key: "0x94ffcc53b892684acefaebc8a3d4a595e528a8cf664eeb3ef36f1020b0809d0d"
32932
32706
  }
32933
- ],
32934
- contracts: [],
32935
- block_height: 0,
32936
- da_block_height: 0
32937
- };
32938
- var defaultChainConfigs = {
32939
- chainConfigJson: chainConfig_default,
32940
- metadataJson: metadata_default,
32941
- stateConfigJson: stateConfig_default
32707
+ }
32942
32708
  };
32709
+ var defaultChainConfig = chainConfig_default;
32943
32710
  var defaultConsensusKey = "0xa449b1ffee0e2205fa924c6740cc48b3b473aa28587df6dab12abc245d1f5298";
32944
32711
 
32945
32712
  // ../crypto/dist/index.mjs
@@ -34988,10 +34755,6 @@ This unreleased fuel-core build may include features and updates not yet support
34988
34755
  }
34989
34756
  };
34990
34757
 
34991
- // ../address/dist/configs.mjs
34992
- var ZeroBytes32 = "0x0000000000000000000000000000000000000000000000000000000000000000";
34993
- var BaseAssetId = ZeroBytes32;
34994
-
34995
34758
  // ../math/dist/index.mjs
34996
34759
  var import_bn = __toESM(require_bn(), 1);
34997
34760
  var DEFAULT_PRECISION = 9;
@@ -35211,182 +34974,32 @@ This unreleased fuel-core build may include features and updates not yet support
35211
34974
  function toBytes3(value, bytesPadding) {
35212
34975
  return bn(value).toBytes(bytesPadding);
35213
34976
  }
35214
-
35215
- // ../../node_modules/.pnpm/ramda@0.29.0/node_modules/ramda/es/internal/_isPlaceholder.js
35216
- function _isPlaceholder(a) {
35217
- return a != null && typeof a === "object" && a["@@functional/placeholder"] === true;
34977
+ function max(...numbers) {
34978
+ return numbers.reduce((prev, cur) => bn(cur).gt(prev) ? bn(cur) : prev, bn(0));
35218
34979
  }
35219
34980
 
35220
- // ../../node_modules/.pnpm/ramda@0.29.0/node_modules/ramda/es/internal/_curry1.js
35221
- function _curry1(fn) {
35222
- return function f1(a) {
35223
- if (arguments.length === 0 || _isPlaceholder(a)) {
35224
- return f1;
35225
- } else {
35226
- return fn.apply(this, arguments);
35227
- }
35228
- };
35229
- }
35230
-
35231
- // ../../node_modules/.pnpm/ramda@0.29.0/node_modules/ramda/es/internal/_isArray.js
35232
- var isArray_default = Array.isArray || function _isArray(val) {
35233
- return val != null && val.length >= 0 && Object.prototype.toString.call(val) === "[object Array]";
35234
- };
35235
-
35236
- // ../../node_modules/.pnpm/ramda@0.29.0/node_modules/ramda/es/type.js
35237
- var type = /* @__PURE__ */ _curry1(function type2(val) {
35238
- return val === null ? "Null" : val === void 0 ? "Undefined" : Object.prototype.toString.call(val).slice(8, -1);
35239
- });
35240
- var type_default = type;
35241
-
35242
- // ../../node_modules/.pnpm/ramda@0.29.0/node_modules/ramda/es/internal/_toISOString.js
35243
- var pad = function pad2(n) {
35244
- return (n < 10 ? "0" : "") + n;
35245
- };
35246
- var _toISOString = typeof Date.prototype.toISOString === "function" ? function _toISOString2(d) {
35247
- return d.toISOString();
35248
- } : function _toISOString3(d) {
35249
- return d.getUTCFullYear() + "-" + pad(d.getUTCMonth() + 1) + "-" + pad(d.getUTCDate()) + "T" + pad(d.getUTCHours()) + ":" + pad(d.getUTCMinutes()) + ":" + pad(d.getUTCSeconds()) + "." + (d.getUTCMilliseconds() / 1e3).toFixed(3).slice(2, 5) + "Z";
35250
- };
35251
-
35252
- // ../../node_modules/.pnpm/ramda@0.29.0/node_modules/ramda/es/internal/_isInteger.js
35253
- var isInteger_default = Number.isInteger || function _isInteger(n) {
35254
- return n << 0 === n;
35255
- };
35256
-
35257
- // ../../node_modules/.pnpm/ramda@0.29.0/node_modules/ramda/es/internal/_cloneRegExp.js
35258
- function _cloneRegExp(pattern) {
35259
- return new RegExp(pattern.source, pattern.flags ? pattern.flags : (pattern.global ? "g" : "") + (pattern.ignoreCase ? "i" : "") + (pattern.multiline ? "m" : "") + (pattern.sticky ? "y" : "") + (pattern.unicode ? "u" : "") + (pattern.dotAll ? "s" : ""));
35260
- }
35261
-
35262
- // ../../node_modules/.pnpm/ramda@0.29.0/node_modules/ramda/es/internal/_clone.js
35263
- function _clone(value, deep, map) {
35264
- map || (map = new _ObjectMap());
35265
- if (_isPrimitive(value)) {
35266
- return value;
35267
- }
35268
- var copy = function copy2(copiedValue) {
35269
- var cachedCopy = map.get(value);
35270
- if (cachedCopy) {
35271
- return cachedCopy;
35272
- }
35273
- map.set(value, copiedValue);
35274
- for (var key in value) {
35275
- if (Object.prototype.hasOwnProperty.call(value, key)) {
35276
- copiedValue[key] = deep ? _clone(value[key], true, map) : value[key];
35277
- }
35278
- }
35279
- return copiedValue;
35280
- };
35281
- switch (type_default(value)) {
35282
- case "Object":
35283
- return copy(Object.create(Object.getPrototypeOf(value)));
35284
- case "Array":
35285
- return copy([]);
35286
- case "Date":
35287
- return new Date(value.valueOf());
35288
- case "RegExp":
35289
- return _cloneRegExp(value);
35290
- case "Int8Array":
35291
- case "Uint8Array":
35292
- case "Uint8ClampedArray":
35293
- case "Int16Array":
35294
- case "Uint16Array":
35295
- case "Int32Array":
35296
- case "Uint32Array":
35297
- case "Float32Array":
35298
- case "Float64Array":
35299
- case "BigInt64Array":
35300
- case "BigUint64Array":
35301
- return value.slice();
35302
- default:
35303
- return value;
35304
- }
35305
- }
35306
- function _isPrimitive(param) {
35307
- var type3 = typeof param;
35308
- return param == null || type3 != "object" && type3 != "function";
35309
- }
35310
- var _ObjectMap = /* @__PURE__ */ function() {
35311
- function _ObjectMap2() {
35312
- this.map = {};
35313
- this.length = 0;
35314
- }
35315
- _ObjectMap2.prototype.set = function(key, value) {
35316
- const hashedKey = this.hash(key);
35317
- let bucket = this.map[hashedKey];
35318
- if (!bucket) {
35319
- this.map[hashedKey] = bucket = [];
35320
- }
35321
- bucket.push([key, value]);
35322
- this.length += 1;
35323
- };
35324
- _ObjectMap2.prototype.hash = function(key) {
35325
- let hashedKey = [];
35326
- for (var value in key) {
35327
- hashedKey.push(Object.prototype.toString.call(key[value]));
35328
- }
35329
- return hashedKey.join();
35330
- };
35331
- _ObjectMap2.prototype.get = function(key) {
35332
- if (this.length <= 180) {
35333
- for (const p in this.map) {
35334
- const bucket2 = this.map[p];
35335
- for (let i = 0; i < bucket2.length; i += 1) {
35336
- const element = bucket2[i];
35337
- if (element[0] === key) {
35338
- return element[1];
35339
- }
35340
- }
35341
- }
35342
- return;
35343
- }
35344
- const hashedKey = this.hash(key);
35345
- const bucket = this.map[hashedKey];
35346
- if (!bucket) {
35347
- return;
35348
- }
35349
- for (let i = 0; i < bucket.length; i += 1) {
35350
- const element = bucket[i];
35351
- if (element[0] === key) {
35352
- return element[1];
35353
- }
35354
- }
35355
- };
35356
- return _ObjectMap2;
35357
- }();
35358
-
35359
- // ../../node_modules/.pnpm/ramda@0.29.0/node_modules/ramda/es/clone.js
35360
- var clone = /* @__PURE__ */ _curry1(function clone2(value) {
35361
- return value != null && typeof value.clone === "function" ? value.clone() : _clone(value, true);
35362
- });
35363
- var clone_default = clone;
35364
-
35365
- // ../../node_modules/.pnpm/ramda@0.29.0/node_modules/ramda/es/trim.js
35366
- var hasProtoTrim = typeof String.prototype.trim === "function";
35367
-
35368
34981
  // src/providers/coin-quantity.ts
35369
34982
  var coinQuantityfy = (coinQuantityLike) => {
35370
34983
  let assetId;
35371
34984
  let amount;
35372
- let max;
34985
+ let max2;
35373
34986
  if (Array.isArray(coinQuantityLike)) {
35374
34987
  amount = coinQuantityLike[0];
35375
- assetId = coinQuantityLike[1] ?? BaseAssetId;
35376
- max = coinQuantityLike[2] ?? void 0;
34988
+ assetId = coinQuantityLike[1];
34989
+ max2 = coinQuantityLike[2];
35377
34990
  } else {
35378
34991
  amount = coinQuantityLike.amount;
35379
- assetId = coinQuantityLike.assetId ?? BaseAssetId;
35380
- max = coinQuantityLike.max ?? void 0;
34992
+ assetId = coinQuantityLike.assetId;
34993
+ max2 = coinQuantityLike.max ?? void 0;
35381
34994
  }
35382
34995
  const bnAmount = bn(amount);
35383
34996
  return {
35384
34997
  assetId: hexlify(assetId),
35385
34998
  amount: bnAmount.lt(1) ? bn(1) : bnAmount,
35386
- max: max ? bn(max) : void 0
34999
+ max: max2 ? bn(max2) : void 0
35387
35000
  };
35388
35001
  };
35389
- var addAmountToCoinQuantities = (params) => {
35002
+ var addAmountToAsset = (params) => {
35390
35003
  const { amount, assetId } = params;
35391
35004
  const coinQuantities = [...params.coinQuantities];
35392
35005
  const assetIdx = coinQuantities.findIndex((coinQuantity) => coinQuantity.assetId === assetId);
@@ -35453,7 +35066,7 @@ This unreleased fuel-core build may include features and updates not yet support
35453
35066
  var ENCODING_V1 = "1";
35454
35067
  var WORD_SIZE = 8;
35455
35068
  var BYTES_32 = 32;
35456
- var UTXO_ID_LEN = BYTES_32 + 2;
35069
+ var UTXO_ID_LEN = BYTES_32 + 1;
35457
35070
  var ASSET_ID_LEN = BYTES_32;
35458
35071
  var ADDRESS_LEN = BYTES_32;
35459
35072
  var NONCE_LEN = BYTES_32;
@@ -35461,9 +35074,9 @@ This unreleased fuel-core build may include features and updates not yet support
35461
35074
  var TX_POINTER_LEN = WORD_SIZE * 2;
35462
35075
  var MAX_BYTES = 2 ** 32 - 1;
35463
35076
  var calculateVmTxMemory = ({ maxInputs }) => BYTES_32 + // Tx ID
35464
- ASSET_ID_LEN + // Base asset ID
35077
+ WORD_SIZE + // Tx size
35465
35078
  // Asset ID/Balance coin input pairs
35466
- maxInputs * (ASSET_ID_LEN + WORD_SIZE) + WORD_SIZE;
35079
+ maxInputs * (ASSET_ID_LEN + WORD_SIZE);
35467
35080
  var SCRIPT_FIXED_SIZE = WORD_SIZE + // Identifier
35468
35081
  WORD_SIZE + // Gas limit
35469
35082
  WORD_SIZE + // Script size
@@ -35481,6 +35094,7 @@ This unreleased fuel-core build may include features and updates not yet support
35481
35094
  ASSET_ID_LEN + // Asset id
35482
35095
  TX_POINTER_LEN + // TxPointer
35483
35096
  WORD_SIZE + // Witnesses index
35097
+ WORD_SIZE + // Maturity
35484
35098
  WORD_SIZE + // Predicate size
35485
35099
  WORD_SIZE + // Predicate data size
35486
35100
  WORD_SIZE;
@@ -35802,7 +35416,7 @@ This unreleased fuel-core build may include features and updates not yet support
35802
35416
  constructor(name, coders) {
35803
35417
  const caseIndexCoder = new BigNumberCoder("u64");
35804
35418
  const encodedValueSize = Object.values(coders).reduce(
35805
- (max, coder) => Math.max(max, coder.encodedLength),
35419
+ (max2, coder) => Math.max(max2, coder.encodedLength),
35806
35420
  0
35807
35421
  );
35808
35422
  super(`enum ${name}`, `enum ${name}`, caseIndexCoder.encodedLength + encodedValueSize);
@@ -36520,7 +36134,7 @@ This unreleased fuel-core build may include features and updates not yet support
36520
36134
  constructor(name, coders) {
36521
36135
  const caseIndexCoder = new BigNumberCoder("u64");
36522
36136
  const encodedValueSize = Object.values(coders).reduce(
36523
- (max, coder) => Math.max(max, coder.encodedLength),
36137
+ (max2, coder) => Math.max(max2, coder.encodedLength),
36524
36138
  0
36525
36139
  );
36526
36140
  super(`enum ${name}`, `enum ${name}`, caseIndexCoder.encodedLength + encodedValueSize);
@@ -37234,19 +36848,18 @@ This unreleased fuel-core build may include features and updates not yet support
37234
36848
  encode(value) {
37235
36849
  const parts = [];
37236
36850
  parts.push(new B256Coder().encode(value.txID));
37237
- parts.push(new NumberCoder("u16").encode(value.outputIndex));
36851
+ parts.push(new NumberCoder("u8").encode(value.outputIndex));
37238
36852
  parts.push(new B256Coder().encode(value.owner));
37239
36853
  parts.push(new BigNumberCoder("u64").encode(value.amount));
37240
36854
  parts.push(new B256Coder().encode(value.assetId));
37241
36855
  parts.push(new TxPointerCoder().encode(value.txPointer));
37242
- parts.push(new NumberCoder("u16").encode(value.witnessIndex));
36856
+ parts.push(new NumberCoder("u8").encode(value.witnessIndex));
36857
+ parts.push(new NumberCoder("u32").encode(value.maturity));
37243
36858
  parts.push(new BigNumberCoder("u64").encode(value.predicateGasUsed));
37244
- parts.push(new BigNumberCoder("u64").encode(value.predicateLength));
37245
- parts.push(new BigNumberCoder("u64").encode(value.predicateDataLength));
37246
- parts.push(new ByteArrayCoder(value.predicateLength.toNumber()).encode(value.predicate));
37247
- parts.push(
37248
- new ByteArrayCoder(value.predicateDataLength.toNumber()).encode(value.predicateData)
37249
- );
36859
+ parts.push(new NumberCoder("u32").encode(value.predicateLength));
36860
+ parts.push(new NumberCoder("u32").encode(value.predicateDataLength));
36861
+ parts.push(new ByteArrayCoder(value.predicateLength).encode(value.predicate));
36862
+ parts.push(new ByteArrayCoder(value.predicateDataLength).encode(value.predicateData));
37250
36863
  return concat(parts);
37251
36864
  }
37252
36865
  decode(data, offset) {
@@ -37254,7 +36867,7 @@ This unreleased fuel-core build may include features and updates not yet support
37254
36867
  let o = offset;
37255
36868
  [decoded, o] = new B256Coder().decode(data, o);
37256
36869
  const txID = decoded;
37257
- [decoded, o] = new NumberCoder("u16").decode(data, o);
36870
+ [decoded, o] = new NumberCoder("u8").decode(data, o);
37258
36871
  const outputIndex = decoded;
37259
36872
  [decoded, o] = new B256Coder().decode(data, o);
37260
36873
  const owner = decoded;
@@ -37264,17 +36877,19 @@ This unreleased fuel-core build may include features and updates not yet support
37264
36877
  const assetId = decoded;
37265
36878
  [decoded, o] = new TxPointerCoder().decode(data, o);
37266
36879
  const txPointer = decoded;
37267
- [decoded, o] = new NumberCoder("u16").decode(data, o);
36880
+ [decoded, o] = new NumberCoder("u8").decode(data, o);
37268
36881
  const witnessIndex = Number(decoded);
36882
+ [decoded, o] = new NumberCoder("u32").decode(data, o);
36883
+ const maturity = decoded;
37269
36884
  [decoded, o] = new BigNumberCoder("u64").decode(data, o);
37270
36885
  const predicateGasUsed = decoded;
37271
- [decoded, o] = new BigNumberCoder("u64").decode(data, o);
36886
+ [decoded, o] = new NumberCoder("u32").decode(data, o);
37272
36887
  const predicateLength = decoded;
37273
- [decoded, o] = new BigNumberCoder("u64").decode(data, o);
36888
+ [decoded, o] = new NumberCoder("u32").decode(data, o);
37274
36889
  const predicateDataLength = decoded;
37275
- [decoded, o] = new ByteArrayCoder(predicateLength.toNumber()).decode(data, o);
36890
+ [decoded, o] = new ByteArrayCoder(predicateLength).decode(data, o);
37276
36891
  const predicate = decoded;
37277
- [decoded, o] = new ByteArrayCoder(predicateDataLength.toNumber()).decode(data, o);
36892
+ [decoded, o] = new ByteArrayCoder(predicateDataLength).decode(data, o);
37278
36893
  const predicateData = decoded;
37279
36894
  return [
37280
36895
  {
@@ -37286,6 +36901,7 @@ This unreleased fuel-core build may include features and updates not yet support
37286
36901
  assetId,
37287
36902
  txPointer,
37288
36903
  witnessIndex,
36904
+ maturity,
37289
36905
  predicateGasUsed,
37290
36906
  predicateLength,
37291
36907
  predicateDataLength,
@@ -37303,7 +36919,7 @@ This unreleased fuel-core build may include features and updates not yet support
37303
36919
  encode(value) {
37304
36920
  const parts = [];
37305
36921
  parts.push(new B256Coder().encode(value.txID));
37306
- parts.push(new NumberCoder("u16").encode(value.outputIndex));
36922
+ parts.push(new NumberCoder("u8").encode(value.outputIndex));
37307
36923
  parts.push(new B256Coder().encode(value.balanceRoot));
37308
36924
  parts.push(new B256Coder().encode(value.stateRoot));
37309
36925
  parts.push(new TxPointerCoder().encode(value.txPointer));
@@ -37315,7 +36931,7 @@ This unreleased fuel-core build may include features and updates not yet support
37315
36931
  let o = offset;
37316
36932
  [decoded, o] = new B256Coder().decode(data, o);
37317
36933
  const txID = decoded;
37318
- [decoded, o] = new NumberCoder("u16").decode(data, o);
36934
+ [decoded, o] = new NumberCoder("u8").decode(data, o);
37319
36935
  const outputIndex = decoded;
37320
36936
  [decoded, o] = new B256Coder().decode(data, o);
37321
36937
  const balanceRoot = decoded;
@@ -37364,16 +36980,14 @@ This unreleased fuel-core build may include features and updates not yet support
37364
36980
  parts.push(new ByteArrayCoder(32).encode(value.recipient));
37365
36981
  parts.push(new BigNumberCoder("u64").encode(value.amount));
37366
36982
  parts.push(new ByteArrayCoder(32).encode(value.nonce));
37367
- parts.push(new NumberCoder("u16").encode(value.witnessIndex));
36983
+ parts.push(new NumberCoder("u8").encode(value.witnessIndex));
37368
36984
  parts.push(new BigNumberCoder("u64").encode(value.predicateGasUsed));
37369
- parts.push(new BigNumberCoder("u64").encode(data.length));
37370
- parts.push(new BigNumberCoder("u64").encode(value.predicateLength));
37371
- parts.push(new BigNumberCoder("u64").encode(value.predicateDataLength));
36985
+ parts.push(new NumberCoder("u32").encode(data.length));
36986
+ parts.push(new NumberCoder("u32").encode(value.predicateLength));
36987
+ parts.push(new NumberCoder("u32").encode(value.predicateDataLength));
37372
36988
  parts.push(new ByteArrayCoder(data.length).encode(data));
37373
- parts.push(new ByteArrayCoder(value.predicateLength.toNumber()).encode(value.predicate));
37374
- parts.push(
37375
- new ByteArrayCoder(value.predicateDataLength.toNumber()).encode(value.predicateData)
37376
- );
36989
+ parts.push(new ByteArrayCoder(value.predicateLength).encode(value.predicate));
36990
+ parts.push(new ByteArrayCoder(value.predicateDataLength).encode(value.predicateData));
37377
36991
  return concat(parts);
37378
36992
  }
37379
36993
  static decodeData(messageData) {
@@ -37393,21 +37007,21 @@ This unreleased fuel-core build may include features and updates not yet support
37393
37007
  const amount = decoded;
37394
37008
  [decoded, o] = new B256Coder().decode(data, o);
37395
37009
  const nonce = decoded;
37396
- [decoded, o] = new NumberCoder("u16").decode(data, o);
37010
+ [decoded, o] = new NumberCoder("u8").decode(data, o);
37397
37011
  const witnessIndex = Number(decoded);
37398
37012
  [decoded, o] = new BigNumberCoder("u64").decode(data, o);
37399
37013
  const predicateGasUsed = decoded;
37400
37014
  [decoded, o] = new NumberCoder("u32").decode(data, o);
37401
37015
  const dataLength2 = decoded;
37402
- [decoded, o] = new BigNumberCoder("u64").decode(data, o);
37016
+ [decoded, o] = new NumberCoder("u32").decode(data, o);
37403
37017
  const predicateLength = decoded;
37404
- [decoded, o] = new BigNumberCoder("u64").decode(data, o);
37018
+ [decoded, o] = new NumberCoder("u32").decode(data, o);
37405
37019
  const predicateDataLength = decoded;
37406
37020
  [decoded, o] = new ByteArrayCoder(dataLength2).decode(data, o);
37407
37021
  const messageData = decoded;
37408
- [decoded, o] = new ByteArrayCoder(predicateLength.toNumber()).decode(data, o);
37022
+ [decoded, o] = new ByteArrayCoder(predicateLength).decode(data, o);
37409
37023
  const predicate = decoded;
37410
- [decoded, o] = new ByteArrayCoder(predicateDataLength.toNumber()).decode(data, o);
37024
+ [decoded, o] = new ByteArrayCoder(predicateDataLength).decode(data, o);
37411
37025
  const predicateData = decoded;
37412
37026
  return [
37413
37027
  {
@@ -37719,7 +37333,7 @@ This unreleased fuel-core build may include features and updates not yet support
37719
37333
  }
37720
37334
  };
37721
37335
  var PolicyType = /* @__PURE__ */ ((PolicyType2) => {
37722
- PolicyType2[PolicyType2["Tip"] = 1] = "Tip";
37336
+ PolicyType2[PolicyType2["GasPrice"] = 1] = "GasPrice";
37723
37337
  PolicyType2[PolicyType2["WitnessLimit"] = 2] = "WitnessLimit";
37724
37338
  PolicyType2[PolicyType2["Maturity"] = 4] = "Maturity";
37725
37339
  PolicyType2[PolicyType2["MaxFee"] = 8] = "MaxFee";
@@ -37767,9 +37381,9 @@ This unreleased fuel-core build may include features and updates not yet support
37767
37381
  let o = offset;
37768
37382
  const policies = [];
37769
37383
  if (policyTypes & 1) {
37770
- const [tip, nextOffset] = new BigNumberCoder("u64").decode(data, o);
37384
+ const [gasPrice, nextOffset] = new BigNumberCoder("u64").decode(data, o);
37771
37385
  o = nextOffset;
37772
- policies.push({ type: 1, data: tip });
37386
+ policies.push({ type: 1, data: gasPrice });
37773
37387
  }
37774
37388
  if (policyTypes & 2) {
37775
37389
  const [witnessLimit, nextOffset] = new BigNumberCoder("u64").decode(data, o);
@@ -38001,15 +37615,15 @@ This unreleased fuel-core build may include features and updates not yet support
38001
37615
  encode(value) {
38002
37616
  const parts = [];
38003
37617
  parts.push(new BigNumberCoder("u64").encode(value.scriptGasLimit));
38004
- parts.push(new B256Coder().encode(value.receiptsRoot));
38005
- parts.push(new BigNumberCoder("u64").encode(value.scriptLength));
38006
- parts.push(new BigNumberCoder("u64").encode(value.scriptDataLength));
37618
+ parts.push(new NumberCoder("u32").encode(value.scriptLength));
37619
+ parts.push(new NumberCoder("u32").encode(value.scriptDataLength));
38007
37620
  parts.push(new NumberCoder("u32").encode(value.policyTypes));
38008
- parts.push(new NumberCoder("u16").encode(value.inputsCount));
38009
- parts.push(new NumberCoder("u16").encode(value.outputsCount));
38010
- parts.push(new NumberCoder("u16").encode(value.witnessesCount));
38011
- parts.push(new ByteArrayCoder(value.scriptLength.toNumber()).encode(value.script));
38012
- parts.push(new ByteArrayCoder(value.scriptDataLength.toNumber()).encode(value.scriptData));
37621
+ parts.push(new NumberCoder("u8").encode(value.inputsCount));
37622
+ parts.push(new NumberCoder("u8").encode(value.outputsCount));
37623
+ parts.push(new NumberCoder("u8").encode(value.witnessesCount));
37624
+ parts.push(new B256Coder().encode(value.receiptsRoot));
37625
+ parts.push(new ByteArrayCoder(value.scriptLength).encode(value.script));
37626
+ parts.push(new ByteArrayCoder(value.scriptDataLength).encode(value.scriptData));
38013
37627
  parts.push(new PoliciesCoder().encode(value.policies));
38014
37628
  parts.push(new ArrayCoder(new InputCoder(), value.inputsCount).encode(value.inputs));
38015
37629
  parts.push(new ArrayCoder(new OutputCoder(), value.outputsCount).encode(value.outputs));
@@ -38021,23 +37635,23 @@ This unreleased fuel-core build may include features and updates not yet support
38021
37635
  let o = offset;
38022
37636
  [decoded, o] = new BigNumberCoder("u64").decode(data, o);
38023
37637
  const scriptGasLimit = decoded;
38024
- [decoded, o] = new B256Coder().decode(data, o);
38025
- const receiptsRoot = decoded;
38026
- [decoded, o] = new BigNumberCoder("u64").decode(data, o);
37638
+ [decoded, o] = new NumberCoder("u32").decode(data, o);
38027
37639
  const scriptLength = decoded;
38028
- [decoded, o] = new BigNumberCoder("u64").decode(data, o);
37640
+ [decoded, o] = new NumberCoder("u32").decode(data, o);
38029
37641
  const scriptDataLength = decoded;
38030
37642
  [decoded, o] = new NumberCoder("u32").decode(data, o);
38031
37643
  const policyTypes = decoded;
38032
- [decoded, o] = new NumberCoder("u16").decode(data, o);
37644
+ [decoded, o] = new NumberCoder("u8").decode(data, o);
38033
37645
  const inputsCount = decoded;
38034
- [decoded, o] = new NumberCoder("u16").decode(data, o);
37646
+ [decoded, o] = new NumberCoder("u8").decode(data, o);
38035
37647
  const outputsCount = decoded;
38036
- [decoded, o] = new NumberCoder("u16").decode(data, o);
37648
+ [decoded, o] = new NumberCoder("u8").decode(data, o);
38037
37649
  const witnessesCount = decoded;
38038
- [decoded, o] = new ByteArrayCoder(scriptLength.toNumber()).decode(data, o);
37650
+ [decoded, o] = new B256Coder().decode(data, o);
37651
+ const receiptsRoot = decoded;
37652
+ [decoded, o] = new ByteArrayCoder(scriptLength).decode(data, o);
38039
37653
  const script = decoded;
38040
- [decoded, o] = new ByteArrayCoder(scriptDataLength.toNumber()).decode(data, o);
37654
+ [decoded, o] = new ByteArrayCoder(scriptDataLength).decode(data, o);
38041
37655
  const scriptData = decoded;
38042
37656
  [decoded, o] = new PoliciesCoder().decode(data, o, policyTypes);
38043
37657
  const policies = decoded;
@@ -38075,19 +37689,18 @@ This unreleased fuel-core build may include features and updates not yet support
38075
37689
  }
38076
37690
  encode(value) {
38077
37691
  const parts = [];
38078
- parts.push(new NumberCoder("u16").encode(value.bytecodeWitnessIndex));
38079
- parts.push(new B256Coder().encode(value.salt));
38080
- parts.push(new BigNumberCoder("u64").encode(value.storageSlotsCount));
37692
+ parts.push(new NumberCoder("u32").encode(value.bytecodeLength));
37693
+ parts.push(new NumberCoder("u8").encode(value.bytecodeWitnessIndex));
38081
37694
  parts.push(new NumberCoder("u32").encode(value.policyTypes));
38082
- parts.push(new NumberCoder("u16").encode(value.inputsCount));
38083
- parts.push(new NumberCoder("u16").encode(value.outputsCount));
38084
- parts.push(new NumberCoder("u16").encode(value.witnessesCount));
37695
+ parts.push(new NumberCoder("u16").encode(value.storageSlotsCount));
37696
+ parts.push(new NumberCoder("u8").encode(value.inputsCount));
37697
+ parts.push(new NumberCoder("u8").encode(value.outputsCount));
37698
+ parts.push(new NumberCoder("u8").encode(value.witnessesCount));
37699
+ parts.push(new B256Coder().encode(value.salt));
37700
+ parts.push(new PoliciesCoder().encode(value.policies));
38085
37701
  parts.push(
38086
- new ArrayCoder(new StorageSlotCoder(), value.storageSlotsCount.toNumber()).encode(
38087
- value.storageSlots
38088
- )
37702
+ new ArrayCoder(new StorageSlotCoder(), value.storageSlotsCount).encode(value.storageSlots)
38089
37703
  );
38090
- parts.push(new PoliciesCoder().encode(value.policies));
38091
37704
  parts.push(new ArrayCoder(new InputCoder(), value.inputsCount).encode(value.inputs));
38092
37705
  parts.push(new ArrayCoder(new OutputCoder(), value.outputsCount).encode(value.outputs));
38093
37706
  parts.push(new ArrayCoder(new WitnessCoder(), value.witnessesCount).encode(value.witnesses));
@@ -38096,27 +37709,26 @@ This unreleased fuel-core build may include features and updates not yet support
38096
37709
  decode(data, offset) {
38097
37710
  let decoded;
38098
37711
  let o = offset;
38099
- [decoded, o] = new NumberCoder("u16").decode(data, o);
37712
+ [decoded, o] = new NumberCoder("u32").decode(data, o);
37713
+ const bytecodeLength = decoded;
37714
+ [decoded, o] = new NumberCoder("u8").decode(data, o);
38100
37715
  const bytecodeWitnessIndex = decoded;
38101
- [decoded, o] = new B256Coder().decode(data, o);
38102
- const salt = decoded;
38103
- [decoded, o] = new BigNumberCoder("u64").decode(data, o);
38104
- const storageSlotsCount = decoded;
38105
37716
  [decoded, o] = new NumberCoder("u32").decode(data, o);
38106
37717
  const policyTypes = decoded;
38107
37718
  [decoded, o] = new NumberCoder("u16").decode(data, o);
37719
+ const storageSlotsCount = decoded;
37720
+ [decoded, o] = new NumberCoder("u8").decode(data, o);
38108
37721
  const inputsCount = decoded;
38109
- [decoded, o] = new NumberCoder("u16").decode(data, o);
37722
+ [decoded, o] = new NumberCoder("u8").decode(data, o);
38110
37723
  const outputsCount = decoded;
38111
- [decoded, o] = new NumberCoder("u16").decode(data, o);
37724
+ [decoded, o] = new NumberCoder("u8").decode(data, o);
38112
37725
  const witnessesCount = decoded;
38113
- [decoded, o] = new ArrayCoder(new StorageSlotCoder(), storageSlotsCount.toNumber()).decode(
38114
- data,
38115
- o
38116
- );
38117
- const storageSlots = decoded;
37726
+ [decoded, o] = new B256Coder().decode(data, o);
37727
+ const salt = decoded;
38118
37728
  [decoded, o] = new PoliciesCoder().decode(data, o, policyTypes);
38119
37729
  const policies = decoded;
37730
+ [decoded, o] = new ArrayCoder(new StorageSlotCoder(), storageSlotsCount).decode(data, o);
37731
+ const storageSlots = decoded;
38120
37732
  [decoded, o] = new ArrayCoder(new InputCoder(), inputsCount).decode(data, o);
38121
37733
  const inputs = decoded;
38122
37734
  [decoded, o] = new ArrayCoder(new OutputCoder(), outputsCount).decode(data, o);
@@ -38126,6 +37738,7 @@ This unreleased fuel-core build may include features and updates not yet support
38126
37738
  return [
38127
37739
  {
38128
37740
  type: 1,
37741
+ bytecodeLength,
38129
37742
  bytecodeWitnessIndex,
38130
37743
  policyTypes,
38131
37744
  storageSlotsCount,
@@ -38154,7 +37767,6 @@ This unreleased fuel-core build may include features and updates not yet support
38154
37767
  parts.push(new OutputContractCoder().encode(value.outputContract));
38155
37768
  parts.push(new BigNumberCoder("u64").encode(value.mintAmount));
38156
37769
  parts.push(new B256Coder().encode(value.mintAssetId));
38157
- parts.push(new BigNumberCoder("u64").encode(value.gasPrice));
38158
37770
  return concat(parts);
38159
37771
  }
38160
37772
  decode(data, offset) {
@@ -38170,8 +37782,6 @@ This unreleased fuel-core build may include features and updates not yet support
38170
37782
  const mintAmount = decoded;
38171
37783
  [decoded, o] = new B256Coder().decode(data, o);
38172
37784
  const mintAssetId = decoded;
38173
- [decoded, o] = new BigNumberCoder("u64").decode(data, o);
38174
- const gasPrice = decoded;
38175
37785
  return [
38176
37786
  {
38177
37787
  type: 2,
@@ -38179,8 +37789,7 @@ This unreleased fuel-core build may include features and updates not yet support
38179
37789
  inputContract,
38180
37790
  outputContract,
38181
37791
  mintAmount,
38182
- mintAssetId,
38183
- gasPrice
37792
+ mintAssetId
38184
37793
  },
38185
37794
  o
38186
37795
  ];
@@ -38487,6 +38096,159 @@ This unreleased fuel-core build may include features and updates not yet support
38487
38096
  // src/providers/provider.ts
38488
38097
  var import_graphql_request = __toESM(require_dist2());
38489
38098
 
38099
+ // ../../node_modules/.pnpm/ramda@0.29.0/node_modules/ramda/es/internal/_isPlaceholder.js
38100
+ function _isPlaceholder(a) {
38101
+ return a != null && typeof a === "object" && a["@@functional/placeholder"] === true;
38102
+ }
38103
+
38104
+ // ../../node_modules/.pnpm/ramda@0.29.0/node_modules/ramda/es/internal/_curry1.js
38105
+ function _curry1(fn) {
38106
+ return function f1(a) {
38107
+ if (arguments.length === 0 || _isPlaceholder(a)) {
38108
+ return f1;
38109
+ } else {
38110
+ return fn.apply(this, arguments);
38111
+ }
38112
+ };
38113
+ }
38114
+
38115
+ // ../../node_modules/.pnpm/ramda@0.29.0/node_modules/ramda/es/internal/_isArray.js
38116
+ var isArray_default = Array.isArray || function _isArray(val) {
38117
+ return val != null && val.length >= 0 && Object.prototype.toString.call(val) === "[object Array]";
38118
+ };
38119
+
38120
+ // ../../node_modules/.pnpm/ramda@0.29.0/node_modules/ramda/es/type.js
38121
+ var type = /* @__PURE__ */ _curry1(function type2(val) {
38122
+ return val === null ? "Null" : val === void 0 ? "Undefined" : Object.prototype.toString.call(val).slice(8, -1);
38123
+ });
38124
+ var type_default = type;
38125
+
38126
+ // ../../node_modules/.pnpm/ramda@0.29.0/node_modules/ramda/es/internal/_toISOString.js
38127
+ var pad = function pad2(n) {
38128
+ return (n < 10 ? "0" : "") + n;
38129
+ };
38130
+ var _toISOString = typeof Date.prototype.toISOString === "function" ? function _toISOString2(d) {
38131
+ return d.toISOString();
38132
+ } : function _toISOString3(d) {
38133
+ 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";
38134
+ };
38135
+
38136
+ // ../../node_modules/.pnpm/ramda@0.29.0/node_modules/ramda/es/internal/_isInteger.js
38137
+ var isInteger_default = Number.isInteger || function _isInteger(n) {
38138
+ return n << 0 === n;
38139
+ };
38140
+
38141
+ // ../../node_modules/.pnpm/ramda@0.29.0/node_modules/ramda/es/internal/_cloneRegExp.js
38142
+ function _cloneRegExp(pattern) {
38143
+ 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" : ""));
38144
+ }
38145
+
38146
+ // ../../node_modules/.pnpm/ramda@0.29.0/node_modules/ramda/es/internal/_clone.js
38147
+ function _clone(value, deep, map) {
38148
+ map || (map = new _ObjectMap());
38149
+ if (_isPrimitive(value)) {
38150
+ return value;
38151
+ }
38152
+ var copy = function copy2(copiedValue) {
38153
+ var cachedCopy = map.get(value);
38154
+ if (cachedCopy) {
38155
+ return cachedCopy;
38156
+ }
38157
+ map.set(value, copiedValue);
38158
+ for (var key in value) {
38159
+ if (Object.prototype.hasOwnProperty.call(value, key)) {
38160
+ copiedValue[key] = deep ? _clone(value[key], true, map) : value[key];
38161
+ }
38162
+ }
38163
+ return copiedValue;
38164
+ };
38165
+ switch (type_default(value)) {
38166
+ case "Object":
38167
+ return copy(Object.create(Object.getPrototypeOf(value)));
38168
+ case "Array":
38169
+ return copy([]);
38170
+ case "Date":
38171
+ return new Date(value.valueOf());
38172
+ case "RegExp":
38173
+ return _cloneRegExp(value);
38174
+ case "Int8Array":
38175
+ case "Uint8Array":
38176
+ case "Uint8ClampedArray":
38177
+ case "Int16Array":
38178
+ case "Uint16Array":
38179
+ case "Int32Array":
38180
+ case "Uint32Array":
38181
+ case "Float32Array":
38182
+ case "Float64Array":
38183
+ case "BigInt64Array":
38184
+ case "BigUint64Array":
38185
+ return value.slice();
38186
+ default:
38187
+ return value;
38188
+ }
38189
+ }
38190
+ function _isPrimitive(param) {
38191
+ var type3 = typeof param;
38192
+ return param == null || type3 != "object" && type3 != "function";
38193
+ }
38194
+ var _ObjectMap = /* @__PURE__ */ function() {
38195
+ function _ObjectMap2() {
38196
+ this.map = {};
38197
+ this.length = 0;
38198
+ }
38199
+ _ObjectMap2.prototype.set = function(key, value) {
38200
+ const hashedKey = this.hash(key);
38201
+ let bucket = this.map[hashedKey];
38202
+ if (!bucket) {
38203
+ this.map[hashedKey] = bucket = [];
38204
+ }
38205
+ bucket.push([key, value]);
38206
+ this.length += 1;
38207
+ };
38208
+ _ObjectMap2.prototype.hash = function(key) {
38209
+ let hashedKey = [];
38210
+ for (var value in key) {
38211
+ hashedKey.push(Object.prototype.toString.call(key[value]));
38212
+ }
38213
+ return hashedKey.join();
38214
+ };
38215
+ _ObjectMap2.prototype.get = function(key) {
38216
+ if (this.length <= 180) {
38217
+ for (const p in this.map) {
38218
+ const bucket2 = this.map[p];
38219
+ for (let i = 0; i < bucket2.length; i += 1) {
38220
+ const element = bucket2[i];
38221
+ if (element[0] === key) {
38222
+ return element[1];
38223
+ }
38224
+ }
38225
+ }
38226
+ return;
38227
+ }
38228
+ const hashedKey = this.hash(key);
38229
+ const bucket = this.map[hashedKey];
38230
+ if (!bucket) {
38231
+ return;
38232
+ }
38233
+ for (let i = 0; i < bucket.length; i += 1) {
38234
+ const element = bucket[i];
38235
+ if (element[0] === key) {
38236
+ return element[1];
38237
+ }
38238
+ }
38239
+ };
38240
+ return _ObjectMap2;
38241
+ }();
38242
+
38243
+ // ../../node_modules/.pnpm/ramda@0.29.0/node_modules/ramda/es/clone.js
38244
+ var clone2 = /* @__PURE__ */ _curry1(function clone3(value) {
38245
+ return value != null && typeof value.clone === "function" ? value.clone() : _clone(value, true);
38246
+ });
38247
+ var clone_default = clone2;
38248
+
38249
+ // ../../node_modules/.pnpm/ramda@0.29.0/node_modules/ramda/es/trim.js
38250
+ var hasProtoTrim = typeof String.prototype.trim === "function";
38251
+
38490
38252
  // ../../node_modules/.pnpm/tslib@2.6.0/node_modules/tslib/tslib.es6.mjs
38491
38253
  var __assign = function() {
38492
38254
  __assign = Object.assign || function __assign2(t) {
@@ -38501,7 +38263,7 @@ This unreleased fuel-core build may include features and updates not yet support
38501
38263
  return __assign.apply(this, arguments);
38502
38264
  };
38503
38265
 
38504
- // ../../node_modules/.pnpm/graphql@16.6.0/node_modules/graphql/jsutils/devAssert.mjs
38266
+ // ../../node_modules/.pnpm/graphql@16.8.1/node_modules/graphql/jsutils/devAssert.mjs
38505
38267
  function devAssert(condition, message) {
38506
38268
  const booleanCondition = Boolean(condition);
38507
38269
  if (!booleanCondition) {
@@ -38509,12 +38271,12 @@ This unreleased fuel-core build may include features and updates not yet support
38509
38271
  }
38510
38272
  }
38511
38273
 
38512
- // ../../node_modules/.pnpm/graphql@16.6.0/node_modules/graphql/jsutils/isObjectLike.mjs
38274
+ // ../../node_modules/.pnpm/graphql@16.8.1/node_modules/graphql/jsutils/isObjectLike.mjs
38513
38275
  function isObjectLike(value) {
38514
38276
  return typeof value == "object" && value !== null;
38515
38277
  }
38516
38278
 
38517
- // ../../node_modules/.pnpm/graphql@16.6.0/node_modules/graphql/jsutils/invariant.mjs
38279
+ // ../../node_modules/.pnpm/graphql@16.8.1/node_modules/graphql/jsutils/invariant.mjs
38518
38280
  function invariant(condition, message) {
38519
38281
  const booleanCondition = Boolean(condition);
38520
38282
  if (!booleanCondition) {
@@ -38524,7 +38286,7 @@ This unreleased fuel-core build may include features and updates not yet support
38524
38286
  }
38525
38287
  }
38526
38288
 
38527
- // ../../node_modules/.pnpm/graphql@16.6.0/node_modules/graphql/language/location.mjs
38289
+ // ../../node_modules/.pnpm/graphql@16.8.1/node_modules/graphql/language/location.mjs
38528
38290
  var LineRegExp = /\r\n|[\n\r]/g;
38529
38291
  function getLocation(source, position) {
38530
38292
  let lastLineStart = 0;
@@ -38543,7 +38305,7 @@ This unreleased fuel-core build may include features and updates not yet support
38543
38305
  };
38544
38306
  }
38545
38307
 
38546
- // ../../node_modules/.pnpm/graphql@16.6.0/node_modules/graphql/language/printLocation.mjs
38308
+ // ../../node_modules/.pnpm/graphql@16.8.1/node_modules/graphql/language/printLocation.mjs
38547
38309
  function printLocation(location) {
38548
38310
  return printSourceLocation(
38549
38311
  location.source,
@@ -38590,7 +38352,7 @@ This unreleased fuel-core build may include features and updates not yet support
38590
38352
  return existingLines.map(([prefix, line]) => prefix.padStart(padLen) + (line ? " " + line : "")).join("\n");
38591
38353
  }
38592
38354
 
38593
- // ../../node_modules/.pnpm/graphql@16.6.0/node_modules/graphql/error/GraphQLError.mjs
38355
+ // ../../node_modules/.pnpm/graphql@16.8.1/node_modules/graphql/error/GraphQLError.mjs
38594
38356
  function toNormalizedOptions(args) {
38595
38357
  const firstArg = args[0];
38596
38358
  if (firstArg == null || "kind" in firstArg || "length" in firstArg) {
@@ -38739,7 +38501,7 @@ This unreleased fuel-core build may include features and updates not yet support
38739
38501
  return array === void 0 || array.length === 0 ? void 0 : array;
38740
38502
  }
38741
38503
 
38742
- // ../../node_modules/.pnpm/graphql@16.6.0/node_modules/graphql/error/syntaxError.mjs
38504
+ // ../../node_modules/.pnpm/graphql@16.8.1/node_modules/graphql/error/syntaxError.mjs
38743
38505
  function syntaxError(source, position, description) {
38744
38506
  return new GraphQLError(`Syntax Error: ${description}`, {
38745
38507
  source,
@@ -38747,7 +38509,7 @@ This unreleased fuel-core build may include features and updates not yet support
38747
38509
  });
38748
38510
  }
38749
38511
 
38750
- // ../../node_modules/.pnpm/graphql@16.6.0/node_modules/graphql/language/ast.mjs
38512
+ // ../../node_modules/.pnpm/graphql@16.8.1/node_modules/graphql/language/ast.mjs
38751
38513
  var Location = class {
38752
38514
  /**
38753
38515
  * The character offset at which this Node begins.
@@ -38917,7 +38679,7 @@ This unreleased fuel-core build may include features and updates not yet support
38917
38679
  OperationTypeNode2["SUBSCRIPTION"] = "subscription";
38918
38680
  })(OperationTypeNode || (OperationTypeNode = {}));
38919
38681
 
38920
- // ../../node_modules/.pnpm/graphql@16.6.0/node_modules/graphql/language/directiveLocation.mjs
38682
+ // ../../node_modules/.pnpm/graphql@16.8.1/node_modules/graphql/language/directiveLocation.mjs
38921
38683
  var DirectiveLocation;
38922
38684
  (function(DirectiveLocation2) {
38923
38685
  DirectiveLocation2["QUERY"] = "QUERY";
@@ -38941,7 +38703,7 @@ This unreleased fuel-core build may include features and updates not yet support
38941
38703
  DirectiveLocation2["INPUT_FIELD_DEFINITION"] = "INPUT_FIELD_DEFINITION";
38942
38704
  })(DirectiveLocation || (DirectiveLocation = {}));
38943
38705
 
38944
- // ../../node_modules/.pnpm/graphql@16.6.0/node_modules/graphql/language/kinds.mjs
38706
+ // ../../node_modules/.pnpm/graphql@16.8.1/node_modules/graphql/language/kinds.mjs
38945
38707
  var Kind;
38946
38708
  (function(Kind2) {
38947
38709
  Kind2["NAME"] = "Name";
@@ -38989,7 +38751,7 @@ This unreleased fuel-core build may include features and updates not yet support
38989
38751
  Kind2["INPUT_OBJECT_TYPE_EXTENSION"] = "InputObjectTypeExtension";
38990
38752
  })(Kind || (Kind = {}));
38991
38753
 
38992
- // ../../node_modules/.pnpm/graphql@16.6.0/node_modules/graphql/language/characterClasses.mjs
38754
+ // ../../node_modules/.pnpm/graphql@16.8.1/node_modules/graphql/language/characterClasses.mjs
38993
38755
  function isWhiteSpace(code) {
38994
38756
  return code === 9 || code === 32;
38995
38757
  }
@@ -39007,7 +38769,7 @@ This unreleased fuel-core build may include features and updates not yet support
39007
38769
  return isLetter(code) || isDigit(code) || code === 95;
39008
38770
  }
39009
38771
 
39010
- // ../../node_modules/.pnpm/graphql@16.6.0/node_modules/graphql/language/blockString.mjs
38772
+ // ../../node_modules/.pnpm/graphql@16.8.1/node_modules/graphql/language/blockString.mjs
39011
38773
  function dedentBlockStringLines(lines) {
39012
38774
  var _firstNonEmptyLine2;
39013
38775
  let commonIndent = Number.MAX_SAFE_INTEGER;
@@ -39061,7 +38823,7 @@ This unreleased fuel-core build may include features and updates not yet support
39061
38823
  return '"""' + result + '"""';
39062
38824
  }
39063
38825
 
39064
- // ../../node_modules/.pnpm/graphql@16.6.0/node_modules/graphql/language/tokenKind.mjs
38826
+ // ../../node_modules/.pnpm/graphql@16.8.1/node_modules/graphql/language/tokenKind.mjs
39065
38827
  var TokenKind;
39066
38828
  (function(TokenKind2) {
39067
38829
  TokenKind2["SOF"] = "<SOF>";
@@ -39088,7 +38850,7 @@ This unreleased fuel-core build may include features and updates not yet support
39088
38850
  TokenKind2["COMMENT"] = "Comment";
39089
38851
  })(TokenKind || (TokenKind = {}));
39090
38852
 
39091
- // ../../node_modules/.pnpm/graphql@16.6.0/node_modules/graphql/language/lexer.mjs
38853
+ // ../../node_modules/.pnpm/graphql@16.8.1/node_modules/graphql/language/lexer.mjs
39092
38854
  var Lexer = class {
39093
38855
  /**
39094
38856
  * The previously focused non-ignored token.
@@ -39589,7 +39351,7 @@ This unreleased fuel-core build may include features and updates not yet support
39589
39351
  );
39590
39352
  }
39591
39353
 
39592
- // ../../node_modules/.pnpm/graphql@16.6.0/node_modules/graphql/jsutils/inspect.mjs
39354
+ // ../../node_modules/.pnpm/graphql@16.8.1/node_modules/graphql/jsutils/inspect.mjs
39593
39355
  var MAX_ARRAY_LENGTH = 10;
39594
39356
  var MAX_RECURSIVE_DEPTH = 2;
39595
39357
  function inspect(value) {
@@ -39672,12 +39434,11 @@ This unreleased fuel-core build may include features and updates not yet support
39672
39434
  return tag;
39673
39435
  }
39674
39436
 
39675
- // ../../node_modules/.pnpm/graphql@16.6.0/node_modules/graphql/jsutils/instanceOf.mjs
39437
+ // ../../node_modules/.pnpm/graphql@16.8.1/node_modules/graphql/jsutils/instanceOf.mjs
39676
39438
  var instanceOf = (
39677
39439
  /* c8 ignore next 6 */
39678
39440
  // FIXME: https://github.com/graphql/graphql-js/issues/2317
39679
- // eslint-disable-next-line no-undef
39680
- process.env.NODE_ENV === "production" ? function instanceOf2(value, constructor) {
39441
+ globalThis.process && globalThis.process.env.NODE_ENV === "production" ? function instanceOf2(value, constructor) {
39681
39442
  return value instanceof constructor;
39682
39443
  } : function instanceOf3(value, constructor) {
39683
39444
  if (value instanceof constructor) {
@@ -39710,7 +39471,7 @@ spurious results.`);
39710
39471
  }
39711
39472
  );
39712
39473
 
39713
- // ../../node_modules/.pnpm/graphql@16.6.0/node_modules/graphql/language/source.mjs
39474
+ // ../../node_modules/.pnpm/graphql@16.8.1/node_modules/graphql/language/source.mjs
39714
39475
  var Source = class {
39715
39476
  constructor(body, name = "GraphQL request", locationOffset = {
39716
39477
  line: 1,
@@ -39737,7 +39498,7 @@ spurious results.`);
39737
39498
  return instanceOf(source, Source);
39738
39499
  }
39739
39500
 
39740
- // ../../node_modules/.pnpm/graphql@16.6.0/node_modules/graphql/language/parser.mjs
39501
+ // ../../node_modules/.pnpm/graphql@16.8.1/node_modules/graphql/language/parser.mjs
39741
39502
  function parse(source, options) {
39742
39503
  const parser = new Parser(source, options);
39743
39504
  return parser.parseDocument();
@@ -40986,7 +40747,7 @@ spurious results.`);
40986
40747
  return isPunctuatorTokenKind(kind) ? `"${kind}"` : kind;
40987
40748
  }
40988
40749
 
40989
- // ../../node_modules/.pnpm/graphql@16.6.0/node_modules/graphql/language/printString.mjs
40750
+ // ../../node_modules/.pnpm/graphql@16.8.1/node_modules/graphql/language/printString.mjs
40990
40751
  function printString(str) {
40991
40752
  return `"${str.replace(escapedRegExp, escapedReplacer)}"`;
40992
40753
  }
@@ -41162,7 +40923,7 @@ spurious results.`);
41162
40923
  "\\u009F"
41163
40924
  ];
41164
40925
 
41165
- // ../../node_modules/.pnpm/graphql@16.6.0/node_modules/graphql/language/visitor.mjs
40926
+ // ../../node_modules/.pnpm/graphql@16.8.1/node_modules/graphql/language/visitor.mjs
41166
40927
  var BREAK = Object.freeze({});
41167
40928
  function visit(root, visitor, visitorKeys = QueryDocumentKeys) {
41168
40929
  const enterLeaveMap = /* @__PURE__ */ new Map();
@@ -41294,7 +41055,7 @@ spurious results.`);
41294
41055
  };
41295
41056
  }
41296
41057
 
41297
- // ../../node_modules/.pnpm/graphql@16.6.0/node_modules/graphql/language/printer.mjs
41058
+ // ../../node_modules/.pnpm/graphql@16.8.1/node_modules/graphql/language/printer.mjs
41298
41059
  function print(ast) {
41299
41060
  return visit(ast, printDocASTReducer);
41300
41061
  }
@@ -41536,7 +41297,7 @@ spurious results.`);
41536
41297
  return (_maybeArray$some = maybeArray === null || maybeArray === void 0 ? void 0 : maybeArray.some((str) => str.includes("\n"))) !== null && _maybeArray$some !== void 0 ? _maybeArray$some : false;
41537
41298
  }
41538
41299
 
41539
- // ../../node_modules/.pnpm/graphql-tag@2.12.6_graphql@16.6.0/node_modules/graphql-tag/lib/index.js
41300
+ // ../../node_modules/.pnpm/graphql-tag@2.12.6_graphql@16.8.1/node_modules/graphql-tag/lib/index.js
41540
41301
  var docCache = /* @__PURE__ */ new Map();
41541
41302
  var fragmentSourceMap = /* @__PURE__ */ new Map();
41542
41303
  var printFragmentWarnings = true;
@@ -41652,8 +41413,44 @@ spurious results.`);
41652
41413
  var lib_default2 = gql;
41653
41414
 
41654
41415
  // src/providers/__generated__/operations.ts
41655
- var TransactionStatusSubscriptionFragmentFragmentDoc = lib_default2`
41656
- fragment transactionStatusSubscriptionFragment on TransactionStatus {
41416
+ var ReceiptFragmentFragmentDoc = lib_default2`
41417
+ fragment receiptFragment on Receipt {
41418
+ contract {
41419
+ id
41420
+ }
41421
+ pc
41422
+ is
41423
+ to {
41424
+ id
41425
+ }
41426
+ toAddress
41427
+ amount
41428
+ assetId
41429
+ gas
41430
+ param1
41431
+ param2
41432
+ val
41433
+ ptr
41434
+ digest
41435
+ reason
41436
+ ra
41437
+ rb
41438
+ rc
41439
+ rd
41440
+ len
41441
+ receiptType
41442
+ result
41443
+ gasUsed
41444
+ data
41445
+ sender
41446
+ recipient
41447
+ nonce
41448
+ contractId
41449
+ subId
41450
+ }
41451
+ `;
41452
+ var TransactionStatusFragmentFragmentDoc = lib_default2`
41453
+ fragment transactionStatusFragment on TransactionStatus {
41657
41454
  type: __typename
41658
41455
  ... on SubmittedStatus {
41659
41456
  time
@@ -41680,84 +41477,20 @@ spurious results.`);
41680
41477
  }
41681
41478
  }
41682
41479
  `;
41683
- var ReceiptFragmentFragmentDoc = lib_default2`
41684
- fragment receiptFragment on Receipt {
41685
- id
41686
- pc
41687
- is
41688
- to
41689
- toAddress
41690
- amount
41691
- assetId
41692
- gas
41693
- param1
41694
- param2
41695
- val
41696
- ptr
41697
- digest
41698
- reason
41699
- ra
41700
- rb
41701
- rc
41702
- rd
41703
- len
41704
- receiptType
41705
- result
41706
- gasUsed
41707
- data
41708
- sender
41709
- recipient
41710
- nonce
41711
- contractId
41712
- subId
41713
- }
41714
- `;
41715
- var TransactionStatusFragmentFragmentDoc = lib_default2`
41716
- fragment transactionStatusFragment on TransactionStatus {
41717
- type: __typename
41718
- ... on SubmittedStatus {
41719
- time
41720
- }
41721
- ... on SuccessStatus {
41722
- block {
41723
- id
41724
- }
41725
- time
41726
- receipts {
41727
- ...receiptFragment
41728
- }
41729
- programState {
41730
- returnType
41731
- data
41732
- }
41733
- receipts {
41734
- ...receiptFragment
41735
- }
41736
- }
41737
- ... on FailureStatus {
41738
- block {
41739
- id
41740
- }
41741
- time
41742
- reason
41743
- receipts {
41744
- ...receiptFragment
41745
- }
41746
- }
41747
- ... on SqueezedOutStatus {
41748
- reason
41749
- }
41750
- }
41751
- ${ReceiptFragmentFragmentDoc}`;
41752
41480
  var TransactionFragmentFragmentDoc = lib_default2`
41753
41481
  fragment transactionFragment on Transaction {
41754
41482
  id
41755
41483
  rawPayload
41484
+ gasPrice
41485
+ receipts {
41486
+ ...receiptFragment
41487
+ }
41756
41488
  status {
41757
41489
  ...transactionStatusFragment
41758
41490
  }
41759
41491
  }
41760
- ${TransactionStatusFragmentFragmentDoc}`;
41492
+ ${ReceiptFragmentFragmentDoc}
41493
+ ${TransactionStatusFragmentFragmentDoc}`;
41761
41494
  var InputEstimatePredicatesFragmentFragmentDoc = lib_default2`
41762
41495
  fragment inputEstimatePredicatesFragment on Input {
41763
41496
  ... on InputCoin {
@@ -41775,46 +41508,6 @@ spurious results.`);
41775
41508
  }
41776
41509
  }
41777
41510
  ${InputEstimatePredicatesFragmentFragmentDoc}`;
41778
- var DryRunFailureStatusFragmentFragmentDoc = lib_default2`
41779
- fragment dryRunFailureStatusFragment on DryRunFailureStatus {
41780
- reason
41781
- programState {
41782
- returnType
41783
- data
41784
- }
41785
- }
41786
- `;
41787
- var DryRunSuccessStatusFragmentFragmentDoc = lib_default2`
41788
- fragment dryRunSuccessStatusFragment on DryRunSuccessStatus {
41789
- programState {
41790
- returnType
41791
- data
41792
- }
41793
- }
41794
- `;
41795
- var DryRunTransactionStatusFragmentFragmentDoc = lib_default2`
41796
- fragment dryRunTransactionStatusFragment on DryRunTransactionStatus {
41797
- ... on DryRunFailureStatus {
41798
- ...dryRunFailureStatusFragment
41799
- }
41800
- ... on DryRunSuccessStatus {
41801
- ...dryRunSuccessStatusFragment
41802
- }
41803
- }
41804
- ${DryRunFailureStatusFragmentFragmentDoc}
41805
- ${DryRunSuccessStatusFragmentFragmentDoc}`;
41806
- var DryRunTransactionExecutionStatusFragmentFragmentDoc = lib_default2`
41807
- fragment dryRunTransactionExecutionStatusFragment on DryRunTransactionExecutionStatus {
41808
- id
41809
- status {
41810
- ...dryRunTransactionStatusFragment
41811
- }
41812
- receipts {
41813
- ...receiptFragment
41814
- }
41815
- }
41816
- ${DryRunTransactionStatusFragmentFragmentDoc}
41817
- ${ReceiptFragmentFragmentDoc}`;
41818
41511
  var CoinFragmentFragmentDoc = lib_default2`
41819
41512
  fragment coinFragment on Coin {
41820
41513
  __typename
@@ -41822,6 +41515,7 @@ ${ReceiptFragmentFragmentDoc}`;
41822
41515
  owner
41823
41516
  amount
41824
41517
  assetId
41518
+ maturity
41825
41519
  blockCreated
41826
41520
  txCreatedIdx
41827
41521
  }
@@ -41860,32 +41554,26 @@ ${ReceiptFragmentFragmentDoc}`;
41860
41554
  messageBlockHeader {
41861
41555
  id
41862
41556
  daHeight
41863
- consensusParametersVersion
41864
- stateTransitionBytecodeVersion
41865
41557
  transactionsCount
41866
- messageReceiptCount
41867
41558
  transactionsRoot
41868
- messageOutboxRoot
41869
- eventInboxRoot
41870
41559
  height
41871
41560
  prevRoot
41872
41561
  time
41873
41562
  applicationHash
41563
+ messageReceiptRoot
41564
+ messageReceiptCount
41874
41565
  }
41875
41566
  commitBlockHeader {
41876
41567
  id
41877
41568
  daHeight
41878
- consensusParametersVersion
41879
- stateTransitionBytecodeVersion
41880
41569
  transactionsCount
41881
- messageReceiptCount
41882
41570
  transactionsRoot
41883
- messageOutboxRoot
41884
- eventInboxRoot
41885
41571
  height
41886
41572
  prevRoot
41887
41573
  time
41888
41574
  applicationHash
41575
+ messageReceiptRoot
41576
+ messageReceiptCount
41889
41577
  }
41890
41578
  sender
41891
41579
  recipient
@@ -41904,8 +41592,8 @@ ${ReceiptFragmentFragmentDoc}`;
41904
41592
  var BlockFragmentFragmentDoc = lib_default2`
41905
41593
  fragment blockFragment on Block {
41906
41594
  id
41907
- height
41908
41595
  header {
41596
+ height
41909
41597
  time
41910
41598
  }
41911
41599
  transactions {
@@ -41963,11 +41651,6 @@ ${ReceiptFragmentFragmentDoc}`;
41963
41651
  `;
41964
41652
  var GasCostsFragmentFragmentDoc = lib_default2`
41965
41653
  fragment GasCostsFragment on GasCosts {
41966
- version {
41967
- ... on Version {
41968
- value
41969
- }
41970
- }
41971
41654
  add
41972
41655
  addi
41973
41656
  aloc
@@ -41980,6 +41663,7 @@ ${ReceiptFragmentFragmentDoc}`;
41980
41663
  cb
41981
41664
  cfei
41982
41665
  cfsi
41666
+ croo
41983
41667
  div
41984
41668
  divi
41985
41669
  ecr1
@@ -42062,9 +41746,6 @@ ${ReceiptFragmentFragmentDoc}`;
42062
41746
  ccp {
42063
41747
  ...DependentCostFragment
42064
41748
  }
42065
- croo {
42066
- ...DependentCostFragment
42067
- }
42068
41749
  csiz {
42069
41750
  ...DependentCostFragment
42070
41751
  }
@@ -42124,11 +41805,6 @@ ${ReceiptFragmentFragmentDoc}`;
42124
41805
  ${DependentCostFragmentFragmentDoc}`;
42125
41806
  var ConsensusParametersFragmentFragmentDoc = lib_default2`
42126
41807
  fragment consensusParametersFragment on ConsensusParameters {
42127
- version {
42128
- ... on Version {
42129
- value
42130
- }
42131
- }
42132
41808
  txParams {
42133
41809
  ...TxParametersFragment
42134
41810
  }
@@ -42188,9 +41864,18 @@ ${ConsensusParametersFragmentFragmentDoc}`;
42188
41864
  fragment nodeInfoFragment on NodeInfo {
42189
41865
  utxoValidation
42190
41866
  vmBacktrace
41867
+ minGasPrice
42191
41868
  maxTx
42192
41869
  maxDepth
42193
41870
  nodeVersion
41871
+ peers {
41872
+ id
41873
+ addresses
41874
+ clientVersion
41875
+ blockHeight
41876
+ lastHeartbeatMs
41877
+ appScore
41878
+ }
42194
41879
  }
42195
41880
  `;
42196
41881
  var GetVersionDocument = lib_default2`
@@ -42225,9 +41910,13 @@ ${ConsensusParametersFragmentFragmentDoc}`;
42225
41910
  query getTransactionWithReceipts($transactionId: TransactionId!) {
42226
41911
  transaction(id: $transactionId) {
42227
41912
  ...transactionFragment
41913
+ receipts {
41914
+ ...receiptFragment
41915
+ }
42228
41916
  }
42229
41917
  }
42230
- ${TransactionFragmentFragmentDoc}`;
41918
+ ${TransactionFragmentFragmentDoc}
41919
+ ${ReceiptFragmentFragmentDoc}`;
42231
41920
  var GetTransactionsDocument = lib_default2`
42232
41921
  query getTransactions($after: String, $before: String, $first: Int, $last: Int) {
42233
41922
  transactions(after: $after, before: $before, first: $first, last: $last) {
@@ -42355,20 +42044,6 @@ ${MessageCoinFragmentFragmentDoc}`;
42355
42044
  }
42356
42045
  }
42357
42046
  ${BalanceFragmentFragmentDoc}`;
42358
- var GetLatestGasPriceDocument = lib_default2`
42359
- query getLatestGasPrice {
42360
- latestGasPrice {
42361
- gasPrice
42362
- }
42363
- }
42364
- `;
42365
- var EstimateGasPriceDocument = lib_default2`
42366
- query estimateGasPrice($blockHorizon: U32!) {
42367
- estimateGasPrice(blockHorizon: $blockHorizon) {
42368
- gasPrice
42369
- }
42370
- }
42371
- `;
42372
42047
  var GetBalancesDocument = lib_default2`
42373
42048
  query getBalances($filter: BalanceFilterInput!, $after: String, $before: String, $first: Int, $last: Int) {
42374
42049
  balances(
@@ -42423,12 +42098,12 @@ ${MessageCoinFragmentFragmentDoc}`;
42423
42098
  }
42424
42099
  `;
42425
42100
  var DryRunDocument = lib_default2`
42426
- mutation dryRun($encodedTransactions: [HexString!]!, $utxoValidation: Boolean) {
42427
- dryRun(txs: $encodedTransactions, utxoValidation: $utxoValidation) {
42428
- ...dryRunTransactionExecutionStatusFragment
42101
+ mutation dryRun($encodedTransaction: HexString!, $utxoValidation: Boolean) {
42102
+ dryRun(tx: $encodedTransaction, utxoValidation: $utxoValidation) {
42103
+ ...receiptFragment
42429
42104
  }
42430
42105
  }
42431
- ${DryRunTransactionExecutionStatusFragmentFragmentDoc}`;
42106
+ ${ReceiptFragmentFragmentDoc}`;
42432
42107
  var SubmitDocument = lib_default2`
42433
42108
  mutation submit($encodedTransaction: HexString!) {
42434
42109
  submit(tx: $encodedTransaction) {
@@ -42447,17 +42122,17 @@ ${MessageCoinFragmentFragmentDoc}`;
42447
42122
  var SubmitAndAwaitDocument = lib_default2`
42448
42123
  subscription submitAndAwait($encodedTransaction: HexString!) {
42449
42124
  submitAndAwait(tx: $encodedTransaction) {
42450
- ...transactionStatusSubscriptionFragment
42125
+ ...transactionStatusFragment
42451
42126
  }
42452
42127
  }
42453
- ${TransactionStatusSubscriptionFragmentFragmentDoc}`;
42128
+ ${TransactionStatusFragmentFragmentDoc}`;
42454
42129
  var StatusChangeDocument = lib_default2`
42455
42130
  subscription statusChange($transactionId: TransactionId!) {
42456
42131
  statusChange(id: $transactionId) {
42457
- ...transactionStatusSubscriptionFragment
42132
+ ...transactionStatusFragment
42458
42133
  }
42459
42134
  }
42460
- ${TransactionStatusSubscriptionFragmentFragmentDoc}`;
42135
+ ${TransactionStatusFragmentFragmentDoc}`;
42461
42136
  function getSdk(requester) {
42462
42137
  return {
42463
42138
  getVersion(variables, options) {
@@ -42511,12 +42186,6 @@ ${MessageCoinFragmentFragmentDoc}`;
42511
42186
  getBalance(variables, options) {
42512
42187
  return requester(GetBalanceDocument, variables, options);
42513
42188
  },
42514
- getLatestGasPrice(variables, options) {
42515
- return requester(GetLatestGasPriceDocument, variables, options);
42516
- },
42517
- estimateGasPrice(variables, options) {
42518
- return requester(EstimateGasPriceDocument, variables, options);
42519
- },
42520
42189
  getBalances(variables, options) {
42521
42190
  return requester(GetBalancesDocument, variables, options);
42522
42191
  },
@@ -42681,6 +42350,9 @@ ${MessageCoinFragmentFragmentDoc}`;
42681
42350
  }
42682
42351
  };
42683
42352
 
42353
+ // ../address/dist/configs.mjs
42354
+ var ZeroBytes32 = "0x0000000000000000000000000000000000000000000000000000000000000000";
42355
+
42684
42356
  // src/providers/transaction-request/input.ts
42685
42357
  var inputify = (value) => {
42686
42358
  const { type: type3 } = value;
@@ -42700,9 +42372,10 @@ ${MessageCoinFragmentFragmentDoc}`;
42700
42372
  txIndex: toNumber2(arrayify(value.txPointer).slice(8, 16))
42701
42373
  },
42702
42374
  witnessIndex: value.witnessIndex,
42375
+ maturity: value.maturity ?? 0,
42703
42376
  predicateGasUsed: bn(value.predicateGasUsed),
42704
- predicateLength: bn(predicate.length),
42705
- predicateDataLength: bn(predicateData.length),
42377
+ predicateLength: predicate.length,
42378
+ predicateDataLength: predicateData.length,
42706
42379
  predicate: hexlify(predicate),
42707
42380
  predicateData: hexlify(predicateData)
42708
42381
  };
@@ -42733,8 +42406,8 @@ ${MessageCoinFragmentFragmentDoc}`;
42733
42406
  nonce: hexlify(value.nonce),
42734
42407
  witnessIndex: value.witnessIndex,
42735
42408
  predicateGasUsed: bn(value.predicateGasUsed),
42736
- predicateLength: bn(predicate.length),
42737
- predicateDataLength: bn(predicateData.length),
42409
+ predicateLength: predicate.length,
42410
+ predicateDataLength: predicateData.length,
42738
42411
  predicate: hexlify(predicate),
42739
42412
  predicateData: hexlify(predicateData),
42740
42413
  data: hexlify(data),
@@ -42891,8 +42564,8 @@ ${MessageCoinFragmentFragmentDoc}`;
42891
42564
  case "CALL" /* Call */: {
42892
42565
  const callReceipt = {
42893
42566
  type: ReceiptType.Call,
42894
- from: hexOrZero(receipt.id || receipt.contractId),
42895
- to: hexOrZero(receipt?.to),
42567
+ from: hexOrZero(receipt.contract?.id),
42568
+ to: hexOrZero(receipt?.to?.id),
42896
42569
  amount: bn(receipt.amount),
42897
42570
  assetId: hexOrZero(receipt.assetId),
42898
42571
  gas: bn(receipt.gas),
@@ -42906,7 +42579,7 @@ ${MessageCoinFragmentFragmentDoc}`;
42906
42579
  case "RETURN" /* Return */: {
42907
42580
  const returnReceipt = {
42908
42581
  type: ReceiptType.Return,
42909
- id: hexOrZero(receipt.id || receipt.contractId),
42582
+ id: hexOrZero(receipt.contract?.id),
42910
42583
  val: bn(receipt.val),
42911
42584
  pc: bn(receipt.pc),
42912
42585
  is: bn(receipt.is)
@@ -42916,7 +42589,7 @@ ${MessageCoinFragmentFragmentDoc}`;
42916
42589
  case "RETURN_DATA" /* ReturnData */: {
42917
42590
  const returnDataReceipt = {
42918
42591
  type: ReceiptType.ReturnData,
42919
- id: hexOrZero(receipt.id || receipt.contractId),
42592
+ id: hexOrZero(receipt.contract?.id),
42920
42593
  ptr: bn(receipt.ptr),
42921
42594
  len: bn(receipt.len),
42922
42595
  digest: hexOrZero(receipt.digest),
@@ -42928,7 +42601,7 @@ ${MessageCoinFragmentFragmentDoc}`;
42928
42601
  case "PANIC" /* Panic */: {
42929
42602
  const panicReceipt = {
42930
42603
  type: ReceiptType.Panic,
42931
- id: hexOrZero(receipt.id),
42604
+ id: hexOrZero(receipt.contract?.id),
42932
42605
  reason: bn(receipt.reason),
42933
42606
  pc: bn(receipt.pc),
42934
42607
  is: bn(receipt.is),
@@ -42939,7 +42612,7 @@ ${MessageCoinFragmentFragmentDoc}`;
42939
42612
  case "REVERT" /* Revert */: {
42940
42613
  const revertReceipt = {
42941
42614
  type: ReceiptType.Revert,
42942
- id: hexOrZero(receipt.id || receipt.contractId),
42615
+ id: hexOrZero(receipt.contract?.id),
42943
42616
  val: bn(receipt.ra),
42944
42617
  pc: bn(receipt.pc),
42945
42618
  is: bn(receipt.is)
@@ -42949,7 +42622,7 @@ ${MessageCoinFragmentFragmentDoc}`;
42949
42622
  case "LOG" /* Log */: {
42950
42623
  const logReceipt = {
42951
42624
  type: ReceiptType.Log,
42952
- id: hexOrZero(receipt.id || receipt.contractId),
42625
+ id: hexOrZero(receipt.contract?.id),
42953
42626
  val0: bn(receipt.ra),
42954
42627
  val1: bn(receipt.rb),
42955
42628
  val2: bn(receipt.rc),
@@ -42962,7 +42635,7 @@ ${MessageCoinFragmentFragmentDoc}`;
42962
42635
  case "LOG_DATA" /* LogData */: {
42963
42636
  const logDataReceipt = {
42964
42637
  type: ReceiptType.LogData,
42965
- id: hexOrZero(receipt.id || receipt.contractId),
42638
+ id: hexOrZero(receipt.contract?.id),
42966
42639
  val0: bn(receipt.ra),
42967
42640
  val1: bn(receipt.rb),
42968
42641
  ptr: bn(receipt.ptr),
@@ -42976,8 +42649,8 @@ ${MessageCoinFragmentFragmentDoc}`;
42976
42649
  case "TRANSFER" /* Transfer */: {
42977
42650
  const transferReceipt = {
42978
42651
  type: ReceiptType.Transfer,
42979
- from: hexOrZero(receipt.id || receipt.contractId),
42980
- to: hexOrZero(receipt.toAddress || receipt?.to),
42652
+ from: hexOrZero(receipt.contract?.id),
42653
+ to: hexOrZero(receipt.toAddress || receipt?.to?.id),
42981
42654
  amount: bn(receipt.amount),
42982
42655
  assetId: hexOrZero(receipt.assetId),
42983
42656
  pc: bn(receipt.pc),
@@ -42988,8 +42661,8 @@ ${MessageCoinFragmentFragmentDoc}`;
42988
42661
  case "TRANSFER_OUT" /* TransferOut */: {
42989
42662
  const transferOutReceipt = {
42990
42663
  type: ReceiptType.TransferOut,
42991
- from: hexOrZero(receipt.id || receipt.contractId),
42992
- to: hexOrZero(receipt.toAddress || receipt.to),
42664
+ from: hexOrZero(receipt.contract?.id),
42665
+ to: hexOrZero(receipt.toAddress || receipt.to?.id),
42993
42666
  amount: bn(receipt.amount),
42994
42667
  assetId: hexOrZero(receipt.assetId),
42995
42668
  pc: bn(receipt.pc),
@@ -43032,7 +42705,7 @@ ${MessageCoinFragmentFragmentDoc}`;
43032
42705
  return receiptMessageOut;
43033
42706
  }
43034
42707
  case "MINT" /* Mint */: {
43035
- const contractId = hexOrZero(receipt.id || receipt.contractId);
42708
+ const contractId = hexOrZero(receipt.contract?.id);
43036
42709
  const subId = hexOrZero(receipt.subId);
43037
42710
  const assetId = ReceiptMintCoder.getAssetId(contractId, subId);
43038
42711
  const mintReceipt = {
@@ -43047,7 +42720,7 @@ ${MessageCoinFragmentFragmentDoc}`;
43047
42720
  return mintReceipt;
43048
42721
  }
43049
42722
  case "BURN" /* Burn */: {
43050
- const contractId = hexOrZero(receipt.id || receipt.contractId);
42723
+ const contractId = hexOrZero(receipt.contract?.id);
43051
42724
  const subId = hexOrZero(receipt.subId);
43052
42725
  const assetId = ReceiptBurnCoder.getAssetId(contractId, subId);
43053
42726
  const burnReceipt = {
@@ -43067,6 +42740,7 @@ ${MessageCoinFragmentFragmentDoc}`;
43067
42740
  }
43068
42741
 
43069
42742
  // src/providers/utils/gas.ts
42743
+ var calculatePriceWithFactor = (gas, gasPrice, priceFactor) => bn(Math.ceil(gas.mul(gasPrice).toNumber() / priceFactor.toNumber()));
43070
42744
  var getGasUsedFromReceipts = (receipts) => {
43071
42745
  const scriptResult = receipts.filter(
43072
42746
  (receipt) => receipt.type === ReceiptType.ScriptResult
@@ -43087,28 +42761,18 @@ ${MessageCoinFragmentFragmentDoc}`;
43087
42761
  }
43088
42762
  function gasUsedByInputs(inputs, txBytesSize, gasCosts) {
43089
42763
  const witnessCache = [];
43090
- const chargeableInputs = inputs.filter((input) => {
43091
- const isCoinOrMessage = "owner" in input || "sender" in input;
43092
- if (isCoinOrMessage) {
43093
- if ("predicate" in input && input.predicate && input.predicate !== "0x") {
43094
- return true;
43095
- }
43096
- if (!witnessCache.includes(input.witnessIndex)) {
43097
- witnessCache.push(input.witnessIndex);
43098
- return true;
43099
- }
43100
- }
43101
- return false;
43102
- });
43103
- const vmInitializationCost = resolveGasDependentCosts(txBytesSize, gasCosts.vmInitialization);
43104
- const totalGas = chargeableInputs.reduce((total, input) => {
42764
+ const totalGas = inputs.reduce((total, input) => {
43105
42765
  if ("predicate" in input && input.predicate && input.predicate !== "0x") {
43106
42766
  return total.add(
43107
- vmInitializationCost.add(resolveGasDependentCosts(arrayify(input.predicate).length, gasCosts.contractRoot)).add(bn(input.predicateGasUsed))
42767
+ resolveGasDependentCosts(txBytesSize, gasCosts.vmInitialization).add(resolveGasDependentCosts(arrayify(input.predicate).length, gasCosts.contractRoot)).add(bn(input.predicateGasUsed))
43108
42768
  );
43109
42769
  }
43110
- return total.add(gasCosts.ecr1);
43111
- }, bn(0));
42770
+ if ("witnessIndex" in input && !witnessCache.includes(input.witnessIndex)) {
42771
+ witnessCache.push(input.witnessIndex);
42772
+ return total.add(gasCosts.ecr1);
42773
+ }
42774
+ return total;
42775
+ }, bn());
43112
42776
  return totalGas;
43113
42777
  }
43114
42778
  function getMinGas(params) {
@@ -43120,20 +42784,12 @@ ${MessageCoinFragmentFragmentDoc}`;
43120
42784
  return minGas;
43121
42785
  }
43122
42786
  function getMaxGas(params) {
43123
- const {
43124
- gasPerByte,
43125
- witnessesLength,
43126
- witnessLimit,
43127
- minGas,
43128
- gasLimit = bn(0),
43129
- maxGasPerTx
43130
- } = params;
42787
+ const { gasPerByte, witnessesLength, witnessLimit, minGas, gasLimit = bn(0) } = params;
43131
42788
  let remainingAllowedWitnessGas = bn(0);
43132
42789
  if (witnessLimit?.gt(0) && witnessLimit.gte(witnessesLength)) {
43133
42790
  remainingAllowedWitnessGas = bn(witnessLimit).sub(witnessesLength).mul(gasPerByte);
43134
42791
  }
43135
- const maxGas = remainingAllowedWitnessGas.add(minGas).add(gasLimit);
43136
- return maxGas.gte(maxGasPerTx) ? maxGasPerTx : maxGas;
42792
+ return remainingAllowedWitnessGas.add(minGas).add(gasLimit);
43137
42793
  }
43138
42794
  function calculateMetadataGasForTxCreate({
43139
42795
  gasCosts,
@@ -43155,10 +42811,6 @@ ${MessageCoinFragmentFragmentDoc}`;
43155
42811
  }) {
43156
42812
  return resolveGasDependentCosts(txBytesSize, gasCosts.s256);
43157
42813
  }
43158
- var calculateGasFee = (params) => {
43159
- const { gas, gasPrice, priceFactor, tip } = params;
43160
- return gas.mul(gasPrice).div(priceFactor).add(tip);
43161
- };
43162
42814
 
43163
42815
  // src/providers/utils/json.ts
43164
42816
  function normalize2(object) {
@@ -43288,7 +42940,7 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
43288
42940
  // src/providers/transaction-request/transaction-request.ts
43289
42941
  var BaseTransactionRequest = class {
43290
42942
  /** Gas price for transaction */
43291
- tip;
42943
+ gasPrice;
43292
42944
  /** Block until which tx cannot be included */
43293
42945
  maturity;
43294
42946
  /** The maximum fee payable by this transaction using BASE_ASSET. */
@@ -43307,7 +42959,7 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
43307
42959
  * @param baseTransactionRequest - Optional object containing properties to initialize the transaction request.
43308
42960
  */
43309
42961
  constructor({
43310
- tip,
42962
+ gasPrice,
43311
42963
  maturity,
43312
42964
  maxFee,
43313
42965
  witnessLimit,
@@ -43315,7 +42967,7 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
43315
42967
  outputs,
43316
42968
  witnesses
43317
42969
  } = {}) {
43318
- this.tip = bn(tip);
42970
+ this.gasPrice = bn(gasPrice);
43319
42971
  this.maturity = maturity ?? 0;
43320
42972
  this.witnessLimit = witnessLimit ? bn(witnessLimit) : void 0;
43321
42973
  this.maxFee = maxFee ? bn(maxFee) : void 0;
@@ -43326,9 +42978,9 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
43326
42978
  static getPolicyMeta(req) {
43327
42979
  let policyTypes = 0;
43328
42980
  const policies = [];
43329
- if (req.tip) {
43330
- policyTypes += PolicyType.Tip;
43331
- policies.push({ data: req.tip, type: PolicyType.Tip });
42981
+ if (req.gasPrice) {
42982
+ policyTypes += PolicyType.GasPrice;
42983
+ policies.push({ data: req.gasPrice, type: PolicyType.GasPrice });
43332
42984
  }
43333
42985
  if (req.witnessLimit) {
43334
42986
  policyTypes += PolicyType.WitnessLimit;
@@ -43512,11 +43164,13 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
43512
43164
  * assetId, if one it was not added yet.
43513
43165
  *
43514
43166
  * @param coin - Coin resource.
43167
+ * @param predicate - Predicate bytes.
43168
+ * @param predicateData - Predicate data bytes.
43515
43169
  */
43516
- addCoinInput(coin) {
43170
+ addCoinInput(coin, predicate) {
43517
43171
  const { assetId, owner, amount } = coin;
43518
43172
  let witnessIndex;
43519
- if (coin.predicate) {
43173
+ if (predicate) {
43520
43174
  witnessIndex = 0;
43521
43175
  } else {
43522
43176
  witnessIndex = this.getCoinInputWitnessIndexByOwner(owner);
@@ -43531,22 +43185,23 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
43531
43185
  amount,
43532
43186
  assetId,
43533
43187
  txPointer: "0x00000000000000000000000000000000",
43534
- witnessIndex
43188
+ witnessIndex,
43189
+ predicate: predicate?.bytes
43535
43190
  };
43536
43191
  this.pushInput(input);
43537
43192
  this.addChangeOutput(owner, assetId);
43538
43193
  }
43539
43194
  /**
43540
43195
  * Adds a single message input to the transaction and a change output for the
43541
- * baseAssetId, if one it was not added yet.
43196
+ * asset against the message
43542
43197
  *
43543
43198
  * @param message - Message resource.
43199
+ * @param predicate - Predicate bytes.
43544
43200
  */
43545
- addMessageInput(message) {
43546
- const { recipient, sender, amount } = message;
43547
- const assetId = BaseAssetId;
43201
+ addMessageInput(message, predicate) {
43202
+ const { recipient, sender, amount, assetId } = message;
43548
43203
  let witnessIndex;
43549
- if (message.predicate) {
43204
+ if (predicate) {
43550
43205
  witnessIndex = 0;
43551
43206
  } else {
43552
43207
  witnessIndex = this.getCoinInputWitnessIndexByOwner(recipient);
@@ -43560,7 +43215,8 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
43560
43215
  sender: sender.toB256(),
43561
43216
  recipient: recipient.toB256(),
43562
43217
  amount,
43563
- witnessIndex
43218
+ witnessIndex,
43219
+ predicate: predicate?.bytes
43564
43220
  };
43565
43221
  this.pushInput(input);
43566
43222
  this.addChangeOutput(recipient, assetId);
@@ -43591,6 +43247,32 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
43591
43247
  resources.forEach((resource) => this.addResource(resource));
43592
43248
  return this;
43593
43249
  }
43250
+ /**
43251
+ * Adds multiple resources to the transaction by adding coin/message inputs and change
43252
+ * outputs from the related assetIds.
43253
+ *
43254
+ * @param resources - The resources to add.
43255
+ * @returns This transaction.
43256
+ */
43257
+ addPredicateResource(resource, predicate) {
43258
+ if (isCoin(resource)) {
43259
+ this.addCoinInput(resource, predicate);
43260
+ } else {
43261
+ this.addMessageInput(resource, predicate);
43262
+ }
43263
+ return this;
43264
+ }
43265
+ /**
43266
+ * Adds multiple predicate coin/message inputs to the transaction and change outputs
43267
+ * from the related assetIds.
43268
+ *
43269
+ * @param resources - The resources to add.
43270
+ * @returns This transaction.
43271
+ */
43272
+ addPredicateResources(resources, predicate) {
43273
+ resources.forEach((resource) => this.addPredicateResource(resource, predicate));
43274
+ return this;
43275
+ }
43594
43276
  /**
43595
43277
  * Adds a coin output to the transaction.
43596
43278
  *
@@ -43598,7 +43280,7 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
43598
43280
  * @param amount - Amount of coin.
43599
43281
  * @param assetId - Asset ID of coin.
43600
43282
  */
43601
- addCoinOutput(to, amount, assetId = BaseAssetId) {
43283
+ addCoinOutput(to, amount, assetId) {
43602
43284
  this.pushOutput({
43603
43285
  type: OutputType.Coin,
43604
43286
  to: addressify(to).toB256(),
@@ -43630,7 +43312,7 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
43630
43312
  * @param to - Address of the owner.
43631
43313
  * @param assetId - Asset ID of coin.
43632
43314
  */
43633
- addChangeOutput(to, assetId = BaseAssetId) {
43315
+ addChangeOutput(to, assetId) {
43634
43316
  const changeOutput = this.getChangeOutputs().find(
43635
43317
  (output3) => hexlify(output3.assetId) === assetId
43636
43318
  );
@@ -43670,7 +43352,7 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
43670
43352
  }
43671
43353
  calculateMaxGas(chainInfo, minGas) {
43672
43354
  const { consensusParameters } = chainInfo;
43673
- const { gasPerByte, maxGasPerTx } = consensusParameters;
43355
+ const { gasPerByte } = consensusParameters;
43674
43356
  const witnessesLength = this.toTransaction().witnesses.reduce(
43675
43357
  (acc, wit) => acc + wit.dataLength,
43676
43358
  0
@@ -43679,8 +43361,7 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
43679
43361
  gasPerByte,
43680
43362
  minGas,
43681
43363
  witnessesLength,
43682
- witnessLimit: this.witnessLimit,
43683
- maxGasPerTx
43364
+ witnessLimit: this.witnessLimit
43684
43365
  });
43685
43366
  }
43686
43367
  /**
@@ -43688,8 +43369,9 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
43688
43369
  * quantities array.
43689
43370
  *
43690
43371
  * @param quantities - CoinQuantity Array.
43372
+ * @param baseAssetId - The base asset to fund the transaction.
43691
43373
  */
43692
- fundWithFakeUtxos(quantities, resourcesOwner) {
43374
+ fundWithFakeUtxos(quantities, baseAssetId, resourcesOwner) {
43693
43375
  const findAssetInput = (assetId) => this.inputs.find((input) => {
43694
43376
  if ("assetId" in input) {
43695
43377
  return input.assetId === assetId;
@@ -43698,27 +43380,24 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
43698
43380
  });
43699
43381
  const updateAssetInput = (assetId, quantity) => {
43700
43382
  const assetInput = findAssetInput(assetId);
43701
- let usedQuantity = quantity;
43702
- if (assetId === BaseAssetId) {
43703
- usedQuantity = bn("1000000000000000000");
43704
- }
43705
43383
  if (assetInput && "assetId" in assetInput) {
43706
43384
  assetInput.id = hexlify(randomBytes22(UTXO_ID_LEN));
43707
- assetInput.amount = usedQuantity;
43385
+ assetInput.amount = quantity;
43708
43386
  } else {
43709
43387
  this.addResources([
43710
43388
  {
43711
43389
  id: hexlify(randomBytes22(UTXO_ID_LEN)),
43712
- amount: usedQuantity,
43390
+ amount: quantity,
43713
43391
  assetId,
43714
43392
  owner: resourcesOwner || Address.fromRandom(),
43393
+ maturity: 0,
43715
43394
  blockCreated: bn(1),
43716
43395
  txCreatedIdx: bn(1)
43717
43396
  }
43718
43397
  ]);
43719
43398
  }
43720
43399
  };
43721
- updateAssetInput(BaseAssetId, bn(1e11));
43400
+ updateAssetInput(baseAssetId, bn(1e11));
43722
43401
  quantities.forEach((q) => updateAssetInput(q.assetId, q.amount));
43723
43402
  }
43724
43403
  /**
@@ -43743,7 +43422,7 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
43743
43422
  toJSON() {
43744
43423
  return normalizeJSON(this);
43745
43424
  }
43746
- updatePredicateGasUsed(inputs) {
43425
+ updatePredicateInputs(inputs) {
43747
43426
  this.inputs.forEach((i) => {
43748
43427
  let correspondingInput;
43749
43428
  switch (i.type) {
@@ -43765,15 +43444,6 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
43765
43444
  }
43766
43445
  });
43767
43446
  }
43768
- shiftPredicateData() {
43769
- this.inputs.forEach((input) => {
43770
- if ("predicateData" in input && "paddPredicateData" in input && typeof input.paddPredicateData === "function") {
43771
- input.predicateData = input.paddPredicateData(
43772
- BaseTransactionRequest.getPolicyMeta(this).policies.length
43773
- );
43774
- }
43775
- });
43776
- }
43777
43447
  };
43778
43448
 
43779
43449
  // src/providers/transaction-request/hash-transaction.ts
@@ -43884,12 +43554,7 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
43884
43554
  *
43885
43555
  * @param createTransactionRequestLike - The initial values for the instance
43886
43556
  */
43887
- constructor({
43888
- bytecodeWitnessIndex,
43889
- salt,
43890
- storageSlots,
43891
- ...rest
43892
- } = {}) {
43557
+ constructor({ bytecodeWitnessIndex, salt, storageSlots, ...rest }) {
43893
43558
  super(rest);
43894
43559
  this.bytecodeWitnessIndex = bytecodeWitnessIndex ?? 0;
43895
43560
  this.salt = hexlify(salt ?? ZeroBytes32);
@@ -43907,8 +43572,9 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
43907
43572
  return {
43908
43573
  type: TransactionType.Create,
43909
43574
  ...baseTransaction,
43575
+ bytecodeLength: baseTransaction.witnesses[bytecodeWitnessIndex].dataLength / 4,
43910
43576
  bytecodeWitnessIndex,
43911
- storageSlotsCount: bn(storageSlots.length),
43577
+ storageSlotsCount: storageSlots.length,
43912
43578
  salt: this.salt ? hexlify(this.salt) : ZeroBytes32,
43913
43579
  storageSlots
43914
43580
  };
@@ -44022,8 +43688,8 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
44022
43688
  type: TransactionType.Script,
44023
43689
  scriptGasLimit: this.gasLimit,
44024
43690
  ...super.getBaseTransaction(),
44025
- scriptLength: bn(script.length),
44026
- scriptDataLength: bn(scriptData.length),
43691
+ scriptLength: script.length,
43692
+ scriptDataLength: scriptData.length,
44027
43693
  receiptsRoot: ZeroBytes32,
44028
43694
  script: hexlify(script),
44029
43695
  scriptData: hexlify(scriptData)
@@ -44087,7 +43753,7 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
44087
43753
  }
44088
43754
  calculateMaxGas(chainInfo, minGas) {
44089
43755
  const { consensusParameters } = chainInfo;
44090
- const { gasPerByte, maxGasPerTx } = consensusParameters;
43756
+ const { gasPerByte } = consensusParameters;
44091
43757
  const witnessesLength = this.toTransaction().witnesses.reduce(
44092
43758
  (acc, wit) => acc + wit.dataLength,
44093
43759
  0
@@ -44097,8 +43763,7 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
44097
43763
  minGas,
44098
43764
  witnessesLength,
44099
43765
  witnessLimit: this.witnessLimit,
44100
- gasLimit: this.gasLimit,
44101
- maxGasPerTx
43766
+ gasLimit: this.gasLimit
44102
43767
  });
44103
43768
  }
44104
43769
  /**
@@ -44171,29 +43836,13 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
44171
43836
  }
44172
43837
  }
44173
43838
  };
44174
- var cacheTxInputsFromOwner = (inputs, owner) => inputs.reduce(
44175
- (acc, input) => {
44176
- if (input.type === InputType.Coin && input.owner === owner) {
44177
- acc.utxos.push(input.id);
44178
- }
44179
- if (input.type === InputType.Message && input.recipient === owner) {
44180
- acc.messages.push(input.nonce);
44181
- }
44182
- return acc;
44183
- },
44184
- {
44185
- utxos: [],
44186
- messages: []
44187
- }
44188
- );
44189
43839
 
44190
43840
  // src/providers/transaction-summary/calculate-transaction-fee.ts
44191
43841
  var calculateTransactionFee = (params) => {
44192
43842
  const {
44193
- gasPrice,
43843
+ gasUsed,
44194
43844
  rawPayload,
44195
- tip,
44196
- consensusParameters: { gasCosts, feeParams, maxGasPerTx }
43845
+ consensusParameters: { gasCosts, feeParams }
44197
43846
  } = params;
44198
43847
  const gasPerByte = bn(feeParams.gasPerByte);
44199
43848
  const gasPriceFactor = bn(feeParams.gasPriceFactor);
@@ -44203,7 +43852,8 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
44203
43852
  return {
44204
43853
  fee: bn(0),
44205
43854
  minFee: bn(0),
44206
- maxFee: bn(0)
43855
+ maxFee: bn(0),
43856
+ feeFromGasUsed: bn(0)
44207
43857
  };
44208
43858
  }
44209
43859
  const { type: type3, witnesses, inputs, policies } = transaction;
@@ -44235,6 +43885,7 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
44235
43885
  metadataGas,
44236
43886
  txBytesSize: transactionBytes.length
44237
43887
  });
43888
+ const gasPrice = bn(policies.find((policy) => policy.type === PolicyType.GasPrice)?.data);
44238
43889
  const witnessLimit = policies.find((policy) => policy.type === PolicyType.WitnessLimit)?.data;
44239
43890
  const witnessesLength = witnesses.reduce((acc, wit) => acc + wit.dataLength, 0);
44240
43891
  const maxGas = getMaxGas({
@@ -44242,25 +43893,17 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
44242
43893
  minGas,
44243
43894
  witnessesLength,
44244
43895
  gasLimit,
44245
- witnessLimit,
44246
- maxGasPerTx
44247
- });
44248
- const minFee = calculateGasFee({
44249
- gasPrice,
44250
- gas: minGas,
44251
- priceFactor: gasPriceFactor,
44252
- tip
44253
- });
44254
- const maxFee = calculateGasFee({
44255
- gasPrice,
44256
- gas: maxGas,
44257
- priceFactor: gasPriceFactor,
44258
- tip
43896
+ witnessLimit
44259
43897
  });
43898
+ const feeFromGasUsed = calculatePriceWithFactor(gasUsed, gasPrice, gasPriceFactor);
43899
+ const minFee = calculatePriceWithFactor(minGas, gasPrice, gasPriceFactor);
43900
+ const maxFee = calculatePriceWithFactor(maxGas, gasPrice, gasPriceFactor);
43901
+ const fee = minFee.add(feeFromGasUsed);
44260
43902
  return {
43903
+ fee,
44261
43904
  minFee,
44262
43905
  maxFee,
44263
- fee: maxFee
43906
+ feeFromGasUsed
44264
43907
  };
44265
43908
  };
44266
43909
 
@@ -44814,9 +44457,7 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
44814
44457
  gqlTransactionStatus,
44815
44458
  abiMap = {},
44816
44459
  maxInputs,
44817
- gasCosts,
44818
- maxGasPerTx,
44819
- gasPrice
44460
+ gasCosts
44820
44461
  } = params;
44821
44462
  const gasUsed = getGasUsedFromReceipts(receipts);
44822
44463
  const rawPayload = hexlify(transactionBytes);
@@ -44830,14 +44471,11 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
44830
44471
  maxInputs
44831
44472
  });
44832
44473
  const typeName = getTransactionTypeName(transaction.type);
44833
- const tip = bn(transaction.policies?.find((policy) => policy.type === PolicyType.Tip)?.data);
44834
44474
  const { fee } = calculateTransactionFee({
44835
- gasPrice,
44475
+ gasUsed,
44836
44476
  rawPayload,
44837
- tip,
44838
44477
  consensusParameters: {
44839
44478
  gasCosts,
44840
- maxGasPerTx,
44841
44479
  feeParams: {
44842
44480
  gasPerByte,
44843
44481
  gasPriceFactor
@@ -44973,13 +44611,8 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
44973
44611
  const decodedTransaction = this.decodeTransaction(
44974
44612
  transaction
44975
44613
  );
44976
- let txReceipts = [];
44977
- if (transaction?.status && "receipts" in transaction.status) {
44978
- txReceipts = transaction.status.receipts;
44979
- }
44980
- const receipts = txReceipts.map(processGqlReceipt) || [];
44981
- const { gasPerByte, gasPriceFactor, gasCosts, maxGasPerTx } = this.provider.getGasConfig();
44982
- const gasPrice = await this.provider.getLatestGasPrice();
44614
+ const receipts = transaction.receipts?.map(processGqlReceipt) || [];
44615
+ const { gasPerByte, gasPriceFactor, gasCosts } = this.provider.getGasConfig();
44983
44616
  const maxInputs = this.provider.getChain().consensusParameters.maxInputs;
44984
44617
  const transactionSummary = assembleTransactionSummary({
44985
44618
  id: this.id,
@@ -44991,9 +44624,7 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
44991
44624
  gasPriceFactor,
44992
44625
  abiMap: contractsAbiMap,
44993
44626
  maxInputs,
44994
- gasCosts,
44995
- maxGasPerTx,
44996
- gasPrice
44627
+ gasCosts
44997
44628
  });
44998
44629
  return transactionSummary;
44999
44630
  }
@@ -45099,7 +44730,7 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
45099
44730
  }
45100
44731
 
45101
44732
  // src/providers/utils/merge-quantities.ts
45102
- var mergeQuantities = (arr1, arr2) => {
44733
+ var mergeQuantities = (...coinQuantities) => {
45103
44734
  const resultMap = {};
45104
44735
  function addToMap({ amount, assetId }) {
45105
44736
  if (resultMap[assetId]) {
@@ -45108,8 +44739,7 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
45108
44739
  resultMap[assetId] = amount;
45109
44740
  }
45110
44741
  }
45111
- arr1.forEach(addToMap);
45112
- arr2.forEach(addToMap);
44742
+ coinQuantities.forEach((arr) => arr.forEach(addToMap));
45113
44743
  return Object.entries(resultMap).map(([assetId, amount]) => ({ assetId, amount }));
45114
44744
  };
45115
44745
 
@@ -45137,12 +44767,13 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
45137
44767
  gasPerByte: bn(feeParams.gasPerByte),
45138
44768
  maxMessageDataLength: bn(predicateParams.maxMessageDataLength),
45139
44769
  chainId: bn(consensusParameters.chainId),
44770
+ baseAssetId: consensusParameters.baseAssetId,
45140
44771
  gasCosts
45141
44772
  },
45142
44773
  gasCosts,
45143
44774
  latestBlock: {
45144
44775
  id: latestBlock.id,
45145
- height: bn(latestBlock.height),
44776
+ height: bn(latestBlock.header.height),
45146
44777
  time: latestBlock.header.time,
45147
44778
  transactions: latestBlock.transactions.map((i) => ({
45148
44779
  id: i.id
@@ -45236,8 +44867,10 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
45236
44867
  * Returns some helpful parameters related to gas fees.
45237
44868
  */
45238
44869
  getGasConfig() {
44870
+ const { minGasPrice } = this.getNode();
45239
44871
  const { maxGasPerTx, maxGasPerPredicate, gasPriceFactor, gasPerByte, gasCosts } = this.getChain().consensusParameters;
45240
44872
  return {
44873
+ minGasPrice,
45241
44874
  maxGasPerTx,
45242
44875
  maxGasPerPredicate,
45243
44876
  gasPriceFactor,
@@ -45335,7 +44968,7 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
45335
44968
  */
45336
44969
  async getBlockNumber() {
45337
44970
  const { chain } = await this.operations.getChain();
45338
- return bn(chain.latestBlock.height, 10);
44971
+ return bn(chain.latestBlock.header.height, 10);
45339
44972
  }
45340
44973
  /**
45341
44974
  * Returns the chain information.
@@ -45347,9 +44980,11 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
45347
44980
  const processedNodeInfo = {
45348
44981
  maxDepth: bn(nodeInfo.maxDepth),
45349
44982
  maxTx: bn(nodeInfo.maxTx),
44983
+ minGasPrice: bn(nodeInfo.minGasPrice),
45350
44984
  nodeVersion: nodeInfo.nodeVersion,
45351
44985
  utxoValidation: nodeInfo.utxoValidation,
45352
- vmBacktrace: nodeInfo.vmBacktrace
44986
+ vmBacktrace: nodeInfo.vmBacktrace,
44987
+ peers: nodeInfo.peers
45353
44988
  };
45354
44989
  _Provider.nodeInfoCache[this.url] = processedNodeInfo;
45355
44990
  return processedNodeInfo;
@@ -45375,6 +45010,17 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
45375
45010
  } = this.getChain();
45376
45011
  return chainId.toNumber();
45377
45012
  }
45013
+ /**
45014
+ * Returns the base asset ID
45015
+ *
45016
+ * @returns A promise that resolves to the base asset ID
45017
+ */
45018
+ getBaseAssetId() {
45019
+ const {
45020
+ consensusParameters: { baseAssetId }
45021
+ } = this.getChain();
45022
+ return baseAssetId;
45023
+ }
45378
45024
  /**
45379
45025
  * Submits a transaction to the chain to be executed.
45380
45026
  *
@@ -45435,13 +45081,14 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
45435
45081
  return this.estimateTxDependencies(transactionRequest);
45436
45082
  }
45437
45083
  const encodedTransaction = hexlify(transactionRequest.toTransactionBytes());
45438
- const { dryRun: dryRunStatuses } = await this.operations.dryRun({
45439
- encodedTransactions: encodedTransaction,
45084
+ const { dryRun: gqlReceipts } = await this.operations.dryRun({
45085
+ encodedTransaction,
45440
45086
  utxoValidation: utxoValidation || false
45441
45087
  });
45442
- const [{ receipts: rawReceipts, status }] = dryRunStatuses;
45443
- const receipts = rawReceipts.map(processGqlReceipt);
45444
- return { receipts, dryrunStatus: status };
45088
+ const receipts = gqlReceipts.map(processGqlReceipt);
45089
+ return {
45090
+ receipts
45091
+ };
45445
45092
  }
45446
45093
  /**
45447
45094
  * Verifies whether enough gas is available to complete transaction.
@@ -45480,6 +45127,9 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
45480
45127
  * If there are missing variable outputs,
45481
45128
  * `addVariableOutputs` is called on the transaction.
45482
45129
  *
45130
+ * @privateRemarks
45131
+ * TODO: Investigate support for missing contract IDs
45132
+ * TODO: Add support for missing output messages
45483
45133
  *
45484
45134
  * @param transactionRequest - The transaction request object.
45485
45135
  * @returns A promise.
@@ -45492,19 +45142,16 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
45492
45142
  missingContractIds: []
45493
45143
  };
45494
45144
  }
45145
+ await this.estimatePredicates(transactionRequest);
45495
45146
  let receipts = [];
45496
45147
  const missingContractIds = [];
45497
45148
  let outputVariables = 0;
45498
- let dryrunStatus;
45499
45149
  for (let attempt = 0; attempt < MAX_RETRIES; attempt++) {
45500
- const {
45501
- dryRun: [{ receipts: rawReceipts, status }]
45502
- } = await this.operations.dryRun({
45503
- encodedTransactions: [hexlify(transactionRequest.toTransactionBytes())],
45150
+ const { dryRun: gqlReceipts } = await this.operations.dryRun({
45151
+ encodedTransaction: hexlify(transactionRequest.toTransactionBytes()),
45504
45152
  utxoValidation: false
45505
45153
  });
45506
- receipts = rawReceipts.map(processGqlReceipt);
45507
- dryrunStatus = status;
45154
+ receipts = gqlReceipts.map(processGqlReceipt);
45508
45155
  const { missingOutputVariables, missingOutputContractIds } = getReceiptsWithMissingData(receipts);
45509
45156
  const hasMissingOutputs = missingOutputVariables.length !== 0 || missingOutputContractIds.length !== 0;
45510
45157
  if (hasMissingOutputs) {
@@ -45514,10 +45161,6 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
45514
45161
  transactionRequest.addContractInputAndOutput(Address.fromString(contractId));
45515
45162
  missingContractIds.push(contractId);
45516
45163
  });
45517
- const { maxFee } = await this.estimateTxGasAndFee({
45518
- transactionRequest
45519
- });
45520
- transactionRequest.maxFee = maxFee;
45521
45164
  } else {
45522
45165
  break;
45523
45166
  }
@@ -45525,139 +45168,37 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
45525
45168
  return {
45526
45169
  receipts,
45527
45170
  outputVariables,
45528
- missingContractIds,
45529
- dryrunStatus
45171
+ missingContractIds
45530
45172
  };
45531
45173
  }
45532
- /**
45533
- * Dry runs multiple transactions and checks for missing dependencies in batches.
45534
- *
45535
- * Transactions are dry run in batches. After each dry run, transactions requiring
45536
- * further modifications are identified. The method iteratively updates these transactions
45537
- * and performs subsequent dry runs until all dependencies for each transaction are satisfied.
45538
- *
45539
- * @param transactionRequests - Array of transaction request objects.
45540
- * @returns A promise that resolves to an array of results for each transaction.
45541
- */
45542
- async estimateMultipleTxDependencies(transactionRequests) {
45543
- const results = transactionRequests.map(() => ({
45544
- receipts: [],
45545
- outputVariables: 0,
45546
- missingContractIds: [],
45547
- dryrunStatus: void 0
45548
- }));
45549
- const allRequests = clone_default(transactionRequests);
45550
- const serializedTransactionsMap = /* @__PURE__ */ new Map();
45551
- allRequests.forEach((req, index) => {
45552
- if (req.type === TransactionType.Script) {
45553
- serializedTransactionsMap.set(index, hexlify(req.toTransactionBytes()));
45554
- }
45555
- });
45556
- let transactionsToProcess = Array.from(serializedTransactionsMap.keys());
45557
- let attempt = 0;
45558
- while (transactionsToProcess.length > 0 && attempt < MAX_RETRIES) {
45559
- const encodedTransactions = transactionsToProcess.map(
45560
- (index) => serializedTransactionsMap.get(index)
45561
- );
45562
- const dryRunResults = await this.operations.dryRun({
45563
- encodedTransactions,
45564
- utxoValidation: false
45565
- });
45566
- const nextRoundTransactions = [];
45567
- for (let i = 0; i < dryRunResults.dryRun.length; i++) {
45568
- const currentResultIndex = transactionsToProcess[i];
45569
- const { receipts: rawReceipts, status } = dryRunResults.dryRun[i];
45570
- results[currentResultIndex].receipts = rawReceipts.map(processGqlReceipt);
45571
- results[currentResultIndex].dryrunStatus = status;
45572
- const { missingOutputVariables, missingOutputContractIds } = getReceiptsWithMissingData(
45573
- results[currentResultIndex].receipts
45574
- );
45575
- const hasMissingOutputs = missingOutputVariables.length > 0 || missingOutputContractIds.length > 0;
45576
- const requestToProcess = allRequests[currentResultIndex];
45577
- if (hasMissingOutputs && requestToProcess?.type === TransactionType.Script) {
45578
- results[currentResultIndex].outputVariables += missingOutputVariables.length;
45579
- requestToProcess.addVariableOutputs(missingOutputVariables.length);
45580
- missingOutputContractIds.forEach(({ contractId }) => {
45581
- requestToProcess.addContractInputAndOutput(Address.fromString(contractId));
45582
- results[currentResultIndex].missingContractIds.push(contractId);
45583
- });
45584
- const { maxFee } = await this.estimateTxGasAndFee({
45585
- transactionRequest: requestToProcess
45586
- });
45587
- requestToProcess.maxFee = maxFee;
45588
- serializedTransactionsMap.set(
45589
- currentResultIndex,
45590
- hexlify(requestToProcess.toTransactionBytes())
45591
- );
45592
- nextRoundTransactions.push(currentResultIndex);
45593
- allRequests[currentResultIndex] = requestToProcess;
45594
- }
45595
- }
45596
- transactionsToProcess = nextRoundTransactions;
45597
- attempt += 1;
45598
- }
45599
- return results;
45600
- }
45601
- async dryRunMultipleTransactions(transactionRequests, { utxoValidation, estimateTxDependencies = true } = {}) {
45602
- if (estimateTxDependencies) {
45603
- return this.estimateMultipleTxDependencies(transactionRequests);
45604
- }
45605
- const encodedTransactions = transactionRequests.map((tx) => hexlify(tx.toTransactionBytes()));
45606
- const { dryRun: dryRunStatuses } = await this.operations.dryRun({
45607
- encodedTransactions,
45608
- utxoValidation: utxoValidation || false
45609
- });
45610
- const results = dryRunStatuses.map(({ receipts: rawReceipts, status }) => {
45611
- const receipts = rawReceipts.map(processGqlReceipt);
45612
- return { receipts, dryrunStatus: status };
45613
- });
45614
- return results;
45615
- }
45616
45174
  /**
45617
45175
  * Estimates the transaction gas and fee based on the provided transaction request.
45618
45176
  * @param transactionRequest - The transaction request object.
45619
45177
  * @returns An object containing the estimated minimum gas, minimum fee, maximum gas, and maximum fee.
45620
45178
  */
45621
- async estimateTxGasAndFee(params) {
45179
+ estimateTxGasAndFee(params) {
45622
45180
  const { transactionRequest } = params;
45623
- let { gasPrice } = params;
45181
+ const { gasPriceFactor, minGasPrice, maxGasPerTx } = this.getGasConfig();
45624
45182
  const chainInfo = this.getChain();
45625
- const { gasPriceFactor, maxGasPerTx } = this.getGasConfig();
45183
+ const gasPrice = transactionRequest.gasPrice.eq(0) ? minGasPrice : transactionRequest.gasPrice;
45184
+ transactionRequest.gasPrice = gasPrice;
45626
45185
  const minGas = transactionRequest.calculateMinGas(chainInfo);
45627
- if (!gasPrice) {
45628
- gasPrice = await this.estimateGasPrice(10);
45629
- }
45630
- const minFee = calculateGasFee({
45631
- gasPrice: bn(gasPrice),
45632
- gas: minGas,
45633
- priceFactor: gasPriceFactor,
45634
- tip: transactionRequest.tip
45635
- }).add(1);
45636
- let gasLimit = bn(0);
45186
+ const minFee = calculatePriceWithFactor(minGas, gasPrice, gasPriceFactor).normalizeZeroToOne();
45637
45187
  if (transactionRequest.type === TransactionType.Script) {
45638
- gasLimit = transactionRequest.gasLimit;
45639
45188
  if (transactionRequest.gasLimit.eq(0)) {
45640
45189
  transactionRequest.gasLimit = minGas;
45641
45190
  transactionRequest.gasLimit = maxGasPerTx.sub(
45642
45191
  transactionRequest.calculateMaxGas(chainInfo, minGas)
45643
45192
  );
45644
- gasLimit = transactionRequest.gasLimit;
45645
45193
  }
45646
45194
  }
45647
45195
  const maxGas = transactionRequest.calculateMaxGas(chainInfo, minGas);
45648
- const maxFee = calculateGasFee({
45649
- gasPrice: bn(gasPrice),
45650
- gas: maxGas,
45651
- priceFactor: gasPriceFactor,
45652
- tip: transactionRequest.tip
45653
- }).add(1);
45196
+ const maxFee = calculatePriceWithFactor(maxGas, gasPrice, gasPriceFactor).normalizeZeroToOne();
45654
45197
  return {
45655
45198
  minGas,
45656
45199
  minFee,
45657
45200
  maxGas,
45658
- maxFee,
45659
- gasPrice,
45660
- gasLimit
45201
+ maxFee
45661
45202
  };
45662
45203
  }
45663
45204
  /**
@@ -45675,17 +45216,15 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
45675
45216
  if (estimateTxDependencies) {
45676
45217
  return this.estimateTxDependencies(transactionRequest);
45677
45218
  }
45678
- const encodedTransactions = [hexlify(transactionRequest.toTransactionBytes())];
45679
- const { dryRun: dryRunStatuses } = await this.operations.dryRun({
45680
- encodedTransactions,
45219
+ const encodedTransaction = hexlify(transactionRequest.toTransactionBytes());
45220
+ const { dryRun: gqlReceipts } = await this.operations.dryRun({
45221
+ encodedTransaction,
45681
45222
  utxoValidation: true
45682
45223
  });
45683
- const callResult = dryRunStatuses.map((dryRunStatus) => {
45684
- const { id, receipts, status } = dryRunStatus;
45685
- const processedReceipts = receipts.map(processGqlReceipt);
45686
- return { id, receipts: processedReceipts, status };
45687
- });
45688
- return { receipts: callResult[0].receipts };
45224
+ const receipts = gqlReceipts.map(processGqlReceipt);
45225
+ return {
45226
+ receipts
45227
+ };
45689
45228
  }
45690
45229
  /**
45691
45230
  * Returns a transaction cost to enable user
@@ -45702,79 +45241,78 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
45702
45241
  * @param tolerance - The tolerance to add on top of the gasUsed.
45703
45242
  * @returns A promise that resolves to the transaction cost object.
45704
45243
  */
45705
- async getTransactionCost(transactionRequestLike, { resourcesOwner, signatureCallback, quantitiesToContract = [] } = {}) {
45244
+ async getTransactionCost(transactionRequestLike, forwardingQuantities = [], {
45245
+ estimateTxDependencies = true,
45246
+ estimatePredicates = true,
45247
+ resourcesOwner,
45248
+ signatureCallback
45249
+ } = {}) {
45706
45250
  const txRequestClone = clone_default(transactionRequestify(transactionRequestLike));
45251
+ const { minGasPrice } = this.getGasConfig();
45252
+ const setGasPrice = max(txRequestClone.gasPrice, minGasPrice);
45707
45253
  const isScriptTransaction = txRequestClone.type === TransactionType.Script;
45254
+ const baseAssetId = this.getBaseAssetId();
45708
45255
  const coinOutputsQuantities = txRequestClone.getCoinOutputsQuantities();
45709
- const allQuantities = mergeQuantities(coinOutputsQuantities, quantitiesToContract);
45710
- txRequestClone.fundWithFakeUtxos(allQuantities, resourcesOwner?.address);
45711
- txRequestClone.maxFee = bn(0);
45256
+ const allQuantities = mergeQuantities(coinOutputsQuantities, forwardingQuantities);
45257
+ txRequestClone.fundWithFakeUtxos(allQuantities, baseAssetId, resourcesOwner?.address);
45712
45258
  if (isScriptTransaction) {
45713
45259
  txRequestClone.gasLimit = bn(0);
45714
45260
  }
45715
- if (resourcesOwner && "populateTransactionPredicateData" in resourcesOwner) {
45716
- resourcesOwner.populateTransactionPredicateData(txRequestClone);
45261
+ if (estimatePredicates) {
45262
+ if (resourcesOwner && "populateTransactionPredicateData" in resourcesOwner) {
45263
+ resourcesOwner.populateTransactionPredicateData(txRequestClone);
45264
+ }
45265
+ await this.estimatePredicates(txRequestClone);
45717
45266
  }
45718
- const signedRequest = clone_default(txRequestClone);
45719
- let addedSignatures = 0;
45720
45267
  if (signatureCallback && isScriptTransaction) {
45721
- const lengthBefore = signedRequest.witnesses.length;
45722
- await signatureCallback(signedRequest);
45723
- addedSignatures = signedRequest.witnesses.length - lengthBefore;
45268
+ await signatureCallback(txRequestClone);
45724
45269
  }
45725
- await this.estimatePredicates(signedRequest);
45726
- let { maxFee, maxGas, minFee, minGas, gasPrice, gasLimit } = await this.estimateTxGasAndFee({
45727
- transactionRequest: signedRequest
45270
+ let { maxFee, maxGas, minFee, minGas } = this.estimateTxGasAndFee({
45271
+ transactionRequest: txRequestClone
45728
45272
  });
45729
45273
  let receipts = [];
45730
45274
  let missingContractIds = [];
45731
45275
  let outputVariables = 0;
45732
45276
  let gasUsed = bn(0);
45733
- txRequestClone.updatePredicateGasUsed(signedRequest.inputs);
45734
- txRequestClone.maxFee = maxFee;
45735
- if (isScriptTransaction) {
45736
- txRequestClone.gasLimit = gasLimit;
45737
- if (signatureCallback) {
45738
- await signatureCallback(txRequestClone);
45739
- }
45277
+ if (isScriptTransaction && estimateTxDependencies) {
45278
+ txRequestClone.gasPrice = bn(0);
45740
45279
  const result = await this.estimateTxDependencies(txRequestClone);
45741
45280
  receipts = result.receipts;
45742
45281
  outputVariables = result.outputVariables;
45743
45282
  missingContractIds = result.missingContractIds;
45744
45283
  gasUsed = isScriptTransaction ? getGasUsedFromReceipts(receipts) : gasUsed;
45745
45284
  txRequestClone.gasLimit = gasUsed;
45746
- ({ maxFee, maxGas, minFee, minGas, gasPrice } = await this.estimateTxGasAndFee({
45747
- transactionRequest: txRequestClone,
45748
- gasPrice
45285
+ txRequestClone.gasPrice = setGasPrice;
45286
+ ({ maxFee, maxGas, minFee, minGas } = this.estimateTxGasAndFee({
45287
+ transactionRequest: txRequestClone
45749
45288
  }));
45750
45289
  }
45751
45290
  return {
45752
45291
  requiredQuantities: allQuantities,
45753
45292
  receipts,
45754
45293
  gasUsed,
45755
- gasPrice,
45294
+ minGasPrice,
45295
+ gasPrice: setGasPrice,
45756
45296
  minGas,
45757
45297
  maxGas,
45758
45298
  minFee,
45759
45299
  maxFee,
45300
+ estimatedInputs: txRequestClone.inputs,
45760
45301
  outputVariables,
45761
- missingContractIds,
45762
- addedSignatures,
45763
- estimatedPredicates: txRequestClone.inputs
45302
+ missingContractIds
45764
45303
  };
45765
45304
  }
45766
- async getResourcesForTransaction(owner, transactionRequestLike, quantitiesToContract = []) {
45305
+ async getResourcesForTransaction(owner, transactionRequestLike, forwardingQuantities = []) {
45767
45306
  const ownerAddress = Address.fromAddressOrString(owner);
45768
45307
  const transactionRequest = transactionRequestify(clone_default(transactionRequestLike));
45769
- const transactionCost = await this.getTransactionCost(transactionRequest, {
45770
- quantitiesToContract
45771
- });
45308
+ const transactionCost = await this.getTransactionCost(transactionRequest, forwardingQuantities);
45772
45309
  transactionRequest.addResources(
45773
45310
  await this.getResourcesToSpend(ownerAddress, transactionCost.requiredQuantities)
45774
45311
  );
45775
- const { requiredQuantities, ...txCost } = await this.getTransactionCost(transactionRequest, {
45776
- quantitiesToContract
45777
- });
45312
+ const { requiredQuantities, ...txCost } = await this.getTransactionCost(
45313
+ transactionRequest,
45314
+ forwardingQuantities
45315
+ );
45778
45316
  const resources = await this.getResourcesToSpend(ownerAddress, requiredQuantities);
45779
45317
  return {
45780
45318
  resources,
@@ -45798,6 +45336,7 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
45798
45336
  assetId: coin.assetId,
45799
45337
  amount: bn(coin.amount),
45800
45338
  owner: Address.fromAddressOrString(coin.owner),
45339
+ maturity: bn(coin.maturity).toNumber(),
45801
45340
  blockCreated: bn(coin.blockCreated),
45802
45341
  txCreatedIdx: bn(coin.txCreatedIdx)
45803
45342
  }));
@@ -45849,6 +45388,7 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
45849
45388
  amount: bn(coin.amount),
45850
45389
  assetId: coin.assetId,
45851
45390
  owner: Address.fromAddressOrString(coin.owner),
45391
+ maturity: bn(coin.maturity).toNumber(),
45852
45392
  blockCreated: bn(coin.blockCreated),
45853
45393
  txCreatedIdx: bn(coin.txCreatedIdx)
45854
45394
  };
@@ -45881,7 +45421,7 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
45881
45421
  }
45882
45422
  return {
45883
45423
  id: block2.id,
45884
- height: bn(block2.height),
45424
+ height: bn(block2.header.height),
45885
45425
  time: block2.header.time,
45886
45426
  transactionIds: block2.transactions.map((tx) => tx.id)
45887
45427
  };
@@ -45896,7 +45436,7 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
45896
45436
  const { blocks: fetchedData } = await this.operations.getBlocks(params);
45897
45437
  const blocks = fetchedData.edges.map(({ node: block2 }) => ({
45898
45438
  id: block2.id,
45899
- height: bn(block2.height),
45439
+ height: bn(block2.header.height),
45900
45440
  time: block2.header.time,
45901
45441
  transactionIds: block2.transactions.map((tx) => tx.id)
45902
45442
  }));
@@ -45923,7 +45463,7 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
45923
45463
  }
45924
45464
  return {
45925
45465
  id: block2.id,
45926
- height: bn(block2.height, 10),
45466
+ height: bn(block2.header.height, 10),
45927
45467
  time: block2.header.time,
45928
45468
  transactionIds: block2.transactions.map((tx) => tx.id),
45929
45469
  transactions: block2.transactions.map(
@@ -46103,11 +45643,8 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
46103
45643
  prevRoot: messageBlockHeader.prevRoot,
46104
45644
  time: messageBlockHeader.time,
46105
45645
  applicationHash: messageBlockHeader.applicationHash,
46106
- messageReceiptCount: bn(messageBlockHeader.messageReceiptCount),
46107
- messageOutboxRoot: messageBlockHeader.messageOutboxRoot,
46108
- consensusParametersVersion: messageBlockHeader.consensusParametersVersion,
46109
- eventInboxRoot: messageBlockHeader.eventInboxRoot,
46110
- stateTransitionBytecodeVersion: messageBlockHeader.stateTransitionBytecodeVersion
45646
+ messageReceiptRoot: messageBlockHeader.messageReceiptRoot,
45647
+ messageReceiptCount: bn(messageBlockHeader.messageReceiptCount)
46111
45648
  },
46112
45649
  commitBlockHeader: {
46113
45650
  id: commitBlockHeader.id,
@@ -46118,11 +45655,8 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
46118
45655
  prevRoot: commitBlockHeader.prevRoot,
46119
45656
  time: commitBlockHeader.time,
46120
45657
  applicationHash: commitBlockHeader.applicationHash,
46121
- messageReceiptCount: bn(commitBlockHeader.messageReceiptCount),
46122
- messageOutboxRoot: commitBlockHeader.messageOutboxRoot,
46123
- consensusParametersVersion: commitBlockHeader.consensusParametersVersion,
46124
- eventInboxRoot: commitBlockHeader.eventInboxRoot,
46125
- stateTransitionBytecodeVersion: commitBlockHeader.stateTransitionBytecodeVersion
45658
+ messageReceiptRoot: commitBlockHeader.messageReceiptRoot,
45659
+ messageReceiptCount: bn(commitBlockHeader.messageReceiptCount)
46126
45660
  },
46127
45661
  sender: Address.fromAddressOrString(sender),
46128
45662
  recipient: Address.fromAddressOrString(recipient),
@@ -46131,16 +45665,6 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
46131
45665
  data
46132
45666
  };
46133
45667
  }
46134
- async getLatestGasPrice() {
46135
- const { latestGasPrice } = await this.operations.getLatestGasPrice();
46136
- return bn(latestGasPrice.gasPrice);
46137
- }
46138
- async estimateGasPrice(blockHorizon) {
46139
- const { estimateGasPrice } = await this.operations.estimateGasPrice({
46140
- blockHorizon: String(blockHorizon)
46141
- });
46142
- return bn(estimateGasPrice.gasPrice);
46143
- }
46144
45668
  /**
46145
45669
  * Returns Message Proof for given transaction id and the message id from MessageOut receipt.
46146
45670
  *
@@ -46386,8 +45910,9 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
46386
45910
  * @param assetId - The asset ID to check the balance for.
46387
45911
  * @returns A promise that resolves to the balance amount.
46388
45912
  */
46389
- async getBalance(assetId = BaseAssetId) {
46390
- const amount = await this.provider.getBalance(this.address, assetId);
45913
+ async getBalance(assetId) {
45914
+ const assetIdToFetch = assetId ?? this.provider.getBaseAssetId();
45915
+ const amount = await this.provider.getBalance(this.address, assetIdToFetch);
46391
45916
  return amount;
46392
45917
  }
46393
45918
  /**
@@ -46424,33 +45949,37 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
46424
45949
  * @param fee - The estimated transaction fee.
46425
45950
  * @returns A promise that resolves when the resources are added to the transaction.
46426
45951
  */
46427
- async fund(request, params) {
46428
- const { addedSignatures, estimatedPredicates, maxFee: fee, requiredQuantities } = params;
46429
- const txRequest = request;
46430
- const requiredQuantitiesWithFee = addAmountToCoinQuantities({
45952
+ async fund(request, coinQuantities, fee) {
45953
+ const baseAssetId = this.provider.getBaseAssetId();
45954
+ const updatedQuantities = addAmountToAsset({
46431
45955
  amount: bn(fee),
46432
- assetId: BaseAssetId,
46433
- coinQuantities: requiredQuantities
45956
+ assetId: baseAssetId,
45957
+ coinQuantities
46434
45958
  });
46435
45959
  const quantitiesDict = {};
46436
- requiredQuantitiesWithFee.forEach(({ amount, assetId }) => {
45960
+ updatedQuantities.forEach(({ amount, assetId }) => {
46437
45961
  quantitiesDict[assetId] = {
46438
45962
  required: amount,
46439
45963
  owned: bn(0)
46440
45964
  };
46441
45965
  });
46442
- txRequest.inputs.forEach((input) => {
45966
+ const cachedUtxos = [];
45967
+ const cachedMessages = [];
45968
+ const owner = this.address.toB256();
45969
+ request.inputs.forEach((input) => {
46443
45970
  const isResource = "amount" in input;
46444
45971
  if (isResource) {
46445
45972
  const isCoin2 = "owner" in input;
46446
45973
  if (isCoin2) {
46447
45974
  const assetId = String(input.assetId);
46448
- if (quantitiesDict[assetId]) {
45975
+ if (input.owner === owner && quantitiesDict[assetId]) {
46449
45976
  const amount = bn(input.amount);
46450
45977
  quantitiesDict[assetId].owned = quantitiesDict[assetId].owned.add(amount);
45978
+ cachedUtxos.push(input.id);
46451
45979
  }
46452
- } else if (input.amount && quantitiesDict[BaseAssetId]) {
46453
- quantitiesDict[BaseAssetId].owned = quantitiesDict[BaseAssetId].owned.add(input.amount);
45980
+ } else if (input.recipient === owner && input.amount && quantitiesDict[baseAssetId]) {
45981
+ quantitiesDict[baseAssetId].owned = quantitiesDict[baseAssetId].owned.add(input.amount);
45982
+ cachedMessages.push(input.nonce);
46454
45983
  }
46455
45984
  }
46456
45985
  });
@@ -46465,23 +45994,12 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
46465
45994
  });
46466
45995
  const needsToBeFunded = missingQuantities.length;
46467
45996
  if (needsToBeFunded) {
46468
- const excludedIds = cacheTxInputsFromOwner(txRequest.inputs, this.address.toB256());
46469
- const resources = await this.getResourcesToSpend(missingQuantities, excludedIds);
46470
- txRequest.addResources(resources);
46471
- }
46472
- txRequest.shiftPredicateData();
46473
- txRequest.updatePredicateGasUsed(estimatedPredicates);
46474
- const requestToBeReEstimate = clone_default(txRequest);
46475
- if (addedSignatures) {
46476
- Array.from({ length: addedSignatures }).forEach(
46477
- () => requestToBeReEstimate.addEmptyWitness()
46478
- );
45997
+ const resources = await this.getResourcesToSpend(missingQuantities, {
45998
+ messages: cachedMessages,
45999
+ utxos: cachedUtxos
46000
+ });
46001
+ request.addResources(resources);
46479
46002
  }
46480
- const { maxFee } = await this.provider.estimateTxGasAndFee({
46481
- transactionRequest: requestToBeReEstimate
46482
- });
46483
- txRequest.maxFee = maxFee;
46484
- return txRequest;
46485
46003
  }
46486
46004
  /**
46487
46005
  * A helper that creates a transfer transaction request and returns it.
@@ -46489,25 +46007,30 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
46489
46007
  * @param destination - The address of the destination.
46490
46008
  * @param amount - The amount of coins to transfer.
46491
46009
  * @param assetId - The asset ID of the coins to transfer.
46492
- * @param txParams - The transaction parameters (gasLimit, tip, maturity, maxFee, witnessLimit).
46010
+ * @param txParams - The transaction parameters (gasLimit, gasPrice, maturity).
46493
46011
  * @returns A promise that resolves to the prepared transaction request.
46494
46012
  */
46495
- async createTransfer(destination, amount, assetId = BaseAssetId, txParams = {}) {
46496
- const request = new ScriptTransactionRequest(txParams);
46497
- request.addCoinOutput(Address.fromAddressOrString(destination), amount, assetId);
46498
- const txCost = await this.provider.getTransactionCost(request, {
46013
+ async createTransfer(destination, amount, assetId, txParams = {}) {
46014
+ const { minGasPrice } = this.provider.getGasConfig();
46015
+ const baseAssetId = this.provider.getBaseAssetId();
46016
+ const assetIdToTransfer = assetId ?? this.provider.getBaseAssetId();
46017
+ const params = { gasPrice: minGasPrice, baseAssetId, ...txParams };
46018
+ const request = new ScriptTransactionRequest(params);
46019
+ request.addCoinOutput(Address.fromAddressOrString(destination), amount, assetIdToTransfer);
46020
+ const { maxFee, requiredQuantities, gasUsed, estimatedInputs } = await this.provider.getTransactionCost(request, [], {
46499
46021
  estimateTxDependencies: true,
46500
46022
  resourcesOwner: this
46501
46023
  });
46502
- if ("gasLimit" in txParams) {
46503
- this.validateGas({
46504
- gasUsed: txCost.gasUsed,
46505
- gasLimit: request.gasLimit
46506
- });
46507
- }
46508
- request.gasLimit = txCost.gasUsed;
46509
- request.maxFee = txCost.maxFee;
46510
- await this.fund(request, txCost);
46024
+ request.gasPrice = bn(txParams.gasPrice ?? minGasPrice);
46025
+ request.gasLimit = bn(txParams.gasLimit ?? gasUsed);
46026
+ this.validateGas({
46027
+ gasUsed,
46028
+ gasPrice: request.gasPrice,
46029
+ gasLimit: request.gasLimit,
46030
+ minGasPrice
46031
+ });
46032
+ await this.fund(request, requiredQuantities, maxFee);
46033
+ request.updatePredicateInputs(estimatedInputs);
46511
46034
  return request;
46512
46035
  }
46513
46036
  /**
@@ -46519,14 +46042,15 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
46519
46042
  * @param txParams - The transaction parameters (gasLimit, gasPrice, maturity).
46520
46043
  * @returns A promise that resolves to the transaction response.
46521
46044
  */
46522
- async transfer(destination, amount, assetId = BaseAssetId, txParams = {}) {
46045
+ async transfer(destination, amount, assetId, txParams = {}) {
46523
46046
  if (bn(amount).lte(0)) {
46524
46047
  throw new FuelError(
46525
46048
  ErrorCode.INVALID_TRANSFER_AMOUNT,
46526
46049
  "Transfer amount must be a positive number."
46527
46050
  );
46528
46051
  }
46529
- const request = await this.createTransfer(destination, amount, assetId, txParams);
46052
+ const assetIdToTransfer = assetId ?? this.provider.getBaseAssetId();
46053
+ const request = await this.createTransfer(destination, amount, assetIdToTransfer, txParams);
46530
46054
  return this.sendTransaction(request, { estimateTxDependencies: false });
46531
46055
  }
46532
46056
  /**
@@ -46538,7 +46062,7 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
46538
46062
  * @param txParams - The optional transaction parameters.
46539
46063
  * @returns A promise that resolves to the transaction response.
46540
46064
  */
46541
- async transferToContract(contractId, amount, assetId = BaseAssetId, txParams = {}) {
46065
+ async transferToContract(contractId, amount, assetId, txParams = {}) {
46542
46066
  if (bn(amount).lte(0)) {
46543
46067
  throw new FuelError(
46544
46068
  ErrorCode.INVALID_TRANSFER_AMOUNT,
@@ -46546,30 +46070,33 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
46546
46070
  );
46547
46071
  }
46548
46072
  const contractAddress = Address.fromAddressOrString(contractId);
46073
+ const { minGasPrice } = this.provider.getGasConfig();
46074
+ const baseAssetId = this.provider.getBaseAssetId();
46075
+ const assetIdToTransfer = assetId ?? this.provider.getBaseAssetId();
46076
+ const params = { gasPrice: minGasPrice, baseAssetId, ...txParams };
46549
46077
  const { script, scriptData } = await assembleTransferToContractScript({
46550
46078
  hexlifiedContractId: contractAddress.toB256(),
46551
46079
  amountToTransfer: bn(amount),
46552
- assetId
46080
+ assetId: assetIdToTransfer
46553
46081
  });
46554
46082
  const request = new ScriptTransactionRequest({
46555
- ...txParams,
46083
+ ...params,
46556
46084
  script,
46557
46085
  scriptData
46558
46086
  });
46559
46087
  request.addContractInputAndOutput(contractAddress);
46560
- const txCost = await this.provider.getTransactionCost(request, {
46561
- resourcesOwner: this,
46562
- quantitiesToContract: [{ amount: bn(amount), assetId: String(assetId) }]
46088
+ const { maxFee, requiredQuantities, gasUsed } = await this.provider.getTransactionCost(
46089
+ request,
46090
+ [{ amount: bn(amount), assetId: String(assetIdToTransfer) }]
46091
+ );
46092
+ request.gasLimit = bn(params.gasLimit ?? gasUsed);
46093
+ this.validateGas({
46094
+ gasUsed,
46095
+ gasPrice: request.gasPrice,
46096
+ gasLimit: request.gasLimit,
46097
+ minGasPrice
46563
46098
  });
46564
- if (txParams.gasLimit) {
46565
- this.validateGas({
46566
- gasUsed: txCost.gasUsed,
46567
- gasLimit: request.gasLimit
46568
- });
46569
- }
46570
- request.gasLimit = txCost.gasUsed;
46571
- request.maxFee = txCost.maxFee;
46572
- await this.fund(request, txCost);
46099
+ await this.fund(request, requiredQuantities, maxFee);
46573
46100
  return this.sendTransaction(request);
46574
46101
  }
46575
46102
  /**
@@ -46581,6 +46108,8 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
46581
46108
  * @returns A promise that resolves to the transaction response.
46582
46109
  */
46583
46110
  async withdrawToBaseLayer(recipient, amount, txParams = {}) {
46111
+ const { minGasPrice } = this.provider.getGasConfig();
46112
+ const baseAssetId = this.provider.getBaseAssetId();
46584
46113
  const recipientAddress = Address.fromAddressOrString(recipient);
46585
46114
  const recipientDataArray = arrayify(
46586
46115
  "0x".concat(recipientAddress.toHexString().substring(2).padStart(64, "0"))
@@ -46593,19 +46122,25 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
46593
46122
  ...recipientDataArray,
46594
46123
  ...amountDataArray
46595
46124
  ]);
46596
- const params = { script, ...txParams };
46125
+ const params = {
46126
+ script,
46127
+ gasPrice: minGasPrice,
46128
+ ...txParams
46129
+ };
46597
46130
  const request = new ScriptTransactionRequest(params);
46598
- const quantitiesToContract = [{ amount: bn(amount), assetId: BaseAssetId }];
46599
- const txCost = await this.provider.getTransactionCost(request, { quantitiesToContract });
46600
- if (txParams.gasLimit) {
46601
- this.validateGas({
46602
- gasUsed: txCost.gasUsed,
46603
- gasLimit: request.gasLimit
46604
- });
46605
- }
46606
- request.maxFee = txCost.maxFee;
46607
- request.gasLimit = txCost.gasUsed;
46608
- await this.fund(request, txCost);
46131
+ const forwardingQuantities = [{ amount: bn(amount), assetId: baseAssetId }];
46132
+ const { requiredQuantities, maxFee, gasUsed } = await this.provider.getTransactionCost(
46133
+ request,
46134
+ forwardingQuantities
46135
+ );
46136
+ request.gasLimit = bn(params.gasLimit ?? gasUsed);
46137
+ this.validateGas({
46138
+ gasUsed,
46139
+ gasPrice: request.gasPrice,
46140
+ gasLimit: request.gasLimit,
46141
+ minGasPrice
46142
+ });
46143
+ await this.fund(request, requiredQuantities, maxFee);
46609
46144
  return this.sendTransaction(request);
46610
46145
  }
46611
46146
  async signMessage(message) {
@@ -46663,7 +46198,18 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
46663
46198
  }
46664
46199
  return this.provider.simulate(transactionRequest, { estimateTxDependencies: false });
46665
46200
  }
46666
- validateGas({ gasUsed, gasLimit }) {
46201
+ validateGas({
46202
+ gasUsed,
46203
+ gasPrice,
46204
+ gasLimit,
46205
+ minGasPrice
46206
+ }) {
46207
+ if (minGasPrice.gt(gasPrice)) {
46208
+ throw new FuelError(
46209
+ ErrorCode.GAS_PRICE_TOO_LOW,
46210
+ `Gas price '${gasPrice}' is lower than the required: '${minGasPrice}'.`
46211
+ );
46212
+ }
46667
46213
  if (gasUsed.gt(gasLimit)) {
46668
46214
  throw new FuelError(
46669
46215
  ErrorCode.GAS_LIMIT_TOO_LOW,
@@ -48252,7 +47798,7 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
48252
47798
  * @param transactionRequestLike - The transaction request to send.
48253
47799
  * @returns A promise that resolves to the TransactionResponse object.
48254
47800
  */
48255
- async sendTransaction(transactionRequestLike, { estimateTxDependencies = false, awaitExecution } = {}) {
47801
+ async sendTransaction(transactionRequestLike, { estimateTxDependencies = true, awaitExecution } = {}) {
48256
47802
  const transactionRequest = transactionRequestify(transactionRequestLike);
48257
47803
  if (estimateTxDependencies) {
48258
47804
  await this.provider.estimateTxDependencies(transactionRequest);
@@ -51012,15 +50558,14 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
51012
50558
  process.env.GENESIS_SECRET || randomBytes22(32),
51013
50559
  wallet.provider
51014
50560
  );
51015
- const request = new ScriptTransactionRequest();
51016
- quantities.forEach((quantity) => {
51017
- const { amount, assetId } = coinQuantityfy(quantity);
51018
- request.addCoinOutput(wallet.address, amount, assetId);
50561
+ const resources = await genesisWallet.getResourcesToSpend(quantities);
50562
+ const { minGasPrice } = genesisWallet.provider.getGasConfig();
50563
+ const request = new ScriptTransactionRequest({
50564
+ gasLimit: 1e4,
50565
+ gasPrice: minGasPrice
51019
50566
  });
51020
- const txCost = await genesisWallet.provider.getTransactionCost(request);
51021
- request.gasLimit = txCost.gasUsed;
51022
- request.maxFee = txCost.maxFee;
51023
- await genesisWallet.fund(request, txCost);
50567
+ request.addResources(resources);
50568
+ quantities.map(coinQuantityfy).forEach(({ amount, assetId }) => request.addCoinOutput(wallet.address, amount, assetId));
51024
50569
  await genesisWallet.sendTransaction(request, { awaitExecution: true });
51025
50570
  };
51026
50571
 
@@ -51050,7 +50595,7 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
51050
50595
 
51051
50596
  // src/test-utils/launchNode.ts
51052
50597
  var import_child_process = __require("child_process");
51053
- var import_crypto22 = __require("crypto");
50598
+ var import_crypto21 = __require("crypto");
51054
50599
  var import_fs2 = __require("fs");
51055
50600
  var import_os = __toESM(__require("os"));
51056
50601
  var import_path8 = __toESM(__require("path"));
@@ -51099,12 +50644,12 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
51099
50644
  // eslint-disable-next-line no-async-promise-executor
51100
50645
  new Promise(async (resolve, reject) => {
51101
50646
  const remainingArgs = extractRemainingArgs(args, [
51102
- "--snapshot",
50647
+ "--chain",
51103
50648
  "--consensus-key",
51104
50649
  "--db-type",
51105
50650
  "--poa-instant"
51106
50651
  ]);
51107
- const chainConfigPath = getFlagValueFromArgs(args, "--snapshot");
50652
+ const chainConfigPath = getFlagValueFromArgs(args, "--chain");
51108
50653
  const consensusKey = getFlagValueFromArgs(args, "--consensus-key") || defaultConsensusKey;
51109
50654
  const dbTypeFlagValue = getFlagValueFromArgs(args, "--db-type");
51110
50655
  const useInMemoryDb = dbTypeFlagValue === "in-memory" || dbTypeFlagValue === void 0;
@@ -51122,55 +50667,37 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
51122
50667
  })).toString();
51123
50668
  let chainConfigPathToUse;
51124
50669
  const prefix = basePath || import_os.default.tmpdir();
51125
- const suffix = basePath ? "" : (0, import_crypto22.randomUUID)();
51126
- const tempDirPath = import_path8.default.join(prefix, ".fuels", suffix, "chainConfigs");
50670
+ const suffix = basePath ? "" : (0, import_crypto21.randomUUID)();
50671
+ const tempDirPath = import_path8.default.join(prefix, ".fuels", suffix);
51127
50672
  if (chainConfigPath) {
51128
50673
  chainConfigPathToUse = chainConfigPath;
51129
50674
  } else {
51130
50675
  if (!(0, import_fs2.existsSync)(tempDirPath)) {
51131
50676
  (0, import_fs2.mkdirSync)(tempDirPath, { recursive: true });
51132
50677
  }
51133
- let { stateConfigJson } = defaultChainConfigs;
51134
- const { chainConfigJson, metadataJson } = defaultChainConfigs;
51135
- stateConfigJson = {
51136
- ...stateConfigJson,
51137
- coins: [
51138
- ...stateConfigJson.coins.map((coin) => ({
51139
- ...coin,
51140
- amount: "18446744073709551615"
51141
- }))
51142
- ],
51143
- messages: stateConfigJson.messages.map((message) => ({
51144
- ...message,
51145
- amount: "18446744073709551615"
51146
- }))
51147
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
51148
- };
50678
+ const tempChainConfigFilePath = import_path8.default.join(tempDirPath, "chainConfig.json");
50679
+ let chainConfig = defaultChainConfig;
51149
50680
  if (!process.env.GENESIS_SECRET) {
51150
50681
  const pk = Signer.generatePrivateKey();
51151
50682
  const signer = new Signer(pk);
51152
50683
  process.env.GENESIS_SECRET = hexlify(pk);
51153
- stateConfigJson.coins.push({
51154
- tx_id: hexlify(randomBytes22(UTXO_ID_LEN)),
51155
- owner: signer.address.toHexString(),
51156
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
51157
- amount: "18446744073709551615",
51158
- asset_id: BaseAssetId,
51159
- output_index: 0,
51160
- tx_pointer_block_height: 0,
51161
- tx_pointer_tx_idx: 0
51162
- });
50684
+ chainConfig = {
50685
+ ...defaultChainConfig,
50686
+ initial_state: {
50687
+ ...defaultChainConfig.initial_state,
50688
+ coins: [
50689
+ ...defaultChainConfig.initial_state.coins,
50690
+ {
50691
+ owner: signer.address.toHexString(),
50692
+ amount: toHex(1e9),
50693
+ asset_id: defaultChainConfig?.consensus_parameters?.base_asset_id ?? ZeroBytes32
50694
+ }
50695
+ ]
50696
+ }
50697
+ };
51163
50698
  }
51164
- let fixedStateConfigJSON = JSON.stringify(stateConfigJson);
51165
- const regexMakeNumber = /("amount":)"(\d+)"/gm;
51166
- fixedStateConfigJSON = fixedStateConfigJSON.replace(regexMakeNumber, "$1$2");
51167
- const chainConfigWritePath = import_path8.default.join(tempDirPath, "chainConfig.json");
51168
- const stateConfigWritePath = import_path8.default.join(tempDirPath, "stateConfig.json");
51169
- const metadataWritePath = import_path8.default.join(tempDirPath, "metadata.json");
51170
- (0, import_fs2.writeFileSync)(chainConfigWritePath, JSON.stringify(chainConfigJson), "utf8");
51171
- (0, import_fs2.writeFileSync)(stateConfigWritePath, fixedStateConfigJSON, "utf8");
51172
- (0, import_fs2.writeFileSync)(metadataWritePath, JSON.stringify(metadataJson), "utf8");
51173
- chainConfigPathToUse = tempDirPath;
50699
+ (0, import_fs2.writeFileSync)(tempChainConfigFilePath, JSON.stringify(chainConfig), "utf8");
50700
+ chainConfigPathToUse = tempChainConfigFilePath;
51174
50701
  }
51175
50702
  const child = (0, import_child_process.spawn)(
51176
50703
  command,
@@ -51179,10 +50706,10 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
51179
50706
  ["--ip", ipToUse],
51180
50707
  ["--port", portToUse],
51181
50708
  useInMemoryDb ? ["--db-type", "in-memory"] : ["--db-path", tempDirPath],
51182
- ["--min-gas-price", "1"],
50709
+ ["--min-gas-price", "0"],
51183
50710
  poaInstant ? ["--poa-instant", "true"] : [],
51184
50711
  ["--consensus-key", consensusKey],
51185
- ["--snapshot", chainConfigPathToUse],
50712
+ ["--chain", chainConfigPathToUse],
51186
50713
  "--vm-backtrace",
51187
50714
  "--utxo-validation",
51188
50715
  "--debug",
@@ -51229,9 +50756,10 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
51229
50756
  })
51230
50757
  );
51231
50758
  var generateWallets = async (count, provider) => {
50759
+ const baseAssetId = provider.getBaseAssetId();
51232
50760
  const wallets = [];
51233
50761
  for (let i = 0; i < count; i += 1) {
51234
- const wallet = await generateTestWallet(provider, [[1e3, BaseAssetId]]);
50762
+ const wallet = await generateTestWallet(provider, [[1e3, baseAssetId]]);
51235
50763
  wallets.push(wallet);
51236
50764
  }
51237
50765
  return wallets;
@@ -51241,7 +50769,7 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
51241
50769
  walletCount = 10
51242
50770
  } = {}) => {
51243
50771
  const { cleanup: closeNode, ip, port } = await launchNode(launchNodeOptions || {});
51244
- const provider = await Provider.create(`http://${ip}:${port}/v1/graphql`);
50772
+ const provider = await Provider.create(`http://${ip}:${port}/graphql`);
51245
50773
  const wallets = await generateWallets(walletCount, provider);
51246
50774
  const cleanup = () => {
51247
50775
  closeNode();