@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.
- package/dist/auth.server.js +1 -0
- package/dist/auth.server.mjs +1 -0
- package/dist/main-BQisDfLk.js +92 -0
- package/dist/main-BV1Yv9Hy.js +92 -0
- package/dist/main-DTlUA63C.mjs +13617 -0
- package/dist/main-DmNP-t33.mjs +13625 -0
- package/dist/main.css +1 -1
- package/dist/node_modules/embla-carousel/esm/embla-carousel.esm.cjs +1 -1
- package/dist/node_modules/embla-carousel/esm/embla-carousel.esm.js +748 -750
- package/dist/node_modules/embla-carousel-autoplay/esm/embla-carousel-autoplay.esm.cjs +1 -1
- package/dist/node_modules/embla-carousel-autoplay/esm/embla-carousel-autoplay.esm.js +40 -39
- package/dist/node_modules/web3/lib/esm/index.cjs +1 -1
- package/dist/node_modules/web3/lib/esm/index.js +42 -41
- package/dist/node_modules/web3/lib/esm/version.cjs +1 -1
- package/dist/node_modules/web3/lib/esm/version.js +1 -1
- package/dist/node_modules/web3-eth/lib/esm/schemas.cjs +1 -1
- package/dist/node_modules/web3-eth/lib/esm/schemas.js +113 -88
- package/dist/node_modules/web3-eth-contract/lib/esm/contract.cjs +3 -1
- package/dist/node_modules/web3-eth-contract/lib/esm/contract.js +242 -217
- package/dist/node_modules/web3-eth-contract/lib/esm/encoding.cjs +1 -1
- package/dist/node_modules/web3-eth-contract/lib/esm/encoding.js +43 -37
- package/dist/node_modules/web3-eth-ens/lib/esm/config.cjs +1 -1
- package/dist/node_modules/web3-eth-ens/lib/esm/config.js +3 -1
- package/dist/node_modules/web3-eth-ens/lib/esm/ens.cjs +1 -1
- package/dist/node_modules/web3-eth-ens/lib/esm/ens.js +34 -13
- package/dist/node_modules/web3-eth-ens/lib/esm/resolver.cjs +1 -1
- package/dist/node_modules/web3-eth-ens/lib/esm/resolver.js +48 -36
- package/dist/node_modules/web3-utils/lib/esm/chunk_response_parser.cjs +1 -1
- package/dist/node_modules/web3-utils/lib/esm/chunk_response_parser.js +2 -2
- package/dist/node_modules/web3-utils/lib/esm/converters.cjs +1 -1
- package/dist/node_modules/web3-utils/lib/esm/converters.js +52 -50
- package/dist/node_modules/web3-utils/lib/esm/uint8array.cjs +1 -1
- package/dist/node_modules/web3-utils/lib/esm/uint8array.js +13 -13
- package/dist/node_modules/web3-validator/lib/esm/utils.cjs +1 -1
- package/dist/node_modules/web3-validator/lib/esm/utils.js +76 -87
- package/dist/node_modules/web3-validator/lib/esm/validator.cjs +1 -1
- package/dist/node_modules/web3-validator/lib/esm/validator.js +49 -47
- package/dist/prometheus-framework/node_modules/@capacitor/core/dist/index.cjs +1 -1
- package/dist/prometheus-framework/node_modules/@capacitor/core/dist/index.js +168 -158
- package/dist/prometheus-framework/src/components/Button/Button.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/Button/Button.vue.js +94 -1
- package/dist/prometheus-framework/src/components/Button/Button.vue2.cjs +1 -1
- package/dist/prometheus-framework/src/components/Button/Button.vue2.js +1 -102
- package/dist/prometheus-framework/src/components/Field/Field.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/Field/Field.vue.js +84 -1
- package/dist/prometheus-framework/src/components/Field/Field.vue2.cjs +1 -1
- package/dist/prometheus-framework/src/components/Field/Field.vue2.js +1 -84
- package/dist/prometheus-framework/src/components/FieldBig/FieldBig.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/FieldBig/FieldBig.vue.js +1 -1
- package/dist/prometheus-framework/src/components/FieldPhone/FieldPhone.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/FieldPhone/FieldPhone.vue.js +17 -16
- package/dist/prometheus-framework/src/components/Popup/Popup.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/Popup/Popup.vue.js +73 -1
- package/dist/prometheus-framework/src/components/Popup/Popup.vue2.cjs +1 -1
- package/dist/prometheus-framework/src/components/Popup/Popup.vue2.js +1 -73
- package/dist/prometheus-framework/src/modules/auth/components/layouts/Auth.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/auth/components/layouts/Auth.vue.js +9 -8
- package/dist/prometheus-framework/src/modules/auth/components/pages/EnterCode.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/auth/components/pages/EnterCode.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/auth/components/pages/EnterPassword.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/auth/components/pages/EnterPassword.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/auth/components/pages/Invite.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/auth/components/pages/Invite.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/auth/components/pages/ResetPassword.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/auth/components/pages/ResetPassword.vue.js +28 -29
- package/dist/prometheus-framework/src/modules/auth/components/pages/SignIn.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/auth/components/pages/SignIn.vue.js +65 -65
- package/dist/prometheus-framework/src/modules/auth/components/pages/SignUp.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/auth/components/pages/SignUp.vue.js +38 -39
- package/dist/prometheus-framework/src/modules/auth/store/auth.cjs +1 -1
- package/dist/prometheus-framework/src/modules/auth/store/auth.js +35 -37
- package/dist/prometheus-framework/src/modules/auth/store/twofa.cjs +1 -1
- package/dist/prometheus-framework/src/modules/auth/store/twofa.js +3 -3
- package/dist/prometheus-framework/src/modules/backoffice/components/pages/Dashboard.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/backoffice/components/pages/Dashboard.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/community/components/pages/Community.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/community/components/pages/Community.vue.js +11 -10
- package/dist/prometheus-framework/src/modules/community/components/pages/CreateBlogPost.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/community/components/pages/CreateBlogPost.vue.js +3 -3
- package/dist/prometheus-framework/src/modules/community/components/sections/HotPosts.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/community/components/sections/HotPosts.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/constructor/components/elements/Embed.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/constructor/components/elements/Embed.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/events/components/elements/ButtonCheck.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/events/components/elements/ButtonCheck.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/events/components/elements/ButtonJoin.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/events/components/elements/ButtonJoin.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/events/components/pages/EditEvent.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/events/components/pages/EditEvent.vue.js +3 -3
- package/dist/prometheus-framework/src/modules/events/components/pages/EditEventTickets.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/events/components/pages/EditEventTickets.vue.js +3 -3
- package/dist/prometheus-framework/src/modules/gallery/components/sections/BackofficeGallery.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/gallery/components/sections/BackofficeGallery.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/gallery/components/sections/GalleryWithCategories.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/gallery/components/sections/GalleryWithCategories.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/globals/components/blocks/BlockSearch.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/globals/components/blocks/BlockSearch.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/globals/components/blocks/CardHeader.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/globals/components/blocks/CardHeader.vue.js +4 -3
- package/dist/prometheus-framework/src/modules/legal/components/pages/Legal.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/legal/components/pages/Legal.vue.js +6 -5
- package/dist/prometheus-framework/src/modules/middlewares/client/inputs.validation.cjs +1 -1
- package/dist/prometheus-framework/src/modules/middlewares/client/inputs.validation.js +10 -13
- package/dist/prometheus-framework/src/modules/mobile/components/Menu/Menu.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/mobile/components/Menu/Menu.vue.js +13 -1
- package/dist/prometheus-framework/src/modules/mobile/components/Menu/Menu.vue2.cjs +1 -1
- package/dist/prometheus-framework/src/modules/mobile/components/Menu/Menu.vue2.js +1 -13
- package/dist/prometheus-framework/src/modules/orders/components/pages/OrderCreateBackoffice.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/orders/components/pages/OrderCreateBackoffice.vue.js +3 -3
- package/dist/prometheus-framework/src/modules/orders/components/sections/FormAddCustomer.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/orders/components/sections/FormAddCustomer.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/orders/components/sections/FormCustomerDetails.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/orders/components/sections/FormCustomerDetails.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/orders/components/sections/FormDelivery.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/orders/components/sections/FormDelivery.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/blocks/DepartmentMemberModify.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/blocks/DepartmentMemberModify.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/elements/ButtonToggleMembership.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/elements/ButtonToggleMembership.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/pages/DepartmentEdit.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/pages/DepartmentEdit.vue.js +3 -3
- package/dist/prometheus-framework/src/modules/organizations/components/pages/Members.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/pages/Members.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/organizations/components/pages/Organization.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/pages/Organization.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationEdit.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationEdit.vue.js +3 -3
- package/dist/prometheus-framework/src/modules/organizations/components/sections/Documents.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/sections/Documents.vue.js +6 -5
- package/dist/prometheus-framework/src/modules/organizations/components/sections/MembersAdd.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/sections/MembersAdd.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/organizations/components/sections/Organizations.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/sections/Organizations.vue.js +6 -5
- package/dist/prometheus-framework/src/modules/products/components/blocks/CardPosition.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/blocks/CardPosition.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/products/components/blocks/ImagesThumbnails.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/blocks/ImagesThumbnails.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/products/components/blocks/LeftoverPositions.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/blocks/LeftoverPositions.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/products/components/blocks/ListPositions.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/blocks/ListPositions.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/products/components/pages/Categories.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/pages/Categories.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/products/components/pages/CategoryEdit.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/pages/CategoryEdit.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/products/components/pages/EditLeftover.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/pages/EditLeftover.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/products/components/pages/Product.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/pages/Product.vue.js +20 -25
- package/dist/prometheus-framework/src/modules/products/components/pages/ProductEdit.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/pages/ProductEdit.vue.js +3 -3
- package/dist/prometheus-framework/src/modules/products/components/sections/EditModifications.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/sections/EditModifications.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/products/components/sections/EditProductInfo.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/sections/EditProductInfo.vue.js +8 -7
- package/dist/prometheus-framework/src/modules/products/components/sections/SectionProduct.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/sections/SectionProduct.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/reports/components/sections/FormReport.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/reports/components/sections/FormReport.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/users/components/pages/Profile.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/users/components/pages/Profile.vue.js +6 -5
- package/dist/prometheus-framework/src/modules/users/components/pages/ProfileEdit.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/users/components/pages/ProfileEdit.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/wallet/views/components/pages/Wallet.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/wallet/views/components/pages/Wallet.vue.js +5 -4
- package/dist/prometheus-framework.cjs.js +1 -1
- package/dist/prometheus-framework.es.js +1 -1
- package/dist/style.css +1 -1
- package/dist/web-Bk_OtXgv.js +1 -0
- package/dist/web-CXzcKdk4.mjs +54 -0
- package/dist/web-D9Cfcy5k.js +1 -0
- package/dist/web-VFuzUsNl.mjs +54 -0
- package/package.json +1 -1
- package/src/components/Button/Button.vue +5 -8
- package/src/components/FieldPhone/FieldPhone.vue +4 -0
- package/src/modules/auth/components/pages/ResetPassword.vue +1 -1
- package/src/modules/auth/components/pages/SignIn.vue +3 -3
- package/src/modules/auth/components/pages/SignUp.vue +1 -1
- package/src/modules/auth/controllers/auth.controller.js +1 -0
- package/src/modules/auth/store/auth.js +3 -5
- package/src/modules/auth/store/twofa.js +1 -1
- package/src/modules/middlewares/client/inputs.validation.js +0 -13
@@ -1,105 +1,105 @@
|
|
1
|
-
import { Web3ConfigEvent as
|
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
|
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
|
8
|
-
import { BlockTags as
|
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
|
11
|
-
import { SubscriptionError as
|
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
|
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
|
17
|
-
import { validator as
|
18
|
-
import { isNullish as
|
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
|
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
|
25
|
-
import { getLogs as
|
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
|
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 {
|
30
|
-
import { encodeEventSignature as
|
31
|
-
import { encodeFunctionSignature as
|
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
|
34
|
-
import { encodeMethodABI as
|
35
|
-
import { LogsSubscription as
|
36
|
-
import { isWeb3ContractContext as
|
37
|
-
import { format as
|
38
|
-
import { isContractInitOptions as
|
39
|
-
import { keccak256Wrapper as
|
40
|
-
import { toChecksumAddress as
|
41
|
-
var
|
42
|
-
function
|
43
|
-
return
|
44
|
-
|
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 (
|
48
|
-
function
|
47
|
+
return new (n || (n = Promise))(function(e, o) {
|
48
|
+
function d(c) {
|
49
49
|
try {
|
50
|
-
i(
|
51
|
-
} catch (
|
52
|
-
|
50
|
+
i(s.next(c));
|
51
|
+
} catch (l) {
|
52
|
+
o(l);
|
53
53
|
}
|
54
54
|
}
|
55
|
-
function a(
|
55
|
+
function a(c) {
|
56
56
|
try {
|
57
|
-
i(
|
58
|
-
} catch (
|
59
|
-
|
57
|
+
i(s.throw(c));
|
58
|
+
} catch (l) {
|
59
|
+
o(l);
|
60
60
|
}
|
61
61
|
}
|
62
|
-
function i(
|
63
|
-
|
62
|
+
function i(c) {
|
63
|
+
c.done ? e(c.value) : r(c.value).then(d, a);
|
64
64
|
}
|
65
|
-
i((
|
65
|
+
i((s = s.apply(z, t || [])).next());
|
66
66
|
});
|
67
67
|
};
|
68
|
-
const
|
69
|
-
logs:
|
70
|
-
newHeads:
|
71
|
-
newBlockHeaders:
|
68
|
+
const ft = {
|
69
|
+
logs: q,
|
70
|
+
newHeads: $,
|
71
|
+
newBlockHeaders: $
|
72
72
|
};
|
73
|
-
class S extends
|
74
|
-
constructor(t,
|
75
|
-
var
|
76
|
-
const i =
|
77
|
-
let
|
78
|
-
|
79
|
-
let
|
80
|
-
if (typeof
|
81
|
-
throw new
|
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
|
87
|
-
this.config.contractDataInputFill = (
|
88
|
-
address:
|
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: (
|
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,
|
96
|
-
set: (
|
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: (
|
99
|
+
set: (m) => this._parseAndSetJsonInterface(m, h),
|
100
100
|
get: () => this._jsonInterface
|
101
|
-
}),
|
102
|
-
this.setConfig({ [
|
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
|
264
|
-
let
|
265
|
-
|
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
|
270
|
-
if ((!
|
271
|
-
throw new
|
272
|
-
const a = (
|
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: (
|
276
|
-
const
|
277
|
-
return this._contractMethodDeploySend(
|
291
|
+
send: (l) => {
|
292
|
+
const h = Object.assign({}, l);
|
293
|
+
return this._contractMethodDeploySend(e, a, h, i);
|
278
294
|
},
|
279
|
-
estimateGas: (
|
280
|
-
const
|
295
|
+
estimateGas: (l, h = g) => _(this, void 0, void 0, function* () {
|
296
|
+
const v = Object.assign({}, l);
|
281
297
|
return this._contractMethodEstimateGas({
|
282
|
-
abi:
|
298
|
+
abi: e,
|
283
299
|
params: a,
|
284
|
-
returnFormat:
|
285
|
-
options:
|
300
|
+
returnFormat: h,
|
301
|
+
options: v,
|
286
302
|
contractOptions: i
|
287
303
|
});
|
288
304
|
}),
|
289
|
-
encodeABI: () =>
|
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,
|
293
|
-
var
|
294
|
-
return
|
295
|
-
const
|
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" && !
|
298
|
-
),
|
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
|
301
|
-
const { fromBlock: i, toBlock:
|
302
|
-
return
|
303
|
-
var
|
304
|
-
if (Array.isArray(
|
305
|
-
return
|
306
|
-
const
|
307
|
-
return
|
308
|
-
})) :
|
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,
|
312
|
-
this._address = t &&
|
328
|
+
_parseAndSetAddress(t, n = g) {
|
329
|
+
this._address = t && ut(M({ format: "address" }, t, n));
|
313
330
|
}
|
314
|
-
|
315
|
-
|
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((
|
319
|
-
for (const
|
320
|
-
const
|
321
|
-
if (
|
322
|
-
const
|
323
|
-
|
324
|
-
...(
|
325
|
-
|
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
|
328
|
-
this._functions[
|
329
|
-
signature:
|
330
|
-
method:
|
331
|
-
}, this._methods[
|
332
|
-
} else if (
|
333
|
-
const
|
334
|
-
|
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,
|
359
|
+
a = [...a, h];
|
337
360
|
}
|
338
|
-
this._events.allEvents = this._createContractEvent(
|
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,
|
342
|
-
var
|
364
|
+
_getAbiParams(t, n) {
|
365
|
+
var s;
|
343
366
|
try {
|
344
|
-
return
|
345
|
-
} catch (
|
346
|
-
throw new
|
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,
|
350
|
-
const
|
351
|
-
return (...
|
352
|
-
var
|
353
|
-
let
|
354
|
-
const
|
355
|
-
let
|
356
|
-
const
|
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 =
|
381
|
+
return ((f = u.inputs) !== null && f !== void 0 ? f : []).length === e.length;
|
359
382
|
});
|
360
|
-
if (
|
361
|
-
|
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
|
364
|
-
for (const
|
386
|
+
const u = [], f = [];
|
387
|
+
for (const p of v)
|
365
388
|
try {
|
366
|
-
|
367
|
-
|
368
|
-
|
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 (
|
372
|
-
|
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
|
375
|
-
arguments:
|
376
|
-
call: (
|
377
|
-
return this._contractMethodCall(
|
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: (
|
380
|
-
estimateGas: (
|
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:
|
383
|
-
params:
|
406
|
+
abi: l,
|
407
|
+
params: i,
|
384
408
|
returnFormat: f,
|
385
|
-
options:
|
409
|
+
options: u
|
386
410
|
});
|
387
411
|
}),
|
388
|
-
encodeABI: () =>
|
389
|
-
|
390
|
-
|
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
|
418
|
+
return l.stateMutability === "payable", m;
|
394
419
|
};
|
395
420
|
}
|
396
|
-
_contractMethodCall(t,
|
397
|
-
var
|
398
|
-
return
|
399
|
-
const
|
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:
|
402
|
-
options: Object.assign(Object.assign({},
|
403
|
-
contractOptions: Object.assign(Object.assign({}, this.options), { from: (
|
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
|
407
|
-
return
|
431
|
+
const a = yield tt(this, d, e, g);
|
432
|
+
return at(t, a);
|
408
433
|
} catch (a) {
|
409
|
-
throw a instanceof
|
434
|
+
throw a instanceof D && T(s, a.cause), a;
|
410
435
|
}
|
411
436
|
});
|
412
437
|
}
|
413
|
-
_contractMethodCreateAccessList(t,
|
414
|
-
var
|
415
|
-
return
|
416
|
-
const
|
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:
|
419
|
-
options: Object.assign(Object.assign({},
|
420
|
-
contractOptions: Object.assign(Object.assign({}, this.options), { from: (
|
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
|
448
|
+
return it(this, d, e, g);
|
424
449
|
} catch (a) {
|
425
|
-
throw a instanceof
|
450
|
+
throw a instanceof D && T(s, a.cause), a;
|
426
451
|
}
|
427
452
|
});
|
428
453
|
}
|
429
|
-
_contractMethodSend(t,
|
430
|
-
var
|
431
|
-
let a =
|
432
|
-
a = Object.assign(Object.assign({}, a), { input: void 0, from: (
|
433
|
-
const i =
|
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:
|
436
|
-
options: Object.assign(Object.assign({},
|
460
|
+
params: n,
|
461
|
+
options: Object.assign(Object.assign({}, r), { dataInputFill: this.config.contractDataInputFill }),
|
437
462
|
contractOptions: a
|
438
|
-
}),
|
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
|
444
|
-
|
445
|
-
}),
|
468
|
+
return c.on("error", (l) => {
|
469
|
+
l instanceof D && T(s, l.cause);
|
470
|
+
}), c;
|
446
471
|
}
|
447
|
-
_contractMethodDeploySend(t,
|
448
|
-
var
|
449
|
-
let
|
450
|
-
|
451
|
-
const a =
|
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:
|
454
|
-
options: Object.assign(Object.assign({},
|
455
|
-
contractOptions:
|
478
|
+
params: n,
|
479
|
+
options: Object.assign(Object.assign({}, s), { dataInputFill: this.config.contractDataInputFill }),
|
480
|
+
contractOptions: d
|
456
481
|
});
|
457
|
-
return
|
482
|
+
return G(this, a, g, {
|
458
483
|
transactionResolver: (i) => {
|
459
484
|
if (i.status === BigInt(0))
|
460
|
-
throw new
|
461
|
-
const
|
462
|
-
return
|
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:
|
470
|
-
return
|
471
|
-
const
|
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:
|
474
|
-
options: Object.assign(Object.assign({},
|
475
|
-
contractOptions:
|
498
|
+
params: n,
|
499
|
+
options: Object.assign(Object.assign({}, r), { dataInputFill: this.config.contractDataInputFill }),
|
500
|
+
contractOptions: e ?? this.options
|
476
501
|
});
|
477
|
-
return
|
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,
|
482
|
-
return (...
|
483
|
-
var
|
484
|
-
const { topics:
|
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:
|
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:
|
517
|
+
returnFormat: n
|
493
518
|
});
|
494
|
-
return
|
495
|
-
a && a.forEach((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
|
-
|
498
|
-
}), (
|
499
|
-
|
500
|
-
}),
|
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
|
505
|
-
this.context = t,
|
506
|
-
|
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
|
}
|