@ozdao/prometheus-framework 0.2.89 → 0.2.91

Sign up to get free protection for your applications and to get access to all the features.
Files changed (182) hide show
  1. package/dist/auth.server.js +1 -0
  2. package/dist/auth.server.mjs +1 -0
  3. package/dist/main-BQisDfLk.js +92 -0
  4. package/dist/main-BV1Yv9Hy.js +92 -0
  5. package/dist/main-DTlUA63C.mjs +13617 -0
  6. package/dist/main-DmNP-t33.mjs +13625 -0
  7. package/dist/main.css +1 -1
  8. package/dist/node_modules/embla-carousel/esm/embla-carousel.esm.cjs +1 -1
  9. package/dist/node_modules/embla-carousel/esm/embla-carousel.esm.js +748 -750
  10. package/dist/node_modules/embla-carousel-autoplay/esm/embla-carousel-autoplay.esm.cjs +1 -1
  11. package/dist/node_modules/embla-carousel-autoplay/esm/embla-carousel-autoplay.esm.js +40 -39
  12. package/dist/node_modules/web3/lib/esm/index.cjs +1 -1
  13. package/dist/node_modules/web3/lib/esm/index.js +42 -41
  14. package/dist/node_modules/web3/lib/esm/version.cjs +1 -1
  15. package/dist/node_modules/web3/lib/esm/version.js +1 -1
  16. package/dist/node_modules/web3-eth/lib/esm/schemas.cjs +1 -1
  17. package/dist/node_modules/web3-eth/lib/esm/schemas.js +113 -88
  18. package/dist/node_modules/web3-eth-contract/lib/esm/contract.cjs +3 -1
  19. package/dist/node_modules/web3-eth-contract/lib/esm/contract.js +242 -217
  20. package/dist/node_modules/web3-eth-contract/lib/esm/encoding.cjs +1 -1
  21. package/dist/node_modules/web3-eth-contract/lib/esm/encoding.js +43 -37
  22. package/dist/node_modules/web3-eth-ens/lib/esm/config.cjs +1 -1
  23. package/dist/node_modules/web3-eth-ens/lib/esm/config.js +3 -1
  24. package/dist/node_modules/web3-eth-ens/lib/esm/ens.cjs +1 -1
  25. package/dist/node_modules/web3-eth-ens/lib/esm/ens.js +34 -13
  26. package/dist/node_modules/web3-eth-ens/lib/esm/resolver.cjs +1 -1
  27. package/dist/node_modules/web3-eth-ens/lib/esm/resolver.js +48 -36
  28. package/dist/node_modules/web3-utils/lib/esm/chunk_response_parser.cjs +1 -1
  29. package/dist/node_modules/web3-utils/lib/esm/chunk_response_parser.js +2 -2
  30. package/dist/node_modules/web3-utils/lib/esm/converters.cjs +1 -1
  31. package/dist/node_modules/web3-utils/lib/esm/converters.js +52 -50
  32. package/dist/node_modules/web3-utils/lib/esm/uint8array.cjs +1 -1
  33. package/dist/node_modules/web3-utils/lib/esm/uint8array.js +13 -13
  34. package/dist/node_modules/web3-validator/lib/esm/utils.cjs +1 -1
  35. package/dist/node_modules/web3-validator/lib/esm/utils.js +76 -87
  36. package/dist/node_modules/web3-validator/lib/esm/validator.cjs +1 -1
  37. package/dist/node_modules/web3-validator/lib/esm/validator.js +49 -47
  38. package/dist/prometheus-framework/node_modules/@capacitor/core/dist/index.cjs +1 -1
  39. package/dist/prometheus-framework/node_modules/@capacitor/core/dist/index.js +168 -158
  40. package/dist/prometheus-framework/src/components/Button/Button.vue.cjs +1 -1
  41. package/dist/prometheus-framework/src/components/Button/Button.vue.js +94 -1
  42. package/dist/prometheus-framework/src/components/Button/Button.vue2.cjs +1 -1
  43. package/dist/prometheus-framework/src/components/Button/Button.vue2.js +1 -102
  44. package/dist/prometheus-framework/src/components/Field/Field.vue.cjs +1 -1
  45. package/dist/prometheus-framework/src/components/Field/Field.vue.js +84 -1
  46. package/dist/prometheus-framework/src/components/Field/Field.vue2.cjs +1 -1
  47. package/dist/prometheus-framework/src/components/Field/Field.vue2.js +1 -84
  48. package/dist/prometheus-framework/src/components/FieldBig/FieldBig.vue.cjs +1 -1
  49. package/dist/prometheus-framework/src/components/FieldBig/FieldBig.vue.js +1 -1
  50. package/dist/prometheus-framework/src/components/FieldPhone/FieldPhone.vue.cjs +1 -1
  51. package/dist/prometheus-framework/src/components/FieldPhone/FieldPhone.vue.js +17 -16
  52. package/dist/prometheus-framework/src/components/Popup/Popup.vue.cjs +1 -1
  53. package/dist/prometheus-framework/src/components/Popup/Popup.vue.js +73 -1
  54. package/dist/prometheus-framework/src/components/Popup/Popup.vue2.cjs +1 -1
  55. package/dist/prometheus-framework/src/components/Popup/Popup.vue2.js +1 -73
  56. package/dist/prometheus-framework/src/modules/auth/components/layouts/Auth.vue.cjs +1 -1
  57. package/dist/prometheus-framework/src/modules/auth/components/layouts/Auth.vue.js +9 -8
  58. package/dist/prometheus-framework/src/modules/auth/components/pages/EnterCode.vue.cjs +1 -1
  59. package/dist/prometheus-framework/src/modules/auth/components/pages/EnterCode.vue.js +1 -1
  60. package/dist/prometheus-framework/src/modules/auth/components/pages/EnterPassword.vue.cjs +1 -1
  61. package/dist/prometheus-framework/src/modules/auth/components/pages/EnterPassword.vue.js +2 -2
  62. package/dist/prometheus-framework/src/modules/auth/components/pages/Invite.vue.cjs +1 -1
  63. package/dist/prometheus-framework/src/modules/auth/components/pages/Invite.vue.js +2 -2
  64. package/dist/prometheus-framework/src/modules/auth/components/pages/ResetPassword.vue.cjs +1 -1
  65. package/dist/prometheus-framework/src/modules/auth/components/pages/ResetPassword.vue.js +28 -29
  66. package/dist/prometheus-framework/src/modules/auth/components/pages/SignIn.vue.cjs +1 -1
  67. package/dist/prometheus-framework/src/modules/auth/components/pages/SignIn.vue.js +65 -65
  68. package/dist/prometheus-framework/src/modules/auth/components/pages/SignUp.vue.cjs +1 -1
  69. package/dist/prometheus-framework/src/modules/auth/components/pages/SignUp.vue.js +38 -39
  70. package/dist/prometheus-framework/src/modules/auth/store/auth.cjs +1 -1
  71. package/dist/prometheus-framework/src/modules/auth/store/auth.js +35 -37
  72. package/dist/prometheus-framework/src/modules/auth/store/twofa.cjs +1 -1
  73. package/dist/prometheus-framework/src/modules/auth/store/twofa.js +3 -3
  74. package/dist/prometheus-framework/src/modules/backoffice/components/pages/Dashboard.vue.cjs +1 -1
  75. package/dist/prometheus-framework/src/modules/backoffice/components/pages/Dashboard.vue.js +1 -1
  76. package/dist/prometheus-framework/src/modules/community/components/pages/Community.vue.cjs +1 -1
  77. package/dist/prometheus-framework/src/modules/community/components/pages/Community.vue.js +11 -10
  78. package/dist/prometheus-framework/src/modules/community/components/pages/CreateBlogPost.vue.cjs +1 -1
  79. package/dist/prometheus-framework/src/modules/community/components/pages/CreateBlogPost.vue.js +3 -3
  80. package/dist/prometheus-framework/src/modules/community/components/sections/HotPosts.vue.cjs +1 -1
  81. package/dist/prometheus-framework/src/modules/community/components/sections/HotPosts.vue.js +1 -1
  82. package/dist/prometheus-framework/src/modules/constructor/components/elements/Embed.vue.cjs +1 -1
  83. package/dist/prometheus-framework/src/modules/constructor/components/elements/Embed.vue.js +1 -1
  84. package/dist/prometheus-framework/src/modules/events/components/elements/ButtonCheck.vue.cjs +1 -1
  85. package/dist/prometheus-framework/src/modules/events/components/elements/ButtonCheck.vue.js +2 -2
  86. package/dist/prometheus-framework/src/modules/events/components/elements/ButtonJoin.vue.cjs +1 -1
  87. package/dist/prometheus-framework/src/modules/events/components/elements/ButtonJoin.vue.js +1 -1
  88. package/dist/prometheus-framework/src/modules/events/components/pages/EditEvent.vue.cjs +1 -1
  89. package/dist/prometheus-framework/src/modules/events/components/pages/EditEvent.vue.js +3 -3
  90. package/dist/prometheus-framework/src/modules/events/components/pages/EditEventTickets.vue.cjs +1 -1
  91. package/dist/prometheus-framework/src/modules/events/components/pages/EditEventTickets.vue.js +3 -3
  92. package/dist/prometheus-framework/src/modules/gallery/components/sections/BackofficeGallery.vue.cjs +1 -1
  93. package/dist/prometheus-framework/src/modules/gallery/components/sections/BackofficeGallery.vue.js +2 -2
  94. package/dist/prometheus-framework/src/modules/gallery/components/sections/GalleryWithCategories.vue.cjs +1 -1
  95. package/dist/prometheus-framework/src/modules/gallery/components/sections/GalleryWithCategories.vue.js +2 -2
  96. package/dist/prometheus-framework/src/modules/globals/components/blocks/BlockSearch.vue.cjs +1 -1
  97. package/dist/prometheus-framework/src/modules/globals/components/blocks/BlockSearch.vue.js +1 -1
  98. package/dist/prometheus-framework/src/modules/globals/components/blocks/CardHeader.vue.cjs +1 -1
  99. package/dist/prometheus-framework/src/modules/globals/components/blocks/CardHeader.vue.js +4 -3
  100. package/dist/prometheus-framework/src/modules/legal/components/pages/Legal.vue.cjs +1 -1
  101. package/dist/prometheus-framework/src/modules/legal/components/pages/Legal.vue.js +6 -5
  102. package/dist/prometheus-framework/src/modules/middlewares/client/inputs.validation.cjs +1 -1
  103. package/dist/prometheus-framework/src/modules/middlewares/client/inputs.validation.js +10 -13
  104. package/dist/prometheus-framework/src/modules/mobile/components/Menu/Menu.vue.cjs +1 -1
  105. package/dist/prometheus-framework/src/modules/mobile/components/Menu/Menu.vue.js +13 -1
  106. package/dist/prometheus-framework/src/modules/mobile/components/Menu/Menu.vue2.cjs +1 -1
  107. package/dist/prometheus-framework/src/modules/mobile/components/Menu/Menu.vue2.js +1 -13
  108. package/dist/prometheus-framework/src/modules/orders/components/pages/OrderCreateBackoffice.vue.cjs +1 -1
  109. package/dist/prometheus-framework/src/modules/orders/components/pages/OrderCreateBackoffice.vue.js +3 -3
  110. package/dist/prometheus-framework/src/modules/orders/components/sections/FormAddCustomer.vue.cjs +1 -1
  111. package/dist/prometheus-framework/src/modules/orders/components/sections/FormAddCustomer.vue.js +2 -2
  112. package/dist/prometheus-framework/src/modules/orders/components/sections/FormCustomerDetails.vue.cjs +1 -1
  113. package/dist/prometheus-framework/src/modules/orders/components/sections/FormCustomerDetails.vue.js +1 -1
  114. package/dist/prometheus-framework/src/modules/orders/components/sections/FormDelivery.vue.cjs +1 -1
  115. package/dist/prometheus-framework/src/modules/orders/components/sections/FormDelivery.vue.js +1 -1
  116. package/dist/prometheus-framework/src/modules/organizations/components/blocks/DepartmentMemberModify.vue.cjs +1 -1
  117. package/dist/prometheus-framework/src/modules/organizations/components/blocks/DepartmentMemberModify.vue.js +1 -1
  118. package/dist/prometheus-framework/src/modules/organizations/components/elements/ButtonToggleMembership.vue.cjs +1 -1
  119. package/dist/prometheus-framework/src/modules/organizations/components/elements/ButtonToggleMembership.vue.js +1 -1
  120. package/dist/prometheus-framework/src/modules/organizations/components/pages/DepartmentEdit.vue.cjs +1 -1
  121. package/dist/prometheus-framework/src/modules/organizations/components/pages/DepartmentEdit.vue.js +3 -3
  122. package/dist/prometheus-framework/src/modules/organizations/components/pages/Members.vue.cjs +1 -1
  123. package/dist/prometheus-framework/src/modules/organizations/components/pages/Members.vue.js +2 -2
  124. package/dist/prometheus-framework/src/modules/organizations/components/pages/Organization.vue.cjs +1 -1
  125. package/dist/prometheus-framework/src/modules/organizations/components/pages/Organization.vue.js +1 -1
  126. package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationEdit.vue.cjs +1 -1
  127. package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationEdit.vue.js +3 -3
  128. package/dist/prometheus-framework/src/modules/organizations/components/sections/Documents.vue.cjs +1 -1
  129. package/dist/prometheus-framework/src/modules/organizations/components/sections/Documents.vue.js +6 -5
  130. package/dist/prometheus-framework/src/modules/organizations/components/sections/MembersAdd.vue.cjs +1 -1
  131. package/dist/prometheus-framework/src/modules/organizations/components/sections/MembersAdd.vue.js +2 -2
  132. package/dist/prometheus-framework/src/modules/organizations/components/sections/Organizations.vue.cjs +1 -1
  133. package/dist/prometheus-framework/src/modules/organizations/components/sections/Organizations.vue.js +6 -5
  134. package/dist/prometheus-framework/src/modules/products/components/blocks/CardPosition.vue.cjs +1 -1
  135. package/dist/prometheus-framework/src/modules/products/components/blocks/CardPosition.vue.js +1 -1
  136. package/dist/prometheus-framework/src/modules/products/components/blocks/ImagesThumbnails.vue.cjs +1 -1
  137. package/dist/prometheus-framework/src/modules/products/components/blocks/ImagesThumbnails.vue.js +1 -1
  138. package/dist/prometheus-framework/src/modules/products/components/blocks/LeftoverPositions.vue.cjs +1 -1
  139. package/dist/prometheus-framework/src/modules/products/components/blocks/LeftoverPositions.vue.js +1 -1
  140. package/dist/prometheus-framework/src/modules/products/components/blocks/ListPositions.vue.cjs +1 -1
  141. package/dist/prometheus-framework/src/modules/products/components/blocks/ListPositions.vue.js +1 -1
  142. package/dist/prometheus-framework/src/modules/products/components/pages/Categories.vue.cjs +1 -1
  143. package/dist/prometheus-framework/src/modules/products/components/pages/Categories.vue.js +1 -1
  144. package/dist/prometheus-framework/src/modules/products/components/pages/CategoryEdit.vue.cjs +1 -1
  145. package/dist/prometheus-framework/src/modules/products/components/pages/CategoryEdit.vue.js +2 -2
  146. package/dist/prometheus-framework/src/modules/products/components/pages/EditLeftover.vue.cjs +1 -1
  147. package/dist/prometheus-framework/src/modules/products/components/pages/EditLeftover.vue.js +2 -2
  148. package/dist/prometheus-framework/src/modules/products/components/pages/Product.vue.cjs +1 -1
  149. package/dist/prometheus-framework/src/modules/products/components/pages/Product.vue.js +20 -25
  150. package/dist/prometheus-framework/src/modules/products/components/pages/ProductEdit.vue.cjs +1 -1
  151. package/dist/prometheus-framework/src/modules/products/components/pages/ProductEdit.vue.js +3 -3
  152. package/dist/prometheus-framework/src/modules/products/components/sections/EditModifications.vue.cjs +1 -1
  153. package/dist/prometheus-framework/src/modules/products/components/sections/EditModifications.vue.js +1 -1
  154. package/dist/prometheus-framework/src/modules/products/components/sections/EditProductInfo.vue.cjs +1 -1
  155. package/dist/prometheus-framework/src/modules/products/components/sections/EditProductInfo.vue.js +8 -7
  156. package/dist/prometheus-framework/src/modules/products/components/sections/SectionProduct.vue.cjs +1 -1
  157. package/dist/prometheus-framework/src/modules/products/components/sections/SectionProduct.vue.js +1 -1
  158. package/dist/prometheus-framework/src/modules/reports/components/sections/FormReport.vue.cjs +1 -1
  159. package/dist/prometheus-framework/src/modules/reports/components/sections/FormReport.vue.js +2 -2
  160. package/dist/prometheus-framework/src/modules/users/components/pages/Profile.vue.cjs +1 -1
  161. package/dist/prometheus-framework/src/modules/users/components/pages/Profile.vue.js +6 -5
  162. package/dist/prometheus-framework/src/modules/users/components/pages/ProfileEdit.vue.cjs +1 -1
  163. package/dist/prometheus-framework/src/modules/users/components/pages/ProfileEdit.vue.js +2 -2
  164. package/dist/prometheus-framework/src/modules/wallet/views/components/pages/Wallet.vue.cjs +1 -1
  165. package/dist/prometheus-framework/src/modules/wallet/views/components/pages/Wallet.vue.js +5 -4
  166. package/dist/prometheus-framework.cjs.js +1 -1
  167. package/dist/prometheus-framework.es.js +1 -1
  168. package/dist/style.css +1 -1
  169. package/dist/web-Bk_OtXgv.js +1 -0
  170. package/dist/web-CXzcKdk4.mjs +54 -0
  171. package/dist/web-D9Cfcy5k.js +1 -0
  172. package/dist/web-VFuzUsNl.mjs +54 -0
  173. package/package.json +1 -1
  174. package/src/components/Button/Button.vue +5 -8
  175. package/src/components/FieldPhone/FieldPhone.vue +4 -0
  176. package/src/modules/auth/components/pages/ResetPassword.vue +1 -1
  177. package/src/modules/auth/components/pages/SignIn.vue +3 -3
  178. package/src/modules/auth/components/pages/SignUp.vue +1 -1
  179. package/src/modules/auth/controllers/auth.controller.js +1 -0
  180. package/src/modules/auth/store/auth.js +3 -5
  181. package/src/modules/auth/store/twofa.js +1 -1
  182. package/src/modules/middlewares/client/inputs.validation.js +0 -13
@@ -1,105 +1,105 @@
1
- import { Web3ConfigEvent as T } from "../../../web3-core/lib/esm/web3_config.js";
1
+ import { Web3ConfigEvent as W } from "../../../web3-core/lib/esm/web3_config.js";
2
2
  import "../../../web3-core/lib/esm/web3_request_manager.js";
3
3
  import "../../../web3-core/lib/esm/web3_subscription_manager.js";
4
4
  import "../../../web3-core/lib/esm/web3_subscriptions.js";
5
- import { Web3Context as C } from "../../../web3-core/lib/esm/web3_context.js";
5
+ import { Web3Context as P } from "../../../web3-core/lib/esm/web3_context.js";
6
6
  import "../../../web3-core/lib/esm/web3_batch_request.js";
7
- import { DEFAULT_RETURN_FORMAT as v } from "../../../web3-types/lib/esm/data_format_types.js";
8
- import { BlockTags as q } from "../../../web3-types/lib/esm/eth_types.js";
7
+ import { DEFAULT_RETURN_FORMAT as g } from "../../../web3-types/lib/esm/data_format_types.js";
8
+ import { BlockTags as Q } from "../../../web3-types/lib/esm/eth_types.js";
9
9
  import "../../../web3-types/lib/esm/web3_base_provider.js";
10
- import { ContractTransactionDataAndInputError as z, Web3ContractError as y, ContractExecutionError as P } from "../../../web3-errors/lib/esm/errors/contract_errors.js";
11
- import { SubscriptionError as F } from "../../../web3-errors/lib/esm/errors/provider_errors.js";
10
+ import { ContractTransactionDataAndInputError as X, Web3ContractError as I, ContractExecutionError as D } from "../../../web3-errors/lib/esm/errors/contract_errors.js";
11
+ import { SubscriptionError as N } from "../../../web3-errors/lib/esm/errors/provider_errors.js";
12
12
  import "../../../web3-errors/lib/esm/errors/rpc_errors.js";
13
13
  import "../../../web3-eth-iban/lib/esm/iban.js";
14
- import { Web3ValidatorError as Q } from "../../../web3-validator/lib/esm/errors.js";
14
+ import { Web3ValidatorError as Y } from "../../../web3-validator/lib/esm/errors.js";
15
15
  import "../../../web3-validator/lib/esm/formats.js";
16
- import { transformJsonDataToAbiFormat as X } from "../../../web3-validator/lib/esm/utils.js";
17
- import { validator as L } from "../../../web3-validator/lib/esm/default_validator.js";
18
- import { isNullish as A } from "../../../web3-validator/lib/esm/validation/object.js";
16
+ import { transformJsonDataToAbiFormat as Z } from "../../../web3-validator/lib/esm/utils.js";
17
+ import { validator as x } from "../../../web3-validator/lib/esm/default_validator.js";
18
+ import { isNullish as j } from "../../../web3-validator/lib/esm/validation/object.js";
19
19
  import "../../../web3-core/lib/esm/web3_promi_event.js";
20
20
  import "../../../setimmediate/setImmediate.js";
21
21
  import "../../../web3-eth/lib/esm/web3_eth.js";
22
- import { decodeEventABI as Y } from "../../../web3-eth/lib/esm/utils/decoding.js";
22
+ import { decodeEventABI as R } from "../../../web3-eth/lib/esm/utils/decoding.js";
23
23
  import "../../../web3-eth/lib/esm/schemas.js";
24
- import { ALL_EVENTS as x, ALL_EVENTS_ABI as B } from "../../../web3-eth/lib/esm/constants.js";
25
- import { getLogs as Z, call as R, createAccessList as O, sendTransaction as W, estimateGas as tt } from "../../../web3-eth/lib/esm/rpc_method_wrappers.js";
24
+ import { ALL_EVENTS as B, ALL_EVENTS_ABI as L } from "../../../web3-eth/lib/esm/constants.js";
25
+ import { getLogs as O, call as tt, createAccessList as it, sendTransaction as G, estimateGas as et } from "../../../web3-eth/lib/esm/rpc_method_wrappers.js";
26
26
  import "../../../web3-eth/lib/esm/utils/prepare_transaction_for_signing.js";
27
- import { NewHeadsSubscription as N } from "../../../web3-eth/lib/esm/web3_subscriptions.js";
27
+ import { NewHeadsSubscription as $ } from "../../../web3-eth/lib/esm/web3_subscriptions.js";
28
28
  import "../../../web3-eth/lib/esm/utils/transaction_builder.js";
29
- import { isAbiErrorFragment as it, isAbiFunctionFragment as nt, jsonInterfaceMethodToString as G, isAbiEventFragment as et } from "../../../web3-eth-abi/lib/esm/utils.js";
30
- import { encodeEventSignature as ot } from "../../../web3-eth-abi/lib/esm/api/events_api.js";
31
- import { encodeFunctionSignature as st } from "../../../web3-eth-abi/lib/esm/api/functions_api.js";
29
+ import { jsonInterfaceMethodToString as E, isAbiErrorFragment as nt, isAbiFunctionFragment as ot, isAbiEventFragment as st } from "../../../web3-eth-abi/lib/esm/utils.js";
30
+ import { encodeEventSignature as rt } from "../../../web3-eth-abi/lib/esm/api/events_api.js";
31
+ import { encodeFunctionSignature as V } from "../../../web3-eth-abi/lib/esm/api/functions_api.js";
32
32
  import "../../../web3-eth-abi/lib/esm/coders/base/number.js";
33
- import { decodeContractErrorData as D } from "../../../web3-eth-abi/lib/esm/decode_contract_error_data.js";
34
- import { encodeMethodABI as V, encodeEventABI as U, decodeMethodReturn as rt } from "./encoding.js";
35
- import { LogsSubscription as $ } from "./log_subscription.js";
36
- import { isWeb3ContractContext as k, getEthTxCallParams as at, getCreateAccessListParams as ct, getSendTxParams as H, getEstimateGasParams as dt } from "./utils.js";
37
- import { format as w, isDataFormat as _ } from "../../../web3-utils/lib/esm/formatter.js";
38
- import { isContractInitOptions as J } from "../../../web3-utils/lib/esm/validation.js";
39
- import { keccak256Wrapper as lt } from "../../../web3-utils/lib/esm/hash.js";
40
- import { toChecksumAddress as ht } from "../../../web3-utils/lib/esm/converters.js";
41
- var b = function(K, t, e, o) {
42
- function c(s) {
43
- return s instanceof e ? s : new e(function(n) {
44
- n(s);
33
+ import { decodeContractErrorData as T } from "../../../web3-eth-abi/lib/esm/decode_contract_error_data.js";
34
+ import { encodeMethodABI as U, decodeMethodParams as F, encodeEventABI as H, decodeMethodReturn as at } from "./encoding.js";
35
+ import { LogsSubscription as q } from "./log_subscription.js";
36
+ import { isWeb3ContractContext as J, getEthTxCallParams as ct, getCreateAccessListParams as dt, getSendTxParams as k, getEstimateGasParams as lt } from "./utils.js";
37
+ import { format as M, isDataFormat as A } from "../../../web3-utils/lib/esm/formatter.js";
38
+ import { isContractInitOptions as K } from "../../../web3-utils/lib/esm/validation.js";
39
+ import { keccak256Wrapper as ht } from "../../../web3-utils/lib/esm/hash.js";
40
+ import { toChecksumAddress as ut } from "../../../web3-utils/lib/esm/converters.js";
41
+ var _ = function(z, t, n, s) {
42
+ function r(e) {
43
+ return e instanceof n ? e : new n(function(o) {
44
+ o(e);
45
45
  });
46
46
  }
47
- return new (e || (e = Promise))(function(s, n) {
48
- function r(d) {
47
+ return new (n || (n = Promise))(function(e, o) {
48
+ function d(c) {
49
49
  try {
50
- i(o.next(d));
51
- } catch (u) {
52
- n(u);
50
+ i(s.next(c));
51
+ } catch (l) {
52
+ o(l);
53
53
  }
54
54
  }
55
- function a(d) {
55
+ function a(c) {
56
56
  try {
57
- i(o.throw(d));
58
- } catch (u) {
59
- n(u);
57
+ i(s.throw(c));
58
+ } catch (l) {
59
+ o(l);
60
60
  }
61
61
  }
62
- function i(d) {
63
- d.done ? s(d.value) : c(d.value).then(r, a);
62
+ function i(c) {
63
+ c.done ? e(c.value) : r(c.value).then(d, a);
64
64
  }
65
- i((o = o.apply(K, t || [])).next());
65
+ i((s = s.apply(z, t || [])).next());
66
66
  });
67
67
  };
68
- const ut = {
69
- logs: $,
70
- newHeads: N,
71
- newBlockHeaders: N
68
+ const ft = {
69
+ logs: q,
70
+ newHeads: $,
71
+ newBlockHeaders: $
72
72
  };
73
- class S extends C {
74
- constructor(t, e, o, c, s) {
75
- var n, r, a;
76
- const i = J(e) ? e : J(o) ? o : void 0;
77
- let d;
78
- k(e) ? d = e : k(o) ? d = o : d = c;
79
- let u;
80
- if (typeof e == "object" && "provider" in e ? u = e.provider : typeof o == "object" && "provider" in o ? u = o.provider : typeof c == "object" && "provider" in c ? u = c.provider : u = S.givenProvider, super(Object.assign(Object.assign({}, d), { provider: u, registeredSubscriptions: ut })), this.syncWithContext = !1, this._functions = {}, d != null && d.wallet && (this._wallet = d.wallet), d != null && d.accountProvider && (this._accountProvider = d.accountProvider), !A(i) && !A(i.data) && !A(i.input) && this.config.contractDataInputFill !== "both")
81
- throw new z({
73
+ class S extends P {
74
+ constructor(t, n, s, r, e) {
75
+ var o, d, a;
76
+ const i = K(n) ? n : K(s) ? s : void 0;
77
+ let c;
78
+ J(n) ? c = n : J(s) ? c = s : c = r;
79
+ let l;
80
+ if (typeof n == "object" && "provider" in n ? l = n.provider : typeof s == "object" && "provider" in s ? l = s.provider : typeof r == "object" && "provider" in r ? l = r.provider : l = S.givenProvider, super(Object.assign(Object.assign({}, c), { provider: l, registeredSubscriptions: ft })), this.syncWithContext = !1, this._functions = {}, c != null && c.wallet && (this._wallet = c.wallet), c != null && c.accountProvider && (this._accountProvider = c.accountProvider), !j(i) && !j(i.data) && !j(i.input) && this.config.contractDataInputFill !== "both")
81
+ throw new X({
82
82
  data: i.data,
83
83
  input: i.input
84
84
  });
85
85
  this._overloadedMethodAbis = /* @__PURE__ */ new Map();
86
- const l = _(c) ? c : _(o) ? o : s ?? v, h = typeof e == "string" ? e : void 0;
87
- this.config.contractDataInputFill = (n = i == null ? void 0 : i.dataInputFill) !== null && n !== void 0 ? n : this.config.contractDataInputFill, this._parseAndSetJsonInterface(t, l), A(h) || this._parseAndSetAddress(h, l), this.options = {
88
- address: h,
86
+ const h = A(r) ? r : A(s) ? s : e ?? g, v = typeof n == "string" ? n : void 0;
87
+ this.config.contractDataInputFill = (o = i == null ? void 0 : i.dataInputFill) !== null && o !== void 0 ? o : this.config.contractDataInputFill, this._parseAndSetJsonInterface(t, h), j(v) || this._parseAndSetAddress(v, h), this.options = {
88
+ address: v,
89
89
  jsonInterface: this._jsonInterface,
90
- gas: (r = i == null ? void 0 : i.gas) !== null && r !== void 0 ? r : i == null ? void 0 : i.gasLimit,
90
+ gas: (d = i == null ? void 0 : i.gas) !== null && d !== void 0 ? d : i == null ? void 0 : i.gasLimit,
91
91
  gasPrice: i == null ? void 0 : i.gasPrice,
92
92
  from: i == null ? void 0 : i.from,
93
93
  input: i == null ? void 0 : i.input,
94
94
  data: i == null ? void 0 : i.data
95
- }, this.syncWithContext = (a = i == null ? void 0 : i.syncWithContext) !== null && a !== void 0 ? a : !1, d instanceof C && this.subscribeToContextEvents(d), Object.defineProperty(this.options, "address", {
96
- set: (f) => this._parseAndSetAddress(f, l),
95
+ }, this.syncWithContext = (a = i == null ? void 0 : i.syncWithContext) !== null && a !== void 0 ? a : !1, c instanceof P && this.subscribeToContextEvents(c), Object.defineProperty(this.options, "address", {
96
+ set: (m) => this._parseAndSetAddress(m, h),
97
97
  get: () => this._address
98
98
  }), Object.defineProperty(this.options, "jsonInterface", {
99
- set: (f) => this._parseAndSetJsonInterface(f, l),
99
+ set: (m) => this._parseAndSetJsonInterface(m, h),
100
100
  get: () => this._jsonInterface
101
- }), d instanceof C && d.on(T.CONFIG_CHANGE, (f) => {
102
- this.setConfig({ [f.name]: f.newValue });
101
+ }), c instanceof P && c.on(W.CONFIG_CHANGE, (m) => {
102
+ this.setConfig({ [m.name]: m.newValue });
103
103
  });
104
104
  }
105
105
  /**
@@ -247,6 +247,22 @@ class S extends C {
247
247
  * > '0x12345...0000012345678765432'
248
248
  *
249
249
  *
250
+ * // decoding
251
+ * myContract.deploy({
252
+ * input: '0x12345...',
253
+ * // arguments: [123, 'My Greeting'] if you just need to decode the data, you can skip the arguments
254
+ * })
255
+ * .decodeData('0x12345...0000012345678765432');
256
+ * > {
257
+ * __method__: 'constructor',
258
+ * __length__: 2,
259
+ * '0': '123',
260
+ * _id: '123',
261
+ * '1': 'My Greeting',
262
+ * _greeting: 'My Greeting',
263
+ * }
264
+ *
265
+ *
250
266
  * // Gas estimation
251
267
  * myContract.deploy({
252
268
  * input: '0x12345...',
@@ -260,250 +276,259 @@ class S extends C {
260
276
  * @returns - The transaction object
261
277
  */
262
278
  deploy(t) {
263
- var e, o, c;
264
- let s = this._jsonInterface.find((u) => u.type === "constructor");
265
- s || (s = {
279
+ var n, s, r;
280
+ let e = this._jsonInterface.find((l) => l.type === "constructor");
281
+ e || (e = {
266
282
  type: "constructor",
267
283
  stateMutability: ""
268
284
  });
269
- const n = w({ format: "bytes" }, (e = t == null ? void 0 : t.input) !== null && e !== void 0 ? e : this.options.input, v), r = w({ format: "bytes" }, (o = t == null ? void 0 : t.data) !== null && o !== void 0 ? o : this.options.data, v);
270
- if ((!n || n.trim() === "0x") && (!r || r.trim() === "0x"))
271
- throw new y("contract creation without any data provided.");
272
- const a = (c = t == null ? void 0 : t.arguments) !== null && c !== void 0 ? c : [], i = Object.assign(Object.assign({}, this.options), { input: n, data: r }), d = n ?? r;
285
+ const o = M({ format: "bytes" }, (n = t == null ? void 0 : t.input) !== null && n !== void 0 ? n : this.options.input, g), d = M({ format: "bytes" }, (s = t == null ? void 0 : t.data) !== null && s !== void 0 ? s : this.options.data, g);
286
+ if ((!o || o.trim() === "0x") && (!d || d.trim() === "0x"))
287
+ throw new I("contract creation without any data provided.");
288
+ const a = (r = t == null ? void 0 : t.arguments) !== null && r !== void 0 ? r : [], i = Object.assign(Object.assign({}, this.options), { input: o, data: d }), c = o ?? d;
273
289
  return {
274
290
  arguments: a,
275
- send: (u) => {
276
- const l = Object.assign({}, u);
277
- return this._contractMethodDeploySend(s, a, l, i);
291
+ send: (l) => {
292
+ const h = Object.assign({}, l);
293
+ return this._contractMethodDeploySend(e, a, h, i);
278
294
  },
279
- estimateGas: (u, l = v) => b(this, void 0, void 0, function* () {
280
- const h = Object.assign({}, u);
295
+ estimateGas: (l, h = g) => _(this, void 0, void 0, function* () {
296
+ const v = Object.assign({}, l);
281
297
  return this._contractMethodEstimateGas({
282
- abi: s,
298
+ abi: e,
283
299
  params: a,
284
- returnFormat: l,
285
- options: h,
300
+ returnFormat: h,
301
+ options: v,
286
302
  contractOptions: i
287
303
  });
288
304
  }),
289
- encodeABI: () => V(s, a, w({ format: "bytes" }, d, v))
305
+ encodeABI: () => U(e, a, M({ format: "bytes" }, c, g)),
306
+ decodeData: (l) => Object.assign(Object.assign({}, F(e, l.replace(c, ""), !1)), { __method__: e.type })
290
307
  };
291
308
  }
292
- getPastEvents(t, e, o) {
293
- var c;
294
- return b(this, void 0, void 0, function* () {
295
- const s = typeof t == "string" ? t : x, n = (
309
+ getPastEvents(t, n, s) {
310
+ var r;
311
+ return _(this, void 0, void 0, function* () {
312
+ const e = typeof t == "string" ? t : B, o = (
296
313
  // eslint-disable-next-line no-nested-ternary
297
- typeof t != "string" && !_(t) ? t : _(e) ? {} : e
298
- ), r = _(t) ? t : _(e) ? e : o ?? v, a = s === "allEvents" || s === x ? B : this._jsonInterface.find((m) => "name" in m && m.name === s);
314
+ typeof t != "string" && !A(t) ? t : A(n) ? {} : n
315
+ ), d = A(t) ? t : A(n) ? n : s ?? g, a = e === "allEvents" || e === B ? L : this._jsonInterface.find((p) => "name" in p && p.name === e);
299
316
  if (!a)
300
- throw new y(`Event ${s} not found.`);
301
- const { fromBlock: i, toBlock: d, topics: u, address: l } = U(this.options, a, n ?? {}), h = yield Z(this, { fromBlock: i, toBlock: d, topics: u, address: l }, r), f = h ? h.map((m) => typeof m == "string" ? m : Y(a, m, this._jsonInterface, r)) : [], p = (c = n == null ? void 0 : n.filter) !== null && c !== void 0 ? c : {}, I = Object.keys(p);
302
- return I.length > 0 ? f.filter((m) => typeof m == "string" ? !0 : I.every((g) => {
303
- var M;
304
- if (Array.isArray(p[g]))
305
- return p[g].some((E) => String(m.returnValues[g]).toUpperCase() === String(E).toUpperCase());
306
- const j = (M = a.inputs) === null || M === void 0 ? void 0 : M.filter((E) => E.name === g)[0];
307
- return j != null && j.indexed && j.type === "string" && lt(p[g]) === String(m.returnValues[g]) ? !0 : String(m.returnValues[g]).toUpperCase() === String(p[g]).toUpperCase();
308
- })) : f;
317
+ throw new I(`Event ${e} not found.`);
318
+ const { fromBlock: i, toBlock: c, topics: l, address: h } = H(this.options, a, o ?? {}), v = yield O(this, { fromBlock: i, toBlock: c, topics: l, address: h }, d), m = v ? v.map((p) => typeof p == "string" ? p : R(a, p, this._jsonInterface, d)) : [], u = (r = o == null ? void 0 : o.filter) !== null && r !== void 0 ? r : {}, f = Object.keys(u);
319
+ return f.length > 0 ? m.filter((p) => typeof p == "string" ? !0 : f.every((b) => {
320
+ var C;
321
+ if (Array.isArray(u[b]))
322
+ return u[b].some((y) => String(p.returnValues[b]).toUpperCase() === String(y).toUpperCase());
323
+ const w = (C = a.inputs) === null || C === void 0 ? void 0 : C.filter((y) => y.name === b)[0];
324
+ return w != null && w.indexed && w.type === "string" && ht(u[b]) === String(p.returnValues[b]) ? !0 : String(p.returnValues[b]).toUpperCase() === String(u[b]).toUpperCase();
325
+ })) : m;
309
326
  });
310
327
  }
311
- _parseAndSetAddress(t, e = v) {
312
- this._address = t && ht(w({ format: "address" }, t, e));
328
+ _parseAndSetAddress(t, n = g) {
329
+ this._address = t && ut(M({ format: "address" }, t, n));
313
330
  }
314
- _parseAndSetJsonInterface(t, e = v) {
315
- var o, c, s, n, r;
331
+ decodeMethodData(t) {
332
+ const n = t.slice(0, 10), r = this._jsonInterface.filter((e) => e.type !== "error").find((e) => n === V(E(e)));
333
+ if (!r)
334
+ throw new I(`The ABI for the provided method signature ${n} was not found.`);
335
+ return Object.assign(Object.assign({}, F(r, t)), { __method__: E(r) });
336
+ }
337
+ _parseAndSetJsonInterface(t, n = g) {
338
+ var s, r, e, o, d;
316
339
  this._functions = {}, this._methods = {}, this._events = {};
317
340
  let a = [];
318
- const i = t.filter((u) => u.type !== "error"), d = t.filter((u) => it(u));
319
- for (const u of i) {
320
- const l = Object.assign(Object.assign({}, u), { signature: "" });
321
- if (nt(l)) {
322
- const h = G(l), f = st(h);
323
- l.signature = f, l.constant = (c = (o = l.stateMutability === "view") !== null && o !== void 0 ? o : l.stateMutability === "pure") !== null && c !== void 0 ? c : l.constant, l.payable = (s = l.stateMutability === "payable") !== null && s !== void 0 ? s : l.payable, this._overloadedMethodAbis.set(l.name, [
324
- ...(n = this._overloadedMethodAbis.get(l.name)) !== null && n !== void 0 ? n : [],
325
- l
341
+ const i = t.filter((l) => l.type !== "error"), c = t.filter((l) => nt(l));
342
+ for (const l of i) {
343
+ const h = Object.assign(Object.assign({}, l), { signature: "" });
344
+ if (ot(h)) {
345
+ const v = E(h), m = V(v);
346
+ h.methodNameWithInputs = v, h.signature = m, h.constant = (r = (s = h.stateMutability === "view") !== null && s !== void 0 ? s : h.stateMutability === "pure") !== null && r !== void 0 ? r : h.constant, h.payable = (e = h.stateMutability === "payable") !== null && e !== void 0 ? e : h.payable, this._overloadedMethodAbis.set(h.name, [
347
+ ...(o = this._overloadedMethodAbis.get(h.name)) !== null && o !== void 0 ? o : [],
348
+ h
326
349
  ]);
327
- const p = (r = this._overloadedMethodAbis.get(l.name)) !== null && r !== void 0 ? r : [], I = this._createContractMethod(p, d);
328
- this._functions[h] = {
329
- signature: f,
330
- method: I
331
- }, this._methods[l.name] = this._functions[h].method, this._methods[h] = this._functions[h].method, this._methods[f] = this._functions[h].method;
332
- } else if (et(l)) {
333
- const h = G(l), f = ot(h), p = this._createContractEvent(l, e);
334
- l.signature = f, (!(h in this._events) || l.name === "bound") && (this._events[h] = p), this._events[l.name] = p, this._events[f] = p;
350
+ const u = (d = this._overloadedMethodAbis.get(h.name)) !== null && d !== void 0 ? d : [], f = this._createContractMethod(u, c), p = this._createContractMethod(u, c, !0);
351
+ this._functions[v] = {
352
+ signature: m,
353
+ method: p
354
+ }, this._methods[h.name] = f, this._methods[v] = p, this._methods[m] = p;
355
+ } else if (st(h)) {
356
+ const v = E(h), m = rt(v), u = this._createContractEvent(h, n);
357
+ h.signature = m, (!(v in this._events) || h.name === "bound") && (this._events[v] = u), this._events[h.name] = u, this._events[m] = u;
335
358
  }
336
- a = [...a, l];
359
+ a = [...a, h];
337
360
  }
338
- this._events.allEvents = this._createContractEvent(B, e), this._jsonInterface = [...a], this._errorsInterface = d;
361
+ this._events.allEvents = this._createContractEvent(L, n), this._jsonInterface = [...a], this._errorsInterface = c;
339
362
  }
340
363
  // eslint-disable-next-line class-methods-use-this
341
- _getAbiParams(t, e) {
342
- var o;
364
+ _getAbiParams(t, n) {
365
+ var s;
343
366
  try {
344
- return X((o = t.inputs) !== null && o !== void 0 ? o : [], e);
345
- } catch (c) {
346
- throw new y(`Invalid parameters for method ${t.name}: ${c.message}`);
367
+ return Z((s = t.inputs) !== null && s !== void 0 ? s : [], n);
368
+ } catch (r) {
369
+ throw new I(`Invalid parameters for method ${t.name}: ${r.message}`);
347
370
  }
348
371
  }
349
- _createContractMethod(t, e) {
350
- const o = t[t.length - 1];
351
- return (...c) => {
352
- var s, n;
353
- let r;
354
- const a = (s = this._overloadedMethodAbis.get(o.name)) !== null && s !== void 0 ? s : [];
355
- let i = a[0];
356
- const d = e, u = a.filter((h) => {
372
+ _createContractMethod(t, n, s = !1) {
373
+ const r = t[t.length - 1];
374
+ return (...e) => {
375
+ var o, d, a;
376
+ let i;
377
+ const c = (d = s ? (o = this._overloadedMethodAbis.get(r.name)) === null || o === void 0 ? void 0 : o.filter((u) => u.signature === r.signature) : this._overloadedMethodAbis.get(r.name)) !== null && d !== void 0 ? d : [];
378
+ let l = c[0];
379
+ const h = n, v = c.filter((u) => {
357
380
  var f;
358
- return ((f = h.inputs) !== null && f !== void 0 ? f : []).length === c.length;
381
+ return ((f = u.inputs) !== null && f !== void 0 ? f : []).length === e.length;
359
382
  });
360
- if (a.length === 1 || u.length === 0)
361
- r = this._getAbiParams(i, c), L.validate((n = o.inputs) !== null && n !== void 0 ? n : [], r);
383
+ if (c.length === 1 || v.length === 0)
384
+ i = this._getAbiParams(l, e), x.validate((a = r.inputs) !== null && a !== void 0 ? a : [], i);
362
385
  else {
363
- const h = [];
364
- for (const f of u)
386
+ const u = [], f = [];
387
+ for (const p of v)
365
388
  try {
366
- r = this._getAbiParams(f, c), L.validate(f.inputs, r), i = f;
367
- break;
368
- } catch (p) {
369
- h.push(p);
389
+ i = this._getAbiParams(p, e), x.validate(p.inputs, i), f.push(p);
390
+ } catch (b) {
391
+ u.push(b);
370
392
  }
371
- if (h.length === u.length)
372
- throw new Q(h);
393
+ if (f.length === 1 ? [l] = f : f.length > 1 && ([l] = f, console.warn(`Multiple methods found that is compatible with the given inputs.
394
+ Found ${f.length} compatible methods: ${JSON.stringify(f.map((p) => `${p.methodNameWithInputs} (signature: ${p.signature})`))}
395
+ The first one will be used: ${l.methodNameWithInputs}`)), u.length === v.length)
396
+ throw new Y(u);
373
397
  }
374
- const l = {
375
- arguments: r,
376
- call: (h, f) => b(this, void 0, void 0, function* () {
377
- return this._contractMethodCall(i, r, d, h, f);
398
+ const m = {
399
+ arguments: i,
400
+ call: (u, f) => _(this, void 0, void 0, function* () {
401
+ return this._contractMethodCall(l, i, h, u, f);
378
402
  }),
379
- send: (h) => this._contractMethodSend(i, r, d, h),
380
- estimateGas: (h, f = v) => b(this, void 0, void 0, function* () {
403
+ send: (u) => this._contractMethodSend(l, i, h, u),
404
+ estimateGas: (u, f = g) => _(this, void 0, void 0, function* () {
381
405
  return this._contractMethodEstimateGas({
382
- abi: i,
383
- params: r,
406
+ abi: l,
407
+ params: i,
384
408
  returnFormat: f,
385
- options: h
409
+ options: u
386
410
  });
387
411
  }),
388
- encodeABI: () => V(i, r),
389
- createAccessList: (h, f) => b(this, void 0, void 0, function* () {
390
- return this._contractMethodCreateAccessList(i, r, d, h, f);
412
+ encodeABI: () => U(l, i),
413
+ decodeData: (u) => F(l, u),
414
+ createAccessList: (u, f) => _(this, void 0, void 0, function* () {
415
+ return this._contractMethodCreateAccessList(l, i, h, u, f);
391
416
  })
392
417
  };
393
- return i.stateMutability === "payable", l;
418
+ return l.stateMutability === "payable", m;
394
419
  };
395
420
  }
396
- _contractMethodCall(t, e, o, c, s) {
397
- var n;
398
- return b(this, void 0, void 0, function* () {
399
- const r = at({
421
+ _contractMethodCall(t, n, s, r, e) {
422
+ var o;
423
+ return _(this, void 0, void 0, function* () {
424
+ const d = ct({
400
425
  abi: t,
401
- params: e,
402
- options: Object.assign(Object.assign({}, c), { dataInputFill: this.config.contractDataInputFill }),
403
- contractOptions: Object.assign(Object.assign({}, this.options), { from: (n = this.options.from) !== null && n !== void 0 ? n : this.config.defaultAccount })
426
+ params: n,
427
+ options: Object.assign(Object.assign({}, r), { dataInputFill: this.config.contractDataInputFill }),
428
+ contractOptions: Object.assign(Object.assign({}, this.options), { from: (o = this.options.from) !== null && o !== void 0 ? o : this.config.defaultAccount })
404
429
  });
405
430
  try {
406
- const a = yield R(this, r, s, v);
407
- return rt(t, a);
431
+ const a = yield tt(this, d, e, g);
432
+ return at(t, a);
408
433
  } catch (a) {
409
- throw a instanceof P && D(o, a.cause), a;
434
+ throw a instanceof D && T(s, a.cause), a;
410
435
  }
411
436
  });
412
437
  }
413
- _contractMethodCreateAccessList(t, e, o, c, s) {
414
- var n;
415
- return b(this, void 0, void 0, function* () {
416
- const r = ct({
438
+ _contractMethodCreateAccessList(t, n, s, r, e) {
439
+ var o;
440
+ return _(this, void 0, void 0, function* () {
441
+ const d = dt({
417
442
  abi: t,
418
- params: e,
419
- options: Object.assign(Object.assign({}, c), { dataInputFill: this.config.contractDataInputFill }),
420
- contractOptions: Object.assign(Object.assign({}, this.options), { from: (n = this.options.from) !== null && n !== void 0 ? n : this.config.defaultAccount })
443
+ params: n,
444
+ options: Object.assign(Object.assign({}, r), { dataInputFill: this.config.contractDataInputFill }),
445
+ contractOptions: Object.assign(Object.assign({}, this.options), { from: (o = this.options.from) !== null && o !== void 0 ? o : this.config.defaultAccount })
421
446
  });
422
447
  try {
423
- return O(this, r, s, v);
448
+ return it(this, d, e, g);
424
449
  } catch (a) {
425
- throw a instanceof P && D(o, a.cause), a;
450
+ throw a instanceof D && T(s, a.cause), a;
426
451
  }
427
452
  });
428
453
  }
429
- _contractMethodSend(t, e, o, c, s) {
430
- var n, r;
431
- let a = s ?? this.options;
432
- a = Object.assign(Object.assign({}, a), { input: void 0, from: (r = (n = a.from) !== null && n !== void 0 ? n : this.defaultAccount) !== null && r !== void 0 ? r : void 0 });
433
- const i = H({
454
+ _contractMethodSend(t, n, s, r, e) {
455
+ var o, d;
456
+ let a = e ?? this.options;
457
+ a = Object.assign(Object.assign({}, a), { input: void 0, from: (d = (o = a.from) !== null && o !== void 0 ? o : this.defaultAccount) !== null && d !== void 0 ? d : void 0 });
458
+ const i = k({
434
459
  abi: t,
435
- params: e,
436
- options: Object.assign(Object.assign({}, c), { dataInputFill: this.config.contractDataInputFill }),
460
+ params: n,
461
+ options: Object.assign(Object.assign({}, r), { dataInputFill: this.config.contractDataInputFill }),
437
462
  contractOptions: a
438
- }), d = W(this, i, v, {
463
+ }), c = G(this, i, g, {
439
464
  // TODO Should make this configurable by the user
440
465
  checkRevertBeforeSending: !1,
441
466
  contractAbi: this._jsonInterface
442
467
  });
443
- return d.on("error", (u) => {
444
- u instanceof P && D(o, u.cause);
445
- }), d;
468
+ return c.on("error", (l) => {
469
+ l instanceof D && T(s, l.cause);
470
+ }), c;
446
471
  }
447
- _contractMethodDeploySend(t, e, o, c) {
448
- var s, n;
449
- let r = c ?? this.options;
450
- r = Object.assign(Object.assign({}, r), { from: (n = (s = r.from) !== null && s !== void 0 ? s : this.defaultAccount) !== null && n !== void 0 ? n : void 0 });
451
- const a = H({
472
+ _contractMethodDeploySend(t, n, s, r) {
473
+ var e, o;
474
+ let d = r ?? this.options;
475
+ d = Object.assign(Object.assign({}, d), { from: (o = (e = d.from) !== null && e !== void 0 ? e : this.defaultAccount) !== null && o !== void 0 ? o : void 0 });
476
+ const a = k({
452
477
  abi: t,
453
- params: e,
454
- options: Object.assign(Object.assign({}, o), { dataInputFill: this.config.contractDataInputFill }),
455
- contractOptions: r
478
+ params: n,
479
+ options: Object.assign(Object.assign({}, s), { dataInputFill: this.config.contractDataInputFill }),
480
+ contractOptions: d
456
481
  });
457
- return W(this, a, v, {
482
+ return G(this, a, g, {
458
483
  transactionResolver: (i) => {
459
484
  if (i.status === BigInt(0))
460
- throw new y("code couldn't be stored", i);
461
- const d = this.clone();
462
- return d.options.address = i.contractAddress, d;
485
+ throw new I("code couldn't be stored", i);
486
+ const c = this.clone();
487
+ return c.options.address = i.contractAddress, c;
463
488
  },
464
489
  contractAbi: this._jsonInterface,
465
490
  // TODO Should make this configurable by the user
466
491
  checkRevertBeforeSending: !1
467
492
  });
468
493
  }
469
- _contractMethodEstimateGas({ abi: t, params: e, returnFormat: o, options: c, contractOptions: s }) {
470
- return b(this, void 0, void 0, function* () {
471
- const n = dt({
494
+ _contractMethodEstimateGas({ abi: t, params: n, returnFormat: s, options: r, contractOptions: e }) {
495
+ return _(this, void 0, void 0, function* () {
496
+ const o = lt({
472
497
  abi: t,
473
- params: e,
474
- options: Object.assign(Object.assign({}, c), { dataInputFill: this.config.contractDataInputFill }),
475
- contractOptions: s ?? this.options
498
+ params: n,
499
+ options: Object.assign(Object.assign({}, r), { dataInputFill: this.config.contractDataInputFill }),
500
+ contractOptions: e ?? this.options
476
501
  });
477
- return tt(this, n, q.LATEST, o);
502
+ return et(this, o, Q.LATEST, s);
478
503
  });
479
504
  }
480
505
  // eslint-disable-next-line class-methods-use-this
481
- _createContractEvent(t, e = v) {
482
- return (...o) => {
483
- var c;
484
- const { topics: s, fromBlock: n } = U(this.options, t, o[0]), r = new $({
506
+ _createContractEvent(t, n = g) {
507
+ return (...s) => {
508
+ var r;
509
+ const { topics: e, fromBlock: o } = H(this.options, t, s[0]), d = new q({
485
510
  address: this.options.address,
486
- topics: s,
511
+ topics: e,
487
512
  abi: t,
488
513
  jsonInterface: this._jsonInterface
489
514
  }, {
490
515
  // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
491
516
  subscriptionManager: this.subscriptionManager,
492
- returnFormat: e
517
+ returnFormat: n
493
518
  });
494
- return A(n) || this.getPastEvents(t.name, { fromBlock: n, topics: s }, e).then((a) => {
495
- a && a.forEach((i) => r.emit("data", i));
519
+ return j(o) || this.getPastEvents(t.name, { fromBlock: o, topics: e }, n).then((a) => {
520
+ a && a.forEach((i) => d.emit("data", i));
496
521
  }).catch((a) => {
497
- r.emit("error", new F("Failed to get past events.", a));
498
- }), (c = this.subscriptionManager) === null || c === void 0 || c.addSubscription(r).catch((a) => {
499
- r.emit("error", new F("Failed to subscribe.", a));
500
- }), r;
522
+ d.emit("error", new N("Failed to get past events.", a));
523
+ }), (r = this.subscriptionManager) === null || r === void 0 || r.addSubscription(d).catch((a) => {
524
+ d.emit("error", new N("Failed to subscribe.", a));
525
+ }), d;
501
526
  };
502
527
  }
503
528
  subscribeToContextEvents(t) {
504
- const e = this;
505
- this.context = t, e.syncWithContext && t.on(T.CONFIG_CHANGE, (o) => {
506
- e.setConfig({ [o.name]: o.newValue });
529
+ const n = this;
530
+ this.context = t, n.syncWithContext && t.on(W.CONFIG_CHANGE, (s) => {
531
+ n.setConfig({ [s.name]: s.newValue });
507
532
  });
508
533
  }
509
534
  }