@ozdao/prometheus-framework 0.2.31 → 0.2.33
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/main.css +1 -1
- package/dist/node_modules/@adraffy/ens-normalize/dist/index.cjs +1 -1
- package/dist/node_modules/@adraffy/ens-normalize/dist/index.js +222 -218
- package/dist/node_modules/@noble/curves/esm/abstract/modular.cjs +1 -1
- package/dist/node_modules/@noble/curves/esm/abstract/modular.js +102 -91
- package/dist/node_modules/@noble/curves/esm/abstract/utils.cjs +1 -1
- package/dist/node_modules/@noble/curves/esm/abstract/utils.js +138 -115
- package/dist/node_modules/@noble/curves/esm/abstract/weierstrass.cjs +1 -1
- package/dist/node_modules/@noble/curves/esm/abstract/weierstrass.js +185 -185
- package/dist/node_modules/@noble/curves/esm/secp256k1.cjs +1 -1
- package/dist/node_modules/@noble/curves/esm/secp256k1.js +11 -8
- package/dist/node_modules/@noble/hashes/esm/_assert.cjs +1 -1
- package/dist/node_modules/@noble/hashes/esm/_assert.js +29 -33
- package/dist/node_modules/@noble/hashes/esm/_sha2.cjs +1 -1
- package/dist/node_modules/@noble/hashes/esm/_sha2.js +15 -15
- package/dist/node_modules/@noble/hashes/esm/_u64.cjs +1 -1
- package/dist/node_modules/@noble/hashes/esm/_u64.js +38 -20
- package/dist/node_modules/@noble/hashes/esm/hmac.cjs +1 -1
- package/dist/node_modules/@noble/hashes/esm/hmac.js +20 -20
- package/dist/node_modules/@noble/hashes/esm/pbkdf2.cjs +1 -1
- package/dist/node_modules/@noble/hashes/esm/pbkdf2.js +20 -20
- package/dist/node_modules/@noble/hashes/esm/scrypt.cjs +1 -1
- package/dist/node_modules/@noble/hashes/esm/scrypt.js +41 -41
- package/dist/node_modules/@noble/hashes/esm/sha256.cjs +1 -1
- package/dist/node_modules/@noble/hashes/esm/sha256.js +23 -29
- package/dist/node_modules/@noble/hashes/esm/sha3.cjs +1 -1
- package/dist/node_modules/@noble/hashes/esm/sha3.js +44 -55
- package/dist/node_modules/@noble/hashes/esm/sha512.cjs +1 -1
- package/dist/node_modules/@noble/hashes/esm/sha512.js +23 -41
- package/dist/node_modules/@noble/hashes/esm/utils.cjs +1 -1
- package/dist/node_modules/@noble/hashes/esm/utils.js +37 -33
- package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework.es.cjs +20 -0
- package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework.es.js +3974 -0
- package/dist/node_modules/embla-carousel/esm/embla-carousel.esm.cjs +1 -0
- package/dist/node_modules/embla-carousel/esm/embla-carousel.esm.js +1202 -0
- package/dist/node_modules/embla-carousel-autoplay/esm/embla-carousel-autoplay.esm.cjs +1 -0
- package/dist/node_modules/embla-carousel-autoplay/esm/embla-carousel-autoplay.esm.js +97 -0
- package/dist/node_modules/embla-carousel-reactive-utils/esm/embla-carousel-reactive-utils.esm.cjs +1 -0
- package/dist/node_modules/embla-carousel-reactive-utils/esm/embla-carousel-reactive-utils.esm.js +37 -0
- package/dist/node_modules/embla-carousel-vue/esm/embla-carousel-vue.esm.cjs +1 -0
- package/dist/node_modules/embla-carousel-vue/esm/embla-carousel-vue.esm.js +22 -0
- package/dist/node_modules/ethereum-cryptography/esm/utils.cjs +1 -1
- package/dist/node_modules/ethereum-cryptography/esm/utils.js +1 -4
- package/dist/node_modules/js-cookie/dist/js.cookie.cjs +1 -0
- package/dist/node_modules/js-cookie/dist/js.cookie.js +74 -0
- package/dist/node_modules/vue3-carousel/dist/carousel.es.cjs +4 -4
- package/dist/node_modules/vue3-carousel/dist/carousel.es.js +340 -244
- package/dist/node_modules/web3/lib/esm/abi.cjs +1 -1
- package/dist/node_modules/web3/lib/esm/abi.js +5 -10
- package/dist/node_modules/web3/lib/esm/accounts.cjs +1 -1
- package/dist/node_modules/web3/lib/esm/accounts.js +27 -24
- 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/lib/esm/web3.cjs +1 -1
- package/dist/node_modules/web3/lib/esm/web3.js +53 -57
- package/dist/node_modules/web3-core/lib/esm/utils.cjs +1 -1
- package/dist/node_modules/web3-core/lib/esm/utils.js +3 -4
- package/dist/node_modules/web3-core/lib/esm/web3_config.cjs +1 -1
- package/dist/node_modules/web3-core/lib/esm/web3_config.js +22 -19
- package/dist/node_modules/web3-core/lib/esm/web3_context.cjs +1 -1
- package/dist/node_modules/web3-core/lib/esm/web3_context.js +72 -57
- package/dist/node_modules/web3-core/lib/esm/web3_request_manager.cjs +1 -1
- package/dist/node_modules/web3-core/lib/esm/web3_request_manager.js +53 -61
- package/dist/node_modules/web3-errors/lib/esm/errors/account_errors.js +8 -8
- package/dist/node_modules/web3-eth/lib/esm/rpc_method_wrappers.cjs +1 -1
- package/dist/node_modules/web3-eth/lib/esm/rpc_method_wrappers.js +1 -1
- package/dist/node_modules/web3-eth/lib/esm/utils/get_revert_reason.cjs +1 -1
- package/dist/node_modules/web3-eth/lib/esm/utils/get_revert_reason.js +42 -42
- package/dist/node_modules/web3-eth/lib/esm/utils/prepare_transaction_for_signing.cjs +1 -1
- package/dist/node_modules/web3-eth/lib/esm/utils/prepare_transaction_for_signing.js +19 -19
- package/dist/node_modules/web3-eth/lib/esm/utils/send_tx_helper.cjs +1 -1
- package/dist/node_modules/web3-eth/lib/esm/utils/send_tx_helper.js +29 -29
- package/dist/node_modules/web3-eth/lib/esm/utils/watch_transaction_by_polling.cjs +1 -0
- package/dist/node_modules/web3-eth/lib/esm/utils/watch_transaction_by_polling.js +51 -0
- package/dist/node_modules/web3-eth/lib/esm/utils/watch_transaction_by_subscription.cjs +1 -1
- package/dist/node_modules/web3-eth/lib/esm/utils/watch_transaction_by_subscription.js +1 -1
- package/dist/node_modules/web3-eth/lib/esm/utils/watch_transaction_for_confirmations.cjs +1 -1
- package/dist/node_modules/web3-eth/lib/esm/utils/watch_transaction_for_confirmations.js +1 -1
- package/dist/node_modules/web3-eth/lib/esm/web3_eth.js +132 -47
- package/dist/node_modules/web3-eth-abi/lib/esm/api/functions_api.cjs +1 -1
- package/dist/node_modules/web3-eth-abi/lib/esm/api/functions_api.js +21 -15
- package/dist/node_modules/web3-eth-abi/lib/esm/api/parameters_api.cjs +1 -1
- package/dist/node_modules/web3-eth-abi/lib/esm/api/parameters_api.js +15 -13
- package/dist/node_modules/web3-eth-abi/lib/esm/coders/base/bytes.cjs +1 -1
- package/dist/node_modules/web3-eth-abi/lib/esm/coders/base/bytes.js +1 -1
- package/dist/node_modules/web3-eth-abi/lib/esm/coders/base/index.cjs +1 -1
- package/dist/node_modules/web3-eth-abi/lib/esm/coders/base/index.js +61 -53
- package/dist/node_modules/web3-eth-abi/lib/esm/coders/encode.cjs +1 -1
- package/dist/node_modules/web3-eth-abi/lib/esm/coders/encode.js +36 -9
- package/dist/node_modules/web3-eth-accounts/lib/esm/account.cjs +2 -2
- package/dist/node_modules/web3-eth-accounts/lib/esm/account.js +107 -103
- package/dist/node_modules/web3-eth-accounts/lib/esm/common/utils.cjs +1 -1
- package/dist/node_modules/web3-eth-accounts/lib/esm/common/utils.js +135 -133
- package/dist/node_modules/web3-eth-accounts/lib/esm/tx/baseTransaction.cjs +1 -1
- package/dist/node_modules/web3-eth-accounts/lib/esm/tx/baseTransaction.js +47 -31
- package/dist/node_modules/web3-eth-accounts/lib/esm/tx/transactionFactory.cjs +1 -1
- package/dist/node_modules/web3-eth-accounts/lib/esm/tx/transactionFactory.js +18 -17
- package/dist/node_modules/web3-eth-contract/lib/esm/contract.cjs +1 -1
- package/dist/node_modules/web3-eth-contract/lib/esm/contract.js +113 -111
- package/dist/node_modules/web3-eth-contract/lib/esm/encoding.cjs +1 -1
- package/dist/node_modules/web3-eth-contract/lib/esm/encoding.js +27 -27
- package/dist/node_modules/web3-eth-contract/lib/esm/utils.cjs +1 -1
- package/dist/node_modules/web3-eth-contract/lib/esm/utils.js +28 -40
- 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 +10 -10
- package/dist/node_modules/web3-utils/lib/esm/converters.cjs +1 -1
- package/dist/node_modules/web3-utils/lib/esm/converters.js +78 -75
- package/dist/node_modules/web3-utils/lib/esm/formatter.cjs +1 -1
- package/dist/node_modules/web3-utils/lib/esm/formatter.js +8 -8
- package/dist/node_modules/web3-utils/lib/esm/hash.cjs +1 -1
- package/dist/node_modules/web3-utils/lib/esm/hash.js +44 -43
- package/dist/node_modules/web3-utils/lib/esm/index.cjs +1 -1
- package/dist/node_modules/web3-utils/lib/esm/index.js +64 -62
- package/dist/node_modules/web3-utils/lib/esm/socket_provider.cjs +1 -1
- package/dist/node_modules/web3-utils/lib/esm/socket_provider.js +78 -40
- package/dist/node_modules/web3-utils/lib/esm/uint8array.cjs +1 -1
- package/dist/node_modules/web3-utils/lib/esm/uint8array.js +16 -11
- package/dist/node_modules/web3-utils/lib/esm/validation.cjs +1 -1
- package/dist/node_modules/web3-utils/lib/esm/validation.js +45 -33
- package/dist/node_modules/web3-validator/lib/esm/utils.cjs +1 -1
- package/dist/node_modules/web3-validator/lib/esm/utils.js +127 -104
- package/dist/node_modules/web3-validator/lib/esm/validation/address.cjs +1 -1
- package/dist/node_modules/web3-validator/lib/esm/validation/address.js +12 -11
- package/dist/node_modules/web3-validator/lib/esm/validation/bytes.cjs +1 -1
- package/dist/node_modules/web3-validator/lib/esm/validation/bytes.js +17 -13
- package/dist/prometheus-framework/node_modules/@babel/runtime/helpers/esm/isNativeReflectConstruct.cjs +1 -1
- package/dist/prometheus-framework/node_modules/@babel/runtime/helpers/esm/isNativeReflectConstruct.js +7 -9
- package/dist/prometheus-framework/node_modules/@babel/runtime/helpers/esm/toPrimitive.cjs +1 -1
- package/dist/prometheus-framework/node_modules/@babel/runtime/helpers/esm/toPrimitive.js +8 -8
- package/dist/prometheus-framework/node_modules/@babel/runtime/helpers/esm/toPropertyKey.cjs +1 -1
- package/dist/prometheus-framework/node_modules/@babel/runtime/helpers/esm/toPropertyKey.js +3 -3
- package/dist/prometheus-framework/node_modules/@capacitor/core/dist/index.cjs +1 -1
- package/dist/prometheus-framework/node_modules/@capacitor/core/dist/index.js +52 -52
- package/dist/prometheus-framework/node_modules/@vuepic/vue-datepicker/dist/vue-datepicker.cjs +1 -1
- package/dist/prometheus-framework/node_modules/@vuepic/vue-datepicker/dist/vue-datepicker.js +2501 -2482
- package/dist/prometheus-framework/node_modules/axios/lib/core/Axios.cjs +2 -1
- package/dist/prometheus-framework/node_modules/axios/lib/core/Axios.js +75 -61
- package/dist/prometheus-framework/node_modules/axios/lib/defaults/index.cjs +1 -1
- package/dist/prometheus-framework/node_modules/axios/lib/defaults/index.js +33 -33
- package/dist/prometheus-framework/node_modules/axios/lib/env/data.cjs +1 -1
- package/dist/prometheus-framework/node_modules/axios/lib/env/data.js +1 -1
- package/dist/prometheus-framework/node_modules/axios/lib/helpers/combineURLs.cjs +1 -1
- package/dist/prometheus-framework/node_modules/axios/lib/helpers/combineURLs.js +1 -1
- package/dist/prometheus-framework/node_modules/axios/lib/helpers/formDataToJSON.cjs +1 -1
- package/dist/prometheus-framework/node_modules/axios/lib/helpers/formDataToJSON.js +4 -2
- package/dist/prometheus-framework/node_modules/bignumber.js/bignumber.cjs +1 -0
- package/dist/prometheus-framework/node_modules/bignumber.js/bignumber.js +701 -0
- package/dist/prometheus-framework/node_modules/libphonenumber-js/es6/parseIncompletePhoneNumber.cjs +1 -1
- package/dist/prometheus-framework/node_modules/libphonenumber-js/es6/parseIncompletePhoneNumber.js +14 -7
- package/dist/prometheus-framework/node_modules/libphonenumber-js/metadata.min.json.cjs +1 -1
- package/dist/prometheus-framework/node_modules/libphonenumber-js/metadata.min.json.js +1 -1
- package/dist/prometheus-framework/src/components/Address/Address.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/Address/Address.vue.js +2 -80
- package/dist/prometheus-framework/src/components/Address/Address.vue2.cjs +1 -1
- package/dist/prometheus-framework/src/components/Address/Address.vue2.js +80 -2
- package/dist/prometheus-framework/src/components/Block/Block.vue.cjs +1 -0
- package/dist/prometheus-framework/src/components/Block/Block.vue.js +62 -0
- package/dist/prometheus-framework/src/components/Breadcrumbs/Breadcrumbs.vue2.cjs +1 -1
- package/dist/prometheus-framework/src/components/Breadcrumbs/Breadcrumbs.vue2.js +15 -15
- package/dist/prometheus-framework/src/components/Button/Button.vue2.cjs +1 -1
- package/dist/prometheus-framework/src/components/Button/Button.vue2.js +51 -40
- package/dist/prometheus-framework/src/components/Checkbox/Checkbox.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/Checkbox/Checkbox.vue.js +21 -21
- package/dist/prometheus-framework/src/components/Chips/Chips.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/Chips/Chips.vue.js +9 -7
- package/dist/prometheus-framework/src/components/DatePicker/DatePicker.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/DatePicker/DatePicker.vue.js +12 -13
- package/dist/prometheus-framework/src/components/Dropdown/Dropdown.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/Dropdown/Dropdown.vue.js +2 -49
- package/dist/prometheus-framework/src/components/Dropdown/Dropdown.vue2.cjs +1 -1
- package/dist/prometheus-framework/src/components/Dropdown/Dropdown.vue2.js +49 -2
- package/dist/prometheus-framework/src/components/EditImages/EditImages.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/EditImages/EditImages.vue.js +53 -36
- package/dist/prometheus-framework/src/components/Feed/Feed.vue.cjs +1 -0
- package/dist/prometheus-framework/src/components/Feed/Feed.vue.js +117 -0
- package/dist/prometheus-framework/src/components/FieldBig/FieldBig.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/FieldBig/FieldBig.vue.js +48 -40
- package/dist/prometheus-framework/src/components/FieldPhone/FieldPhone.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/FieldPhone/FieldPhone.vue.js +1 -2
- package/dist/prometheus-framework/src/components/Loader/Loader.vue2.cjs +1 -1
- package/dist/prometheus-framework/src/components/Loader/Loader.vue2.js +20 -10
- package/dist/prometheus-framework/src/components/LocationMarker/LocationMarker.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/LocationMarker/LocationMarker.vue.js +2 -98
- package/dist/prometheus-framework/src/components/Magnifier/Magnifier.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/Magnifier/Magnifier.vue.js +2 -2
- package/dist/prometheus-framework/src/components/Popup/Popup.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/Popup/Popup.vue.js +25 -27
- package/dist/prometheus-framework/src/components/Radio/Radio.vue.cjs +1 -0
- package/dist/prometheus-framework/src/components/Radio/Radio.vue.js +55 -0
- package/dist/prometheus-framework/src/components/Select/Select.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/Select/Select.vue.js +55 -40
- package/dist/prometheus-framework/src/components/Spoiler/Spoiler.vue2.cjs +1 -1
- package/dist/prometheus-framework/src/components/Spoiler/Spoiler.vue2.js +5 -5
- package/dist/prometheus-framework/src/components/Tab/Tab.vue2.cjs +1 -1
- package/dist/prometheus-framework/src/components/Tab/Tab.vue2.js +1 -1
- package/dist/prometheus-framework/src/components/Tooltip/Tooltip.vue.cjs +1 -0
- package/dist/prometheus-framework/src/components/Tooltip/Tooltip.vue.js +45 -0
- package/dist/prometheus-framework/src/components/Tooltip/Tooltip.vue2.cjs +1 -0
- package/dist/prometheus-framework/src/components/Tooltip/Tooltip.vue2.js +4 -0
- package/dist/prometheus-framework/src/components/Upload/Upload.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/Upload/Upload.vue.js +2 -73
- package/dist/prometheus-framework/src/components/Upload/Upload.vue2.cjs +1 -1
- package/dist/prometheus-framework/src/components/Upload/Upload.vue2.js +73 -2
- package/dist/prometheus-framework/src/components/UploadImage/UploadImage.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/UploadImage/UploadImage.vue.js +3 -3
- package/dist/prometheus-framework/src/components/UploadImageMultiple/UploadImageMultiple.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/UploadImageMultiple/UploadImageMultiple.vue.js +94 -33
- 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 +12 -12
- 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 +69 -61
- 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 +26 -27
- package/dist/prometheus-framework/src/modules/auth/localization/EnterCode.json.cjs +1 -1
- package/dist/prometheus-framework/src/modules/auth/localization/EnterCode.json.js +2 -2
- package/dist/prometheus-framework/src/modules/auth/localization/EnterPassword.json.cjs +1 -1
- package/dist/prometheus-framework/src/modules/auth/localization/EnterPassword.json.js +7 -7
- package/dist/prometheus-framework/src/modules/auth/localization/ResetPassword.json.cjs +1 -1
- package/dist/prometheus-framework/src/modules/auth/localization/ResetPassword.json.js +2 -2
- package/dist/prometheus-framework/src/modules/auth/localization/SignIn.json.cjs +1 -1
- package/dist/prometheus-framework/src/modules/auth/localization/SignIn.json.js +3 -3
- package/dist/prometheus-framework/src/modules/auth/localization/SignUp.json.cjs +1 -1
- package/dist/prometheus-framework/src/modules/auth/localization/SignUp.json.js +3 -3
- package/dist/prometheus-framework/src/modules/auth/store/auth.cjs +1 -1
- package/dist/prometheus-framework/src/modules/auth/store/auth.js +30 -30
- package/dist/prometheus-framework/src/modules/auth/store/invites.cjs +1 -1
- package/dist/prometheus-framework/src/modules/auth/store/invites.js +1 -1
- package/dist/prometheus-framework/src/modules/auth/store/twofa.cjs +1 -1
- package/dist/prometheus-framework/src/modules/auth/store/twofa.js +1 -1
- package/dist/prometheus-framework/src/modules/backoffice/components/layouts/Backoffice.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/backoffice/components/layouts/Backoffice.vue.js +9 -9
- 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 +90 -47
- package/dist/prometheus-framework/src/modules/backoffice/router/backoffice.cjs +1 -1
- package/dist/prometheus-framework/src/modules/backoffice/router/backoffice.js +166 -133
- package/dist/prometheus-framework/src/modules/community/components/blocks/CardBlogpost.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/community/components/blocks/CardBlogpost.vue.js +86 -68
- package/dist/prometheus-framework/src/modules/community/components/layouts/Community.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/community/components/layouts/Community.vue.js +105 -41
- package/dist/prometheus-framework/src/modules/community/components/pages/Blog.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/community/components/pages/Blog.vue.js +16 -16
- package/dist/prometheus-framework/src/modules/community/components/pages/BlogPost.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/community/components/pages/BlogPost.vue.js +51 -42
- 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 +14 -14
- package/dist/prometheus-framework/src/modules/community/components/pages/Community.vue2.js +2 -2
- 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 +108 -94
- package/dist/prometheus-framework/src/modules/community/components/sections/Comments.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/community/components/sections/Comments.vue.js +19 -19
- 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 +11 -11
- package/dist/prometheus-framework/src/modules/community/components/sections/HotPosts.vue2.js +2 -2
- package/dist/prometheus-framework/src/modules/community/components/sections/JoinUs.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/community/components/sections/JoinUs.vue.js +40 -29
- package/dist/prometheus-framework/src/modules/community/store/blogposts.cjs +1 -1
- package/dist/prometheus-framework/src/modules/community/store/blogposts.js +10 -9
- package/dist/prometheus-framework/src/modules/constructor/components/elements/Audio.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/constructor/components/elements/Audio.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 +27 -16
- package/dist/prometheus-framework/src/modules/constructor/components/elements/ImageUpload.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/constructor/components/elements/ImageUpload.vue.js +21 -21
- package/dist/prometheus-framework/src/modules/constructor/components/elements/Textarea.vue.cjs +4 -3
- package/dist/prometheus-framework/src/modules/constructor/components/elements/Textarea.vue.js +31 -28
- package/dist/prometheus-framework/src/modules/constructor/components/elements/Video.vue.cjs +1 -0
- package/dist/prometheus-framework/src/modules/constructor/components/elements/Video.vue.js +48 -0
- package/dist/prometheus-framework/src/modules/constructor/components/elements/VideoPlayer.vue.cjs +1 -0
- package/dist/prometheus-framework/src/modules/constructor/components/elements/VideoPlayer.vue.js +33 -0
- package/dist/prometheus-framework/src/modules/constructor/components/elements/Youtube.vue.cjs +1 -0
- package/dist/prometheus-framework/src/modules/constructor/components/elements/Youtube.vue.js +13 -0
- package/dist/prometheus-framework/src/modules/constructor/components/sections/Constructor.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/constructor/components/sections/Constructor.vue.js +106 -85
- package/dist/prometheus-framework/src/modules/events/components/layouts/layoutEvents.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/events/components/layouts/layoutEvents.vue.js +31 -34
- package/dist/prometheus-framework/src/modules/events/components/pages/EditEvent.vue.js +8 -8
- package/dist/prometheus-framework/src/modules/events/components/pages/Events.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/events/components/pages/Events.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/events/router/events.cjs +1 -1
- package/dist/prometheus-framework/src/modules/events/router/events.js +1 -1
- 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 +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 +1 -1
- package/dist/prometheus-framework/src/modules/globals/localization/vue-i18n.cjs +1 -1
- package/dist/prometheus-framework/src/modules/globals/localization/vue-i18n.js +13 -6
- package/dist/prometheus-framework/src/modules/globals/store/globals.cjs +1 -1
- package/dist/prometheus-framework/src/modules/globals/store/globals.js +50 -22
- package/dist/prometheus-framework/src/modules/icons/entities/IconCommunity.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/icons/entities/IconCommunity.vue.js +13 -13
- package/dist/prometheus-framework/src/modules/icons/entities/IconEvents.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/icons/entities/IconEvents.vue.js +3 -3
- package/dist/prometheus-framework/src/modules/icons/entities/IconGroups.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/icons/entities/IconGroups.vue.js +5 -5
- package/dist/prometheus-framework/src/modules/icons/entities/IconPrice.vue.cjs +1 -0
- package/dist/prometheus-framework/src/modules/icons/entities/IconPrice.vue.js +21 -0
- package/dist/prometheus-framework/src/modules/icons/entities/IconShopcart.vue.cjs +1 -0
- package/dist/prometheus-framework/src/modules/icons/entities/IconShopcart.vue.js +21 -0
- package/dist/prometheus-framework/src/modules/icons/entities/IconTime.vue.cjs +1 -0
- package/dist/prometheus-framework/src/modules/icons/entities/IconTime.vue.js +21 -0
- package/dist/prometheus-framework/src/modules/icons/icons.client.cjs +1 -1
- package/dist/prometheus-framework/src/modules/icons/icons.client.js +38 -34
- package/dist/prometheus-framework/src/modules/icons/labels/LabelAppStore.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/icons/labels/LabelAppStore.vue.js +9 -9
- package/dist/prometheus-framework/src/modules/icons/labels/LabelGooglePlay.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/icons/labels/LabelGooglePlay.vue.js +7 -7
- package/dist/prometheus-framework/src/modules/icons/navigation/IconAdd.vue.cjs +1 -0
- package/dist/prometheus-framework/src/modules/icons/navigation/IconAdd.vue.js +30 -0
- package/dist/prometheus-framework/src/modules/icons/navigation/IconChevronRight.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/icons/navigation/IconChevronRight.vue.js +12 -12
- package/dist/prometheus-framework/src/modules/icons/navigation/IconDelete.vue.cjs +1 -0
- package/dist/prometheus-framework/src/modules/icons/navigation/IconDelete.vue.js +27 -0
- package/dist/prometheus-framework/src/modules/icons/navigation/IconMinus.vue.cjs +1 -0
- package/dist/prometheus-framework/src/modules/icons/navigation/IconMinus.vue.js +29 -0
- package/dist/prometheus-framework/src/modules/icons/navigation/IconUpload.vue.cjs +1 -0
- package/dist/prometheus-framework/src/modules/icons/navigation/IconUpload.vue.js +33 -0
- package/dist/prometheus-framework/src/modules/icons/placeholders/PlaceholderImage.vue.cjs +1 -0
- package/dist/prometheus-framework/src/modules/icons/placeholders/PlaceholderImage.vue.js +21 -0
- package/dist/prometheus-framework/src/modules/icons/placeholders/PlaceholderOrganizationPic.vue.cjs +1 -0
- package/dist/prometheus-framework/src/modules/icons/placeholders/PlaceholderOrganizationPic.vue.js +28 -0
- package/dist/prometheus-framework/src/modules/icons/placeholders/PlaceholderUserpic.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/icons/placeholders/PlaceholderUserpic.vue.js +21 -20
- package/dist/prometheus-framework/src/modules/icons/socials/instagram.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/icons/socials/instagram.vue.js +5 -5
- package/dist/prometheus-framework/src/modules/icons/socials/line.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/icons/socials/line.vue.js +6 -6
- package/dist/prometheus-framework/src/modules/icons/socials/reddit.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/icons/socials/reddit.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/icons/socials/telegram.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/icons/socials/telegram.vue.js +7 -7
- package/dist/prometheus-framework/src/modules/icons/socials/twitter.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/icons/socials/twitter.vue.js +6 -6
- package/dist/prometheus-framework/src/modules/icons/socials/youtube.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/icons/socials/youtube.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/landing/components/sections/MobileApp.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/landing/components/sections/MobileApp.vue.js +48 -35
- package/dist/prometheus-framework/src/modules/marketplace/store/marketplace.cjs +1 -0
- package/dist/prometheus-framework/src/modules/marketplace/store/marketplace.js +63 -0
- package/dist/prometheus-framework/src/modules/middlewares/client/auth.validation.cjs +1 -1
- package/dist/prometheus-framework/src/modules/middlewares/client/auth.validation.js +6 -8
- package/dist/prometheus-framework/src/modules/middlewares/client/states.validation.cjs +1 -1
- package/dist/prometheus-framework/src/modules/middlewares/client/states.validation.js +5 -7
- package/dist/prometheus-framework/src/modules/mobile/components/Menu/MenuItem.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/mobile/components/Menu/MenuItem.vue.js +16 -22
- package/dist/prometheus-framework/src/modules/orders/components/blocks/CardOrder.vue.cjs +1 -0
- package/dist/prometheus-framework/src/modules/orders/components/blocks/CardOrder.vue.js +4 -0
- package/dist/prometheus-framework/src/modules/orders/components/blocks/CardOrderItem.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/orders/components/blocks/CardOrderItem.vue.js +61 -88
- package/dist/prometheus-framework/src/modules/orders/components/pages/EditOrder.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/orders/components/pages/EditOrder.vue.js +104 -193
- package/dist/prometheus-framework/src/modules/orders/components/pages/Orders.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/orders/components/pages/Orders.vue.js +29 -31
- package/dist/prometheus-framework/src/modules/orders/components/sections/FormOrderDetails.vue.cjs +1 -0
- package/dist/prometheus-framework/src/modules/orders/components/sections/FormOrderDetails.vue.js +129 -0
- package/dist/prometheus-framework/src/modules/orders/store/orders.cjs +1 -1
- package/dist/prometheus-framework/src/modules/orders/store/orders.js +45 -36
- package/dist/prometheus-framework/src/modules/orders/store/shopcart.cjs +1 -1
- package/dist/prometheus-framework/src/modules/orders/store/shopcart.js +27 -26
- package/dist/prometheus-framework/src/modules/organizations/components/blocks/CardDepartment.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/blocks/CardDepartment.vue.js +6 -6
- package/dist/prometheus-framework/src/modules/organizations/components/blocks/CardOrganization.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/blocks/CardOrganization.vue.js +85 -79
- package/dist/prometheus-framework/src/modules/organizations/components/blocks/Rating.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/blocks/Rating.vue.js +10 -10
- package/dist/prometheus-framework/src/modules/organizations/components/blocks/Socials.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/blocks/Socials.vue.js +29 -23
- 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 +5 -5
- package/dist/prometheus-framework/src/modules/organizations/components/pages/Department.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/pages/Department.vue.js +4 -4
- 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 +55 -169
- 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 +48 -59
- 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 +173 -94
- 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 +27 -20
- package/dist/prometheus-framework/src/modules/organizations/components/pages/Organizations.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/pages/Organizations.vue.js +43 -33
- package/dist/prometheus-framework/src/modules/organizations/components/sections/DetailsTab.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/sections/DetailsTab.vue.js +67 -63
- package/dist/prometheus-framework/src/modules/organizations/components/sections/Feed.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/sections/Feed.vue.js +28 -30
- package/dist/prometheus-framework/src/modules/organizations/components/sections/FeedDepartments.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/sections/FeedDepartments.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 +2 -2
- package/dist/prometheus-framework/src/modules/organizations/router/members.router.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/router/members.router.js +2 -2
- package/dist/prometheus-framework/src/modules/organizations/router/organizations.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/router/organizations.js +9 -6
- package/dist/prometheus-framework/src/modules/organizations/router/products.router.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/router/products.router.js +69 -20
- package/dist/prometheus-framework/src/modules/organizations/store/departments.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/store/departments.js +1 -1
- package/dist/prometheus-framework/src/modules/organizations/store/invites.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/store/invites.js +1 -1
- package/dist/prometheus-framework/src/modules/organizations/store/organizations.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/store/organizations.js +38 -38
- package/dist/prometheus-framework/src/modules/payments/components/pages/Payments.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/payments/components/pages/Payments.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/products/components/blocks/CardLeftover.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/blocks/CardLeftover.vue.js +39 -44
- 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 +73 -44
- package/dist/prometheus-framework/src/modules/products/components/blocks/CardProduct.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/blocks/CardProduct.vue.js +25 -54
- package/dist/prometheus-framework/src/modules/products/components/blocks/Images360.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/blocks/Images360.vue.js +39 -39
- 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 +12 -12
- package/dist/prometheus-framework/src/modules/products/components/blocks/ListPositions.vue.cjs +1 -0
- package/dist/prometheus-framework/src/modules/products/components/blocks/ListPositions.vue.js +4 -0
- package/dist/prometheus-framework/src/modules/products/components/elements/Price.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/elements/Price.vue.js +18 -11
- package/dist/prometheus-framework/src/modules/products/components/elements/THC.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/elements/THC.vue.js +24 -24
- package/dist/prometheus-framework/src/modules/products/components/pages/EditLeftover.vue.cjs +1 -0
- package/dist/prometheus-framework/src/modules/products/components/pages/EditLeftover.vue.js +140 -0
- package/dist/prometheus-framework/src/modules/products/components/pages/EditLeftover.vue2.cjs +1 -0
- package/dist/prometheus-framework/src/modules/products/components/pages/EditLeftover.vue2.js +4 -0
- package/dist/prometheus-framework/src/modules/products/components/pages/Leftovers.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/pages/Leftovers.vue.js +27 -23
- 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 +24 -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 +246 -102
- package/dist/prometheus-framework/src/modules/products/components/pages/Products.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/pages/Products.vue.js +28 -24
- package/dist/prometheus-framework/src/modules/products/components/pages/ProductsBackoffice.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/pages/ProductsBackoffice.vue.js +23 -24
- 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 +56 -7
- package/dist/prometheus-framework/src/modules/products/components/sections/FilterProducts.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/sections/FilterProducts.vue.js +82 -65
- package/dist/prometheus-framework/src/modules/products/components/sections/PopularProducts.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/sections/PopularProducts.vue.js +71 -54
- package/dist/prometheus-framework/src/modules/products/components/sections/PopularProducts.vue2.cjs +1 -0
- package/dist/prometheus-framework/src/modules/products/components/sections/PopularProducts.vue2.js +4 -0
- 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 +60 -86
- package/dist/prometheus-framework/src/modules/products/store/leftovers.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/store/leftovers.js +29 -37
- package/dist/prometheus-framework/src/modules/products/store/products.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/store/products.js +32 -29
- package/dist/prometheus-framework/src/modules/spots/components/blocks/CardSpot.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/spots/components/blocks/CardSpot.vue.js +43 -107
- package/dist/prometheus-framework/src/modules/spots/store/spots.cjs +1 -1
- package/dist/prometheus-framework/src/modules/spots/store/spots.js +46 -40
- 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 +89 -94
- package/dist/prometheus-framework/src/modules/users/components/pages/ProfileBlogposts.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/users/components/pages/ProfileBlogposts.vue.js +1 -1
- 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 +30 -30
- package/dist/prometheus-framework/src/modules/users/components/pages/ProfileEvents.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/users/components/pages/ProfileEvents.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/users/router/users.cjs +1 -1
- package/dist/prometheus-framework/src/modules/users/router/users.js +2 -2
- package/dist/prometheus-framework/src/modules/wallet/components/pages/Wallet.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/wallet/components/pages/Wallet.vue.js +80 -71
- package/dist/prometheus-framework/src/modules/wallet/store/wallet.cjs +1 -0
- package/dist/prometheus-framework/src/modules/wallet/store/wallet.js +29 -0
- package/dist/prometheus-framework.cjs.js +21 -21
- package/dist/prometheus-framework.es.js +1037 -1023
- package/dist/style.css +1 -1
- package/package.json +1 -1
- package/src/components/Countdown/Countdown.vue +75 -0
- package/src/components/EditImages/EditImages.vue +10 -2
- package/src/components/Upload/Upload.vue +32 -6
- package/src/components/UploadImage/UploadImage.vue +12 -8
- package/src/components/UploadImageMultiple/UploadImageMultiple.vue +4 -2
- package/src/modules/events/components/pages/EditEvent.vue +288 -1
- package/src/modules/events/components/pages/Event.vue +125 -46
- package/src/modules/events/components/sections/HeroEvent.vue +161 -0
- package/src/modules/events/components/sections/SectionLineup.vue +42 -0
- package/src/modules/events/components/sections/SectionMainGuest.vue +104 -0
- package/src/modules/events/components/sections/SectionPreviousEvents.vue +119 -0
- package/src/modules/events/components/sections/SectionSpecialGuests.vue +47 -0
- package/src/modules/events/controllers/events.controller.js +1 -0
- package/src/modules/events/controllers/utils/queryProcessor.js +2 -0
- package/src/modules/events/models/event.model.js +28 -0
- package/src/modules/events/store/events.js +4 -0
- package/src/modules/files/controllers/files.controller.js +3 -0
- package/src/modules/files/middlewares/server/middlewareBusboy.js +115 -100
- package/src/modules/files/routes/files.routes.js +3 -4
- package/src/modules/globals/globals.server.js +0 -1
- package/src/modules/orders/components/blocks/CardOrder.vue +5 -5
- package/src/modules/orders/components/blocks/StatusHistory.vue +84 -0
- package/src/modules/orders/components/pages/Order.vue +11 -54
- package/src/modules/orders/components/pages/Orders.vue +0 -4
- package/src/modules/orders/controllers/orders.controller.js +17 -9
- package/src/modules/orders/models/order.model.js +19 -0
- package/src/modules/orders/routes/orders.routes.js +4 -1
- package/src/modules/products/components/sections/FilterProducts.vue +9 -10
- package/src/modules/wallet/components/pages/Wallet.vue +2 -3
@@ -1 +1 @@
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const W=require("../../../web3-core/lib/esm/web3_config.cjs");require("../../../web3-core/lib/esm/web3_request_manager.cjs");require("../../../web3-core/lib/esm/web3_subscription_manager.cjs");require("../../../web3-core/lib/esm/web3_subscriptions.cjs");const L=require("../../../web3-core/lib/esm/web3_context.cjs");require("../../../web3-core/lib/esm/web3_batch_request.cjs");const v=require("../../../web3-types/lib/esm/data_format_types.cjs"),B=require("../../../web3-types/lib/esm/eth_types.cjs");require("../../../web3-types/lib/esm/web3_base_provider.cjs");const E=require("../../../web3-errors/lib/esm/errors/contract_errors.cjs"),R=require("../../../web3-errors/lib/esm/errors/provider_errors.cjs");require("../../../web3-errors/lib/esm/errors/rpc_errors.cjs");require("../../../web3-eth-iban/lib/esm/iban.cjs");const G=require("../../../web3-validator/lib/esm/errors.cjs");require("../../../web3-validator/lib/esm/formats.cjs");const V=require("../../../web3-validator/lib/esm/utils.cjs"),U=require("../../../web3-validator/lib/esm/default_validator.cjs"),I=require("../../../web3-validator/lib/esm/validation/object.cjs");require("../../../web3-core/lib/esm/web3_promi_event.cjs");require("../../../setimmediate/setImmediate.cjs");require("../../../web3-eth/lib/esm/web3_eth.cjs");const $=require("../../../web3-eth/lib/esm/utils/decoding.cjs");require("../../../web3-eth/lib/esm/schemas.cjs");const q=require("../../../web3-eth/lib/esm/constants.cjs"),T=require("../../../web3-eth/lib/esm/rpc_method_wrappers.cjs");require("../../../web3-eth/lib/esm/utils/prepare_transaction_for_signing.cjs");const N=require("../../../web3-eth/lib/esm/web3_subscriptions.cjs");require("../../../web3-eth/lib/esm/utils/transaction_builder.cjs");const j=require("../../../web3-eth-abi/lib/esm/utils.cjs"),k=require("../../../web3-eth-abi/lib/esm/api/events_api.cjs"),H=require("../../../web3-eth-abi/lib/esm/api/functions_api.cjs");require("../../../web3-eth-abi/lib/esm/coders/base/number.cjs");const D=require("../../../web3-eth-abi/lib/esm/decode_contract_error_data.cjs"),F=require("./encoding.cjs"),P=require("./log_subscription.cjs"),b=require("./utils.cjs"),p=require("../../../web3-utils/lib/esm/formatter.cjs"),J=require("../../../web3-utils/lib/esm/hash.cjs"),K=require("../../../web3-utils/lib/esm/converters.cjs");var m=globalThis&&globalThis.__awaiter||function(x,t,n,s){function c(o){return o instanceof n?o:new n(function(i){i(o)})}return new(n||(n=Promise))(function(o,i){function r(u){try{e(s.next(u))}catch(h){i(h)}}function a(u){try{e(s.throw(u))}catch(h){i(h)}}function e(u){u.done?o(u.value):c(u.value).then(r,a)}e((s=s.apply(x,t||[])).next())})};const O={logs:P.LogsSubscription,newHeads:N.NewHeadsSubscription,newBlockHeaders:N.NewHeadsSubscription};class M extends L.Web3Context{constructor(t,n,s,c,o){var i,r,a;const e=b.isContractInitOptions(n)?n:b.isContractInitOptions(s)?s:void 0;let u;b.isWeb3ContractContext(n)?u=n:b.isWeb3ContractContext(s)?u=s:u=c;let h;if(typeof n=="object"&&"provider"in n?h=n.provider:typeof s=="object"&&"provider"in s?h=s.provider:typeof c=="object"&&"provider"in c?h=c.provider:h=M.givenProvider,super(Object.assign(Object.assign({},u),{provider:h,registeredSubscriptions:O})),this.syncWithContext=!1,this._functions={},!I.isNullish(e)&&!I.isNullish(e.data)&&!I.isNullish(e.input)&&this.config.contractDataInputFill!=="both")throw new E.ContractTransactionDataAndInputError({data:e.data,input:e.input});this._overloadedMethodAbis=new Map;const d=p.isDataFormat(c)?c:p.isDataFormat(s)?s:o??v.DEFAULT_RETURN_FORMAT,l=typeof n=="string"?n:void 0;this.config.contractDataInputFill==="both"?this._dataInputFill=this.config.contractDataInputFill:this._dataInputFill=(i=e==null?void 0:e.dataInputFill)!==null&&i!==void 0?i:this.config.contractDataInputFill,this._parseAndSetJsonInterface(t,d),I.isNullish(l)||this._parseAndSetAddress(l,d),this.options={address:l,jsonInterface:this._jsonInterface,gas:(r=e==null?void 0:e.gas)!==null&&r!==void 0?r:e==null?void 0:e.gasLimit,gasPrice:e==null?void 0:e.gasPrice,from:e==null?void 0:e.from,input:e==null?void 0:e.input,data:e==null?void 0:e.data},this.syncWithContext=(a=e==null?void 0:e.syncWithContext)!==null&&a!==void 0?a:!1,u instanceof L.Web3Context&&this.subscribeToContextEvents(u),Object.defineProperty(this.options,"address",{set:f=>this._parseAndSetAddress(f,d),get:()=>this._address}),Object.defineProperty(this.options,"jsonInterface",{set:f=>this._parseAndSetJsonInterface(f,d),get:()=>this._jsonInterface})}get events(){return this._events}get methods(){return this._methods}clone(){let t;return this.options.address?t=new M([...this._jsonInterface,...this._errorsInterface],this.options.address,{gas:this.options.gas,gasPrice:this.options.gasPrice,from:this.options.from,input:this.options.input,data:this.options.data,provider:this.currentProvider,syncWithContext:this.syncWithContext,dataInputFill:this._dataInputFill},this.getContextObject()):t=new M([...this._jsonInterface,...this._errorsInterface],{gas:this.options.gas,gasPrice:this.options.gasPrice,from:this.options.from,input:this.options.input,data:this.options.data,provider:this.currentProvider,syncWithContext:this.syncWithContext,dataInputFill:this._dataInputFill},this.getContextObject()),this.context&&t.subscribeToContextEvents(this.context),t}deploy(t){var n,s,c;let o=this._jsonInterface.find(h=>h.type==="constructor");o||(o={type:"constructor",inputs:[],stateMutability:""});const i=p.format({format:"bytes"},(n=t==null?void 0:t.input)!==null&&n!==void 0?n:this.options.input,v.DEFAULT_RETURN_FORMAT),r=p.format({format:"bytes"},(s=t==null?void 0:t.data)!==null&&s!==void 0?s:this.options.data,v.DEFAULT_RETURN_FORMAT);if((!i||i.trim()==="0x")&&(!r||r.trim()==="0x"))throw new E.Web3ContractError("contract creation without any data provided.");const a=(c=t==null?void 0:t.arguments)!==null&&c!==void 0?c:[],e=Object.assign(Object.assign({},this.options),{input:i,data:r}),u=i??r;return{arguments:a,send:h=>{const d=Object.assign({},h);return this._contractMethodDeploySend(o,a,d,e)},estimateGas:(h,d=v.DEFAULT_RETURN_FORMAT)=>m(this,void 0,void 0,function*(){const l=Object.assign({},h);return this._contractMethodEstimateGas({abi:o,params:a,returnFormat:d,options:l,contractOptions:e})}),encodeABI:()=>F.encodeMethodABI(o,a,p.format({format:"bytes"},u,v.DEFAULT_RETURN_FORMAT))}}getPastEvents(t,n,s){var c;return m(this,void 0,void 0,function*(){const o=typeof t=="string"?t:q.ALL_EVENTS,i=typeof t!="string"&&!p.isDataFormat(t)?t:p.isDataFormat(n)?{}:n,r=p.isDataFormat(t)?t:p.isDataFormat(n)?n:s??v.DEFAULT_RETURN_FORMAT,a=o==="allEvents"||o===q.ALL_EVENTS?q.ALL_EVENTS_ABI:this._jsonInterface.find(g=>"name"in g&&g.name===o);if(!a)throw new E.Web3ContractError(`Event ${o} not found.`);const{fromBlock:e,toBlock:u,topics:h,address:d}=F.encodeEventABI(this.options,a,i??{}),f=(yield T.getLogs(this,{fromBlock:e,toBlock:u,topics:h,address:d},r)).map(g=>typeof g=="string"?g:$.decodeEventABI(a,g,this._jsonInterface,r)),_=(c=i==null?void 0:i.filter)!==null&&c!==void 0?c:{},S=Object.keys(_);return S.length>0?f.filter(g=>typeof g=="string"?!0:S.every(A=>{var w;if(Array.isArray(_[A]))return _[A].some(C=>String(g.returnValues[A]).toUpperCase()===String(C).toUpperCase());const y=(w=a.inputs)===null||w===void 0?void 0:w.filter(C=>C.name===A)[0];return y!=null&&y.indexed&&y.type==="string"&&J.keccak256Wrapper(_[A])===String(g.returnValues[A])?!0:String(g.returnValues[A]).toUpperCase()===String(_[A]).toUpperCase()})):f})}_parseAndSetAddress(t,n=v.DEFAULT_RETURN_FORMAT){this._address=t&&K.toChecksumAddress(p.format({format:"address"},t,n))}_parseAndSetJsonInterface(t,n=v.DEFAULT_RETURN_FORMAT){var s,c,o,i,r;this._functions={},this._methods={},this._events={};let a=[];const e=t.filter(h=>h.type!=="error"),u=t.filter(h=>j.isAbiErrorFragment(h));for(const h of e){const d=Object.assign(Object.assign({},h),{signature:""});if(j.isAbiFunctionFragment(d)){const l=j.jsonInterfaceMethodToString(d),f=H.encodeFunctionSignature(l);d.signature=f,d.constant=(c=(s=d.stateMutability==="view")!==null&&s!==void 0?s:d.stateMutability==="pure")!==null&&c!==void 0?c:d.constant,d.payable=(o=d.stateMutability==="payable")!==null&&o!==void 0?o:d.payable,this._overloadedMethodAbis.set(d.name,[...(i=this._overloadedMethodAbis.get(d.name))!==null&&i!==void 0?i:[],d]);const _=(r=this._overloadedMethodAbis.get(d.name))!==null&&r!==void 0?r:[],S=this._createContractMethod(_,u);this._functions[l]={signature:f,method:S},this._methods[d.name]=this._functions[l].method,this._methods[l]=this._functions[l].method,this._methods[f]=this._functions[l].method}else if(j.isAbiEventFragment(d)){const l=j.jsonInterfaceMethodToString(d),f=k.encodeEventSignature(l),_=this._createContractEvent(d,n);d.signature=f,(!(l in this._events)||d.name==="bound")&&(this._events[l]=_),this._events[d.name]=_,this._events[f]=_}a=[...a,d]}this._events.allEvents=this._createContractEvent(q.ALL_EVENTS_ABI,n),this._jsonInterface=[...a],this._errorsInterface=u}_getAbiParams(t,n){var s;try{return V.transformJsonDataToAbiFormat((s=t.inputs)!==null&&s!==void 0?s:[],n)}catch(c){throw new E.Web3ContractError(`Invalid parameters for method ${t.name}: ${c.message}`)}}_createContractMethod(t,n){const s=t[t.length-1];return(...c)=>{var o,i;let r;const a=(o=this._overloadedMethodAbis.get(s.name))!==null&&o!==void 0?o:[];let e=a[0];const u=n,h=a.filter(l=>{var f;return((f=l.inputs)!==null&&f!==void 0?f:[]).length===c.length});if(a.length===1||h.length===0)r=this._getAbiParams(e,c),U.validator.validate((i=s.inputs)!==null&&i!==void 0?i:[],r);else{const l=[];for(const f of h)try{r=this._getAbiParams(f,c),U.validator.validate(f.inputs,r),e=f;break}catch(_){l.push(_)}if(l.length===h.length)throw new G.Web3ValidatorError(l)}const d={arguments:r,call:(l,f)=>m(this,void 0,void 0,function*(){return this._contractMethodCall(e,r,u,l,f)}),send:l=>this._contractMethodSend(e,r,u,l),estimateGas:(l,f=v.DEFAULT_RETURN_FORMAT)=>m(this,void 0,void 0,function*(){return this._contractMethodEstimateGas({abi:e,params:r,returnFormat:f,options:l})}),encodeABI:()=>F.encodeMethodABI(e,r),createAccessList:(l,f)=>m(this,void 0,void 0,function*(){return this._contractMethodCreateAccessList(e,r,u,l,f)})};return e.stateMutability==="payable",d}}_contractMethodCall(t,n,s,c,o){var i;return m(this,void 0,void 0,function*(){const r=b.getEthTxCallParams({abi:t,params:n,options:Object.assign(Object.assign({},c),{dataInputFill:this._dataInputFill}),contractOptions:Object.assign(Object.assign({},this.options),{from:(i=this.options.from)!==null&&i!==void 0?i:this.config.defaultAccount})});try{const a=yield T.call(this,r,o,v.DEFAULT_RETURN_FORMAT);return F.decodeMethodReturn(t,a)}catch(a){throw a instanceof E.ContractExecutionError&&D.decodeContractErrorData(s,a.innerError),a}})}_contractMethodCreateAccessList(t,n,s,c,o){var i;return m(this,void 0,void 0,function*(){const r=b.getCreateAccessListParams({abi:t,params:n,options:Object.assign(Object.assign({},c),{dataInputFill:this.config.contractDataInputFill}),contractOptions:Object.assign(Object.assign({},this.options),{from:(i=this.options.from)!==null&&i!==void 0?i:this.config.defaultAccount})});try{return T.createAccessList(this,r,o,v.DEFAULT_RETURN_FORMAT)}catch(a){throw a instanceof E.ContractExecutionError&&D.decodeContractErrorData(s,a.innerError),a}})}_contractMethodSend(t,n,s,c,o){var i,r;let a=o??this.options;a=Object.assign(Object.assign({},a),{input:void 0,from:(r=(i=a.from)!==null&&i!==void 0?i:this.defaultAccount)!==null&&r!==void 0?r:void 0});const e=b.getSendTxParams({abi:t,params:n,options:Object.assign(Object.assign({},c),{dataInputFill:this.config.contractDataInputFill}),contractOptions:a}),u=T.sendTransaction(this,e,v.DEFAULT_RETURN_FORMAT,{checkRevertBeforeSending:!1,contractAbi:this._jsonInterface});return u.on("error",h=>{h instanceof E.ContractExecutionError&&D.decodeContractErrorData(s,h.innerError)}),u}_contractMethodDeploySend(t,n,s,c){var o,i;let r=c??this.options;r=Object.assign(Object.assign({},r),{from:(i=(o=r.from)!==null&&o!==void 0?o:this.defaultAccount)!==null&&i!==void 0?i:void 0});const a=b.getSendTxParams({abi:t,params:n,options:Object.assign(Object.assign({},s),{dataInputFill:this.config.contractDataInputFill}),contractOptions:r});return T.sendTransaction(this,a,v.DEFAULT_RETURN_FORMAT,{transactionResolver:e=>{if(e.status===BigInt(0))throw new E.Web3ContractError("code couldn't be stored",e);const u=this.clone();return u.options.address=e.contractAddress,u},contractAbi:this._jsonInterface,checkRevertBeforeSending:!1})}_contractMethodEstimateGas({abi:t,params:n,returnFormat:s,options:c,contractOptions:o}){return m(this,void 0,void 0,function*(){const i=b.getEstimateGasParams({abi:t,params:n,options:Object.assign(Object.assign({},c),{dataInputFill:this.config.contractDataInputFill}),contractOptions:o??this.options});return T.estimateGas(this,i,B.BlockTags.LATEST,s)})}_createContractEvent(t,n=v.DEFAULT_RETURN_FORMAT){return(...s)=>{var c;const{topics:o,fromBlock:i}=F.encodeEventABI(this.options,t,s[0]),r=new P.LogsSubscription({address:this.options.address,topics:o,abi:t,jsonInterface:this._jsonInterface},{subscriptionManager:this.subscriptionManager,returnFormat:n});return I.isNullish(i)||this.getPastEvents(t.name,{fromBlock:i,topics:o},n).then(a=>{a.forEach(e=>r.emit("data",e))}).catch(a=>{r.emit("error",new R.SubscriptionError("Failed to get past events.",a))}),(c=this.subscriptionManager)===null||c===void 0||c.addSubscription(r).catch(a=>{r.emit("error",new R.SubscriptionError("Failed to subscribe.",a))}),r}}subscribeToContextEvents(t){const n=this;this.context=t,n.syncWithContext&&t.on(W.Web3ConfigEvent.CONFIG_CHANGE,s=>{n.setConfig({[s.name]:s.newValue})})}}exports.Contract=M;
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const R=require("../../../web3-core/lib/esm/web3_config.cjs");require("../../../web3-core/lib/esm/web3_request_manager.cjs");require("../../../web3-core/lib/esm/web3_subscription_manager.cjs");require("../../../web3-core/lib/esm/web3_subscriptions.cjs");const D=require("../../../web3-core/lib/esm/web3_context.cjs");require("../../../web3-core/lib/esm/web3_batch_request.cjs");const v=require("../../../web3-types/lib/esm/data_format_types.cjs"),G=require("../../../web3-types/lib/esm/eth_types.cjs");require("../../../web3-types/lib/esm/web3_base_provider.cjs");const A=require("../../../web3-errors/lib/esm/errors/contract_errors.cjs"),N=require("../../../web3-errors/lib/esm/errors/provider_errors.cjs");require("../../../web3-errors/lib/esm/errors/rpc_errors.cjs");require("../../../web3-eth-iban/lib/esm/iban.cjs");const V=require("../../../web3-validator/lib/esm/errors.cjs");require("../../../web3-validator/lib/esm/formats.cjs");const H=require("../../../web3-validator/lib/esm/utils.cjs"),U=require("../../../web3-validator/lib/esm/default_validator.cjs"),I=require("../../../web3-validator/lib/esm/validation/object.cjs");require("../../../web3-core/lib/esm/web3_promi_event.cjs");require("../../../setimmediate/setImmediate.cjs");require("../../../web3-eth/lib/esm/web3_eth.cjs");const $=require("../../../web3-eth/lib/esm/utils/decoding.cjs");require("../../../web3-eth/lib/esm/schemas.cjs");const w=require("../../../web3-eth/lib/esm/constants.cjs"),T=require("../../../web3-eth/lib/esm/rpc_method_wrappers.cjs");require("../../../web3-eth/lib/esm/utils/prepare_transaction_for_signing.cjs");const P=require("../../../web3-eth/lib/esm/web3_subscriptions.cjs");require("../../../web3-eth/lib/esm/utils/transaction_builder.cjs");const j=require("../../../web3-eth-abi/lib/esm/utils.cjs"),k=require("../../../web3-eth-abi/lib/esm/api/events_api.cjs"),J=require("../../../web3-eth-abi/lib/esm/api/functions_api.cjs");require("../../../web3-eth-abi/lib/esm/coders/base/number.cjs");const L=require("../../../web3-eth-abi/lib/esm/decode_contract_error_data.cjs"),F=require("./encoding.cjs"),x=require("./log_subscription.cjs"),m=require("./utils.cjs"),b=require("../../../web3-utils/lib/esm/formatter.cjs"),W=require("../../../web3-utils/lib/esm/validation.cjs"),O=require("../../../web3-utils/lib/esm/hash.cjs"),K=require("../../../web3-utils/lib/esm/converters.cjs");var E=globalThis&&globalThis.__awaiter||function(B,t,n,s){function c(o){return o instanceof n?o:new n(function(i){i(o)})}return new(n||(n=Promise))(function(o,i){function r(d){try{e(s.next(d))}catch(h){i(h)}}function a(d){try{e(s.throw(d))}catch(h){i(h)}}function e(d){d.done?o(d.value):c(d.value).then(r,a)}e((s=s.apply(B,t||[])).next())})};const z={logs:x.LogsSubscription,newHeads:P.NewHeadsSubscription,newBlockHeaders:P.NewHeadsSubscription};class M extends D.Web3Context{constructor(t,n,s,c,o){var i,r,a;const e=W.isContractInitOptions(n)?n:W.isContractInitOptions(s)?s:void 0;let d;m.isWeb3ContractContext(n)?d=n:m.isWeb3ContractContext(s)?d=s:d=c;let h;if(typeof n=="object"&&"provider"in n?h=n.provider:typeof s=="object"&&"provider"in s?h=s.provider:typeof c=="object"&&"provider"in c?h=c.provider:h=M.givenProvider,super(Object.assign(Object.assign({},d),{provider:h,registeredSubscriptions:z})),this.syncWithContext=!1,this._functions={},d!=null&&d.wallet&&(this._wallet=d.wallet),d!=null&&d.accountProvider&&(this._accountProvider=d.accountProvider),!I.isNullish(e)&&!I.isNullish(e.data)&&!I.isNullish(e.input)&&this.config.contractDataInputFill!=="both")throw new A.ContractTransactionDataAndInputError({data:e.data,input:e.input});this._overloadedMethodAbis=new Map;const u=b.isDataFormat(c)?c:b.isDataFormat(s)?s:o??v.DEFAULT_RETURN_FORMAT,l=typeof n=="string"?n:void 0;this.config.contractDataInputFill=(i=e==null?void 0:e.dataInputFill)!==null&&i!==void 0?i:this.config.contractDataInputFill,this._parseAndSetJsonInterface(t,u),I.isNullish(l)||this._parseAndSetAddress(l,u),this.options={address:l,jsonInterface:this._jsonInterface,gas:(r=e==null?void 0:e.gas)!==null&&r!==void 0?r:e==null?void 0:e.gasLimit,gasPrice:e==null?void 0:e.gasPrice,from:e==null?void 0:e.from,input:e==null?void 0:e.input,data:e==null?void 0:e.data},this.syncWithContext=(a=e==null?void 0:e.syncWithContext)!==null&&a!==void 0?a:!1,d instanceof D.Web3Context&&this.subscribeToContextEvents(d),Object.defineProperty(this.options,"address",{set:f=>this._parseAndSetAddress(f,u),get:()=>this._address}),Object.defineProperty(this.options,"jsonInterface",{set:f=>this._parseAndSetJsonInterface(f,u),get:()=>this._jsonInterface}),d instanceof D.Web3Context&&d.on(R.Web3ConfigEvent.CONFIG_CHANGE,f=>{this.setConfig({[f.name]:f.newValue})})}get events(){return this._events}get methods(){return this._methods}clone(){let t;return this.options.address?t=new M([...this._jsonInterface,...this._errorsInterface],this.options.address,{gas:this.options.gas,gasPrice:this.options.gasPrice,from:this.options.from,input:this.options.input,data:this.options.data,provider:this.currentProvider,syncWithContext:this.syncWithContext,dataInputFill:this.config.contractDataInputFill},this.getContextObject()):t=new M([...this._jsonInterface,...this._errorsInterface],{gas:this.options.gas,gasPrice:this.options.gasPrice,from:this.options.from,input:this.options.input,data:this.options.data,provider:this.currentProvider,syncWithContext:this.syncWithContext,dataInputFill:this.config.contractDataInputFill},this.getContextObject()),this.context&&t.subscribeToContextEvents(this.context),t}deploy(t){var n,s,c;let o=this._jsonInterface.find(h=>h.type==="constructor");o||(o={type:"constructor",stateMutability:""});const i=b.format({format:"bytes"},(n=t==null?void 0:t.input)!==null&&n!==void 0?n:this.options.input,v.DEFAULT_RETURN_FORMAT),r=b.format({format:"bytes"},(s=t==null?void 0:t.data)!==null&&s!==void 0?s:this.options.data,v.DEFAULT_RETURN_FORMAT);if((!i||i.trim()==="0x")&&(!r||r.trim()==="0x"))throw new A.Web3ContractError("contract creation without any data provided.");const a=(c=t==null?void 0:t.arguments)!==null&&c!==void 0?c:[],e=Object.assign(Object.assign({},this.options),{input:i,data:r}),d=i??r;return{arguments:a,send:h=>{const u=Object.assign({},h);return this._contractMethodDeploySend(o,a,u,e)},estimateGas:(h,u=v.DEFAULT_RETURN_FORMAT)=>E(this,void 0,void 0,function*(){const l=Object.assign({},h);return this._contractMethodEstimateGas({abi:o,params:a,returnFormat:u,options:l,contractOptions:e})}),encodeABI:()=>F.encodeMethodABI(o,a,b.format({format:"bytes"},d,v.DEFAULT_RETURN_FORMAT))}}getPastEvents(t,n,s){var c;return E(this,void 0,void 0,function*(){const o=typeof t=="string"?t:w.ALL_EVENTS,i=typeof t!="string"&&!b.isDataFormat(t)?t:b.isDataFormat(n)?{}:n,r=b.isDataFormat(t)?t:b.isDataFormat(n)?n:s??v.DEFAULT_RETURN_FORMAT,a=o==="allEvents"||o===w.ALL_EVENTS?w.ALL_EVENTS_ABI:this._jsonInterface.find(g=>"name"in g&&g.name===o);if(!a)throw new A.Web3ContractError(`Event ${o} not found.`);const{fromBlock:e,toBlock:d,topics:h,address:u}=F.encodeEventABI(this.options,a,i??{}),l=yield T.getLogs(this,{fromBlock:e,toBlock:d,topics:h,address:u},r),f=l?l.map(g=>typeof g=="string"?g:$.decodeEventABI(a,g,this._jsonInterface,r)):[],_=(c=i==null?void 0:i.filter)!==null&&c!==void 0?c:{},C=Object.keys(_);return C.length>0?f.filter(g=>typeof g=="string"?!0:C.every(p=>{var q;if(Array.isArray(_[p]))return _[p].some(y=>String(g.returnValues[p]).toUpperCase()===String(y).toUpperCase());const S=(q=a.inputs)===null||q===void 0?void 0:q.filter(y=>y.name===p)[0];return S!=null&&S.indexed&&S.type==="string"&&O.keccak256Wrapper(_[p])===String(g.returnValues[p])?!0:String(g.returnValues[p]).toUpperCase()===String(_[p]).toUpperCase()})):f})}_parseAndSetAddress(t,n=v.DEFAULT_RETURN_FORMAT){this._address=t&&K.toChecksumAddress(b.format({format:"address"},t,n))}_parseAndSetJsonInterface(t,n=v.DEFAULT_RETURN_FORMAT){var s,c,o,i,r;this._functions={},this._methods={},this._events={};let a=[];const e=t.filter(h=>h.type!=="error"),d=t.filter(h=>j.isAbiErrorFragment(h));for(const h of e){const u=Object.assign(Object.assign({},h),{signature:""});if(j.isAbiFunctionFragment(u)){const l=j.jsonInterfaceMethodToString(u),f=J.encodeFunctionSignature(l);u.signature=f,u.constant=(c=(s=u.stateMutability==="view")!==null&&s!==void 0?s:u.stateMutability==="pure")!==null&&c!==void 0?c:u.constant,u.payable=(o=u.stateMutability==="payable")!==null&&o!==void 0?o:u.payable,this._overloadedMethodAbis.set(u.name,[...(i=this._overloadedMethodAbis.get(u.name))!==null&&i!==void 0?i:[],u]);const _=(r=this._overloadedMethodAbis.get(u.name))!==null&&r!==void 0?r:[],C=this._createContractMethod(_,d);this._functions[l]={signature:f,method:C},this._methods[u.name]=this._functions[l].method,this._methods[l]=this._functions[l].method,this._methods[f]=this._functions[l].method}else if(j.isAbiEventFragment(u)){const l=j.jsonInterfaceMethodToString(u),f=k.encodeEventSignature(l),_=this._createContractEvent(u,n);u.signature=f,(!(l in this._events)||u.name==="bound")&&(this._events[l]=_),this._events[u.name]=_,this._events[f]=_}a=[...a,u]}this._events.allEvents=this._createContractEvent(w.ALL_EVENTS_ABI,n),this._jsonInterface=[...a],this._errorsInterface=d}_getAbiParams(t,n){var s;try{return H.transformJsonDataToAbiFormat((s=t.inputs)!==null&&s!==void 0?s:[],n)}catch(c){throw new A.Web3ContractError(`Invalid parameters for method ${t.name}: ${c.message}`)}}_createContractMethod(t,n){const s=t[t.length-1];return(...c)=>{var o,i;let r;const a=(o=this._overloadedMethodAbis.get(s.name))!==null&&o!==void 0?o:[];let e=a[0];const d=n,h=a.filter(l=>{var f;return((f=l.inputs)!==null&&f!==void 0?f:[]).length===c.length});if(a.length===1||h.length===0)r=this._getAbiParams(e,c),U.validator.validate((i=s.inputs)!==null&&i!==void 0?i:[],r);else{const l=[];for(const f of h)try{r=this._getAbiParams(f,c),U.validator.validate(f.inputs,r),e=f;break}catch(_){l.push(_)}if(l.length===h.length)throw new V.Web3ValidatorError(l)}const u={arguments:r,call:(l,f)=>E(this,void 0,void 0,function*(){return this._contractMethodCall(e,r,d,l,f)}),send:l=>this._contractMethodSend(e,r,d,l),estimateGas:(l,f=v.DEFAULT_RETURN_FORMAT)=>E(this,void 0,void 0,function*(){return this._contractMethodEstimateGas({abi:e,params:r,returnFormat:f,options:l})}),encodeABI:()=>F.encodeMethodABI(e,r),createAccessList:(l,f)=>E(this,void 0,void 0,function*(){return this._contractMethodCreateAccessList(e,r,d,l,f)})};return e.stateMutability==="payable",u}}_contractMethodCall(t,n,s,c,o){var i;return E(this,void 0,void 0,function*(){const r=m.getEthTxCallParams({abi:t,params:n,options:Object.assign(Object.assign({},c),{dataInputFill:this.config.contractDataInputFill}),contractOptions:Object.assign(Object.assign({},this.options),{from:(i=this.options.from)!==null&&i!==void 0?i:this.config.defaultAccount})});try{const a=yield T.call(this,r,o,v.DEFAULT_RETURN_FORMAT);return F.decodeMethodReturn(t,a)}catch(a){throw a instanceof A.ContractExecutionError&&L.decodeContractErrorData(s,a.cause),a}})}_contractMethodCreateAccessList(t,n,s,c,o){var i;return E(this,void 0,void 0,function*(){const r=m.getCreateAccessListParams({abi:t,params:n,options:Object.assign(Object.assign({},c),{dataInputFill:this.config.contractDataInputFill}),contractOptions:Object.assign(Object.assign({},this.options),{from:(i=this.options.from)!==null&&i!==void 0?i:this.config.defaultAccount})});try{return T.createAccessList(this,r,o,v.DEFAULT_RETURN_FORMAT)}catch(a){throw a instanceof A.ContractExecutionError&&L.decodeContractErrorData(s,a.cause),a}})}_contractMethodSend(t,n,s,c,o){var i,r;let a=o??this.options;a=Object.assign(Object.assign({},a),{input:void 0,from:(r=(i=a.from)!==null&&i!==void 0?i:this.defaultAccount)!==null&&r!==void 0?r:void 0});const e=m.getSendTxParams({abi:t,params:n,options:Object.assign(Object.assign({},c),{dataInputFill:this.config.contractDataInputFill}),contractOptions:a}),d=T.sendTransaction(this,e,v.DEFAULT_RETURN_FORMAT,{checkRevertBeforeSending:!1,contractAbi:this._jsonInterface});return d.on("error",h=>{h instanceof A.ContractExecutionError&&L.decodeContractErrorData(s,h.cause)}),d}_contractMethodDeploySend(t,n,s,c){var o,i;let r=c??this.options;r=Object.assign(Object.assign({},r),{from:(i=(o=r.from)!==null&&o!==void 0?o:this.defaultAccount)!==null&&i!==void 0?i:void 0});const a=m.getSendTxParams({abi:t,params:n,options:Object.assign(Object.assign({},s),{dataInputFill:this.config.contractDataInputFill}),contractOptions:r});return T.sendTransaction(this,a,v.DEFAULT_RETURN_FORMAT,{transactionResolver:e=>{if(e.status===BigInt(0))throw new A.Web3ContractError("code couldn't be stored",e);const d=this.clone();return d.options.address=e.contractAddress,d},contractAbi:this._jsonInterface,checkRevertBeforeSending:!1})}_contractMethodEstimateGas({abi:t,params:n,returnFormat:s,options:c,contractOptions:o}){return E(this,void 0,void 0,function*(){const i=m.getEstimateGasParams({abi:t,params:n,options:Object.assign(Object.assign({},c),{dataInputFill:this.config.contractDataInputFill}),contractOptions:o??this.options});return T.estimateGas(this,i,G.BlockTags.LATEST,s)})}_createContractEvent(t,n=v.DEFAULT_RETURN_FORMAT){return(...s)=>{var c;const{topics:o,fromBlock:i}=F.encodeEventABI(this.options,t,s[0]),r=new x.LogsSubscription({address:this.options.address,topics:o,abi:t,jsonInterface:this._jsonInterface},{subscriptionManager:this.subscriptionManager,returnFormat:n});return I.isNullish(i)||this.getPastEvents(t.name,{fromBlock:i,topics:o},n).then(a=>{a&&a.forEach(e=>r.emit("data",e))}).catch(a=>{r.emit("error",new N.SubscriptionError("Failed to get past events.",a))}),(c=this.subscriptionManager)===null||c===void 0||c.addSubscription(r).catch(a=>{r.emit("error",new N.SubscriptionError("Failed to subscribe.",a))}),r}}subscribeToContextEvents(t){const n=this;this.context=t,n.syncWithContext&&t.on(R.Web3ConfigEvent.CONFIG_CHANGE,s=>{n.setConfig({[s.name]:s.newValue})})}}exports.Contract=M;
|
@@ -1,89 +1,90 @@
|
|
1
|
-
import { Web3ConfigEvent as
|
1
|
+
import { Web3ConfigEvent as D } 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 C } 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
|
7
|
+
import { DEFAULT_RETURN_FORMAT as v } from "../../../web3-types/lib/esm/data_format_types.js";
|
8
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
|
11
|
-
import { SubscriptionError as
|
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";
|
12
12
|
import "../../../web3-errors/lib/esm/errors/rpc_errors.js";
|
13
13
|
import "../../../web3-eth-iban/lib/esm/iban.js";
|
14
14
|
import { Web3ValidatorError as Q } from "../../../web3-validator/lib/esm/errors.js";
|
15
15
|
import "../../../web3-validator/lib/esm/formats.js";
|
16
16
|
import { transformJsonDataToAbiFormat as X } from "../../../web3-validator/lib/esm/utils.js";
|
17
|
-
import { validator as
|
18
|
-
import { isNullish as
|
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";
|
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
22
|
import { decodeEventABI as Y } 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 Z, call as R, createAccessList as O, sendTransaction as
|
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";
|
26
26
|
import "../../../web3-eth/lib/esm/utils/prepare_transaction_for_signing.js";
|
27
|
-
import { NewHeadsSubscription as
|
27
|
+
import { NewHeadsSubscription as N } 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
|
29
|
+
import { isAbiErrorFragment as it, isAbiFunctionFragment as nt, jsonInterfaceMethodToString as G, isAbiEventFragment as et } from "../../../web3-eth-abi/lib/esm/utils.js";
|
30
30
|
import { encodeEventSignature as ot } from "../../../web3-eth-abi/lib/esm/api/events_api.js";
|
31
31
|
import { encodeFunctionSignature as st } from "../../../web3-eth-abi/lib/esm/api/functions_api.js";
|
32
32
|
import "../../../web3-eth-abi/lib/esm/coders/base/number.js";
|
33
33
|
import { decodeContractErrorData as T } from "../../../web3-eth-abi/lib/esm/decode_contract_error_data.js";
|
34
|
-
import { encodeMethodABI as
|
35
|
-
import { LogsSubscription as
|
36
|
-
import { getEthTxCallParams as at, getCreateAccessListParams as ct, getSendTxParams as
|
37
|
-
import { format as
|
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";
|
38
39
|
import { keccak256Wrapper as lt } from "../../../web3-utils/lib/esm/hash.js";
|
39
40
|
import { toChecksumAddress as ht } from "../../../web3-utils/lib/esm/converters.js";
|
40
|
-
var b = globalThis && globalThis.__awaiter || function(
|
41
|
+
var b = globalThis && globalThis.__awaiter || function(K, t, e, o) {
|
41
42
|
function c(s) {
|
42
43
|
return s instanceof e ? s : new e(function(n) {
|
43
44
|
n(s);
|
44
45
|
});
|
45
46
|
}
|
46
47
|
return new (e || (e = Promise))(function(s, n) {
|
47
|
-
function r(
|
48
|
+
function r(d) {
|
48
49
|
try {
|
49
|
-
i(o.next(
|
50
|
+
i(o.next(d));
|
50
51
|
} catch (u) {
|
51
52
|
n(u);
|
52
53
|
}
|
53
54
|
}
|
54
|
-
function a(
|
55
|
+
function a(d) {
|
55
56
|
try {
|
56
|
-
i(o.throw(
|
57
|
+
i(o.throw(d));
|
57
58
|
} catch (u) {
|
58
59
|
n(u);
|
59
60
|
}
|
60
61
|
}
|
61
|
-
function i(
|
62
|
-
|
62
|
+
function i(d) {
|
63
|
+
d.done ? s(d.value) : c(d.value).then(r, a);
|
63
64
|
}
|
64
|
-
i((o = o.apply(
|
65
|
+
i((o = o.apply(K, t || [])).next());
|
65
66
|
});
|
66
67
|
};
|
67
68
|
const ut = {
|
68
|
-
logs:
|
69
|
-
newHeads:
|
70
|
-
newBlockHeaders:
|
69
|
+
logs: $,
|
70
|
+
newHeads: N,
|
71
|
+
newBlockHeaders: N
|
71
72
|
};
|
72
|
-
class
|
73
|
+
class S extends C {
|
73
74
|
constructor(t, e, o, c, s) {
|
74
75
|
var n, r, a;
|
75
|
-
const i =
|
76
|
-
let
|
77
|
-
|
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;
|
78
79
|
let u;
|
79
|
-
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 =
|
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")
|
80
81
|
throw new z({
|
81
82
|
data: i.data,
|
82
83
|
input: i.input
|
83
84
|
});
|
84
85
|
this._overloadedMethodAbis = /* @__PURE__ */ new Map();
|
85
|
-
const
|
86
|
-
this.config.contractDataInputFill
|
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 = {
|
87
88
|
address: h,
|
88
89
|
jsonInterface: this._jsonInterface,
|
89
90
|
gas: (r = i == null ? void 0 : i.gas) !== null && r !== void 0 ? r : i == null ? void 0 : i.gasLimit,
|
@@ -91,12 +92,14 @@ class w extends F {
|
|
91
92
|
from: i == null ? void 0 : i.from,
|
92
93
|
input: i == null ? void 0 : i.input,
|
93
94
|
data: i == null ? void 0 : i.data
|
94
|
-
}, this.syncWithContext = (a = i == null ? void 0 : i.syncWithContext) !== null && a !== void 0 ? a : !1,
|
95
|
-
set: (f) => this._parseAndSetAddress(f,
|
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),
|
96
97
|
get: () => this._address
|
97
98
|
}), Object.defineProperty(this.options, "jsonInterface", {
|
98
|
-
set: (f) => this._parseAndSetJsonInterface(f,
|
99
|
+
set: (f) => this._parseAndSetJsonInterface(f, l),
|
99
100
|
get: () => this._jsonInterface
|
101
|
+
}), d instanceof C && d.on(D.CONFIG_CHANGE, (f) => {
|
102
|
+
this.setConfig({ [f.name]: f.newValue });
|
100
103
|
});
|
101
104
|
}
|
102
105
|
/**
|
@@ -153,7 +156,7 @@ class w extends F {
|
|
153
156
|
* });
|
154
157
|
* ```
|
155
158
|
*
|
156
|
-
* @returns - Either returns {@link PayableMethodObject} or {@link NonPayableMethodObject} based on the definitions of the
|
159
|
+
* @returns - Either returns {@link PayableMethodObject} or {@link NonPayableMethodObject} based on the definitions of the ABI of that contract.
|
157
160
|
*/
|
158
161
|
get methods() {
|
159
162
|
return this._methods;
|
@@ -164,10 +167,10 @@ class w extends F {
|
|
164
167
|
* @returns - The new contract instance.
|
165
168
|
*
|
166
169
|
* ```ts
|
167
|
-
* const contract1 = new eth.Contract(abi, address, {gasPrice: '12345678', from: fromAddress});
|
170
|
+
* const contract1 = new web3.eth.Contract(abi, address, {gasPrice: '12345678', from: fromAddress});
|
168
171
|
*
|
169
172
|
* const contract2 = contract1.clone();
|
170
|
-
* contract2.options.address =
|
173
|
+
* contract2.options.address = '0xdAC17F958D2ee523a2206206994597C13D831ec7';
|
171
174
|
*
|
172
175
|
* (contract1.options.address !== contract2.options.address);
|
173
176
|
* > true
|
@@ -175,7 +178,7 @@ class w extends F {
|
|
175
178
|
*/
|
176
179
|
clone() {
|
177
180
|
let t;
|
178
|
-
return this.options.address ? t = new
|
181
|
+
return this.options.address ? t = new S([...this._jsonInterface, ...this._errorsInterface], this.options.address, {
|
179
182
|
gas: this.options.gas,
|
180
183
|
gasPrice: this.options.gasPrice,
|
181
184
|
from: this.options.from,
|
@@ -183,8 +186,8 @@ class w extends F {
|
|
183
186
|
data: this.options.data,
|
184
187
|
provider: this.currentProvider,
|
185
188
|
syncWithContext: this.syncWithContext,
|
186
|
-
dataInputFill: this.
|
187
|
-
}, this.getContextObject()) : t = new
|
189
|
+
dataInputFill: this.config.contractDataInputFill
|
190
|
+
}, this.getContextObject()) : t = new S([...this._jsonInterface, ...this._errorsInterface], {
|
188
191
|
gas: this.options.gas,
|
189
192
|
gasPrice: this.options.gasPrice,
|
190
193
|
from: this.options.from,
|
@@ -192,7 +195,7 @@ class w extends F {
|
|
192
195
|
data: this.options.data,
|
193
196
|
provider: this.currentProvider,
|
194
197
|
syncWithContext: this.syncWithContext,
|
195
|
-
dataInputFill: this.
|
198
|
+
dataInputFill: this.config.contractDataInputFill
|
196
199
|
}, this.getContextObject()), this.context && t.subscribeToContextEvents(this.context), t;
|
197
200
|
}
|
198
201
|
/**
|
@@ -200,7 +203,7 @@ class w extends F {
|
|
200
203
|
*
|
201
204
|
* ```ts
|
202
205
|
* myContract.deploy({
|
203
|
-
* input: '0x12345...', // data keyword can be used, too.
|
206
|
+
* input: '0x12345...', // data keyword can be used, too.
|
204
207
|
* arguments: [123, 'My String']
|
205
208
|
* })
|
206
209
|
* .send({
|
@@ -261,79 +264,78 @@ class w extends F {
|
|
261
264
|
let s = this._jsonInterface.find((u) => u.type === "constructor");
|
262
265
|
s || (s = {
|
263
266
|
type: "constructor",
|
264
|
-
inputs: [],
|
265
267
|
stateMutability: ""
|
266
268
|
});
|
267
|
-
const n =
|
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);
|
268
270
|
if ((!n || n.trim() === "0x") && (!r || r.trim() === "0x"))
|
269
271
|
throw new y("contract creation without any data provided.");
|
270
|
-
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 }),
|
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;
|
271
273
|
return {
|
272
274
|
arguments: a,
|
273
275
|
send: (u) => {
|
274
|
-
const
|
275
|
-
return this._contractMethodDeploySend(s, a,
|
276
|
+
const l = Object.assign({}, u);
|
277
|
+
return this._contractMethodDeploySend(s, a, l, i);
|
276
278
|
},
|
277
|
-
estimateGas: (u,
|
279
|
+
estimateGas: (u, l = v) => b(this, void 0, void 0, function* () {
|
278
280
|
const h = Object.assign({}, u);
|
279
281
|
return this._contractMethodEstimateGas({
|
280
282
|
abi: s,
|
281
283
|
params: a,
|
282
|
-
returnFormat:
|
284
|
+
returnFormat: l,
|
283
285
|
options: h,
|
284
286
|
contractOptions: i
|
285
287
|
});
|
286
288
|
}),
|
287
|
-
encodeABI: () =>
|
289
|
+
encodeABI: () => V(s, a, w({ format: "bytes" }, d, v))
|
288
290
|
};
|
289
291
|
}
|
290
292
|
getPastEvents(t, e, o) {
|
291
293
|
var c;
|
292
294
|
return b(this, void 0, void 0, function* () {
|
293
|
-
const s = typeof t == "string" ? t :
|
295
|
+
const s = typeof t == "string" ? t : x, n = (
|
294
296
|
// eslint-disable-next-line no-nested-ternary
|
295
297
|
typeof t != "string" && !_(t) ? t : _(e) ? {} : e
|
296
|
-
), r = _(t) ? t : _(e) ? e : o ??
|
298
|
+
), r = _(t) ? t : _(e) ? e : o ?? v, a = s === "allEvents" || s === x ? B : this._jsonInterface.find((m) => "name" in m && m.name === s);
|
297
299
|
if (!a)
|
298
300
|
throw new y(`Event ${s} not found.`);
|
299
|
-
const { fromBlock: i, toBlock:
|
300
|
-
return
|
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) => {
|
301
303
|
var M;
|
302
|
-
if (Array.isArray(
|
303
|
-
return
|
304
|
+
if (Array.isArray(p[g]))
|
305
|
+
return p[g].some((E) => String(m.returnValues[g]).toUpperCase() === String(E).toUpperCase());
|
304
306
|
const j = (M = a.inputs) === null || M === void 0 ? void 0 : M.filter((E) => E.name === g)[0];
|
305
|
-
return j != null && j.indexed && j.type === "string" && lt(
|
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();
|
306
308
|
})) : f;
|
307
309
|
});
|
308
310
|
}
|
309
|
-
_parseAndSetAddress(t, e =
|
310
|
-
this._address = t && ht(
|
311
|
+
_parseAndSetAddress(t, e = v) {
|
312
|
+
this._address = t && ht(w({ format: "address" }, t, e));
|
311
313
|
}
|
312
|
-
_parseAndSetJsonInterface(t, e =
|
314
|
+
_parseAndSetJsonInterface(t, e = v) {
|
313
315
|
var o, c, s, n, r;
|
314
316
|
this._functions = {}, this._methods = {}, this._events = {};
|
315
317
|
let a = [];
|
316
|
-
const i = t.filter((u) => u.type !== "error"),
|
318
|
+
const i = t.filter((u) => u.type !== "error"), d = t.filter((u) => it(u));
|
317
319
|
for (const u of i) {
|
318
|
-
const
|
319
|
-
if (nt(
|
320
|
-
const h =
|
321
|
-
|
322
|
-
...(n = this._overloadedMethodAbis.get(
|
323
|
-
|
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
|
324
326
|
]);
|
325
|
-
const
|
327
|
+
const p = (r = this._overloadedMethodAbis.get(l.name)) !== null && r !== void 0 ? r : [], I = this._createContractMethod(p, d);
|
326
328
|
this._functions[h] = {
|
327
329
|
signature: f,
|
328
|
-
method:
|
329
|
-
}, this._methods[
|
330
|
-
} else if (et(
|
331
|
-
const h =
|
332
|
-
|
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;
|
333
335
|
}
|
334
|
-
a = [...a,
|
336
|
+
a = [...a, l];
|
335
337
|
}
|
336
|
-
this._events.allEvents = this._createContractEvent(
|
338
|
+
this._events.allEvents = this._createContractEvent(B, e), this._jsonInterface = [...a], this._errorsInterface = d;
|
337
339
|
}
|
338
340
|
// eslint-disable-next-line class-methods-use-this
|
339
341
|
_getAbiParams(t, e) {
|
@@ -351,31 +353,31 @@ class w extends F {
|
|
351
353
|
let r;
|
352
354
|
const a = (s = this._overloadedMethodAbis.get(o.name)) !== null && s !== void 0 ? s : [];
|
353
355
|
let i = a[0];
|
354
|
-
const
|
356
|
+
const d = e, u = a.filter((h) => {
|
355
357
|
var f;
|
356
358
|
return ((f = h.inputs) !== null && f !== void 0 ? f : []).length === c.length;
|
357
359
|
});
|
358
360
|
if (a.length === 1 || u.length === 0)
|
359
|
-
r = this._getAbiParams(i, c),
|
361
|
+
r = this._getAbiParams(i, c), L.validate((n = o.inputs) !== null && n !== void 0 ? n : [], r);
|
360
362
|
else {
|
361
363
|
const h = [];
|
362
364
|
for (const f of u)
|
363
365
|
try {
|
364
|
-
r = this._getAbiParams(f, c),
|
366
|
+
r = this._getAbiParams(f, c), L.validate(f.inputs, r), i = f;
|
365
367
|
break;
|
366
|
-
} catch (
|
367
|
-
h.push(
|
368
|
+
} catch (p) {
|
369
|
+
h.push(p);
|
368
370
|
}
|
369
371
|
if (h.length === u.length)
|
370
372
|
throw new Q(h);
|
371
373
|
}
|
372
|
-
const
|
374
|
+
const l = {
|
373
375
|
arguments: r,
|
374
376
|
call: (h, f) => b(this, void 0, void 0, function* () {
|
375
|
-
return this._contractMethodCall(i, r,
|
377
|
+
return this._contractMethodCall(i, r, d, h, f);
|
376
378
|
}),
|
377
|
-
send: (h) => this._contractMethodSend(i, r,
|
378
|
-
estimateGas: (h, f =
|
379
|
+
send: (h) => this._contractMethodSend(i, r, d, h),
|
380
|
+
estimateGas: (h, f = v) => b(this, void 0, void 0, function* () {
|
379
381
|
return this._contractMethodEstimateGas({
|
380
382
|
abi: i,
|
381
383
|
params: r,
|
@@ -383,12 +385,12 @@ class w extends F {
|
|
383
385
|
options: h
|
384
386
|
});
|
385
387
|
}),
|
386
|
-
encodeABI: () =>
|
388
|
+
encodeABI: () => V(i, r),
|
387
389
|
createAccessList: (h, f) => b(this, void 0, void 0, function* () {
|
388
|
-
return this._contractMethodCreateAccessList(i, r,
|
390
|
+
return this._contractMethodCreateAccessList(i, r, d, h, f);
|
389
391
|
})
|
390
392
|
};
|
391
|
-
return i.stateMutability === "payable",
|
393
|
+
return i.stateMutability === "payable", l;
|
392
394
|
};
|
393
395
|
}
|
394
396
|
_contractMethodCall(t, e, o, c, s) {
|
@@ -397,14 +399,14 @@ class w extends F {
|
|
397
399
|
const r = at({
|
398
400
|
abi: t,
|
399
401
|
params: e,
|
400
|
-
options: Object.assign(Object.assign({}, c), { dataInputFill: this.
|
402
|
+
options: Object.assign(Object.assign({}, c), { dataInputFill: this.config.contractDataInputFill }),
|
401
403
|
contractOptions: Object.assign(Object.assign({}, this.options), { from: (n = this.options.from) !== null && n !== void 0 ? n : this.config.defaultAccount })
|
402
404
|
});
|
403
405
|
try {
|
404
|
-
const a = yield R(this, r, s,
|
406
|
+
const a = yield R(this, r, s, v);
|
405
407
|
return rt(t, a);
|
406
408
|
} catch (a) {
|
407
|
-
throw a instanceof
|
409
|
+
throw a instanceof P && T(o, a.cause), a;
|
408
410
|
}
|
409
411
|
});
|
410
412
|
}
|
@@ -418,9 +420,9 @@ class w extends F {
|
|
418
420
|
contractOptions: Object.assign(Object.assign({}, this.options), { from: (n = this.options.from) !== null && n !== void 0 ? n : this.config.defaultAccount })
|
419
421
|
});
|
420
422
|
try {
|
421
|
-
return O(this, r, s,
|
423
|
+
return O(this, r, s, v);
|
422
424
|
} catch (a) {
|
423
|
-
throw a instanceof
|
425
|
+
throw a instanceof P && T(o, a.cause), a;
|
424
426
|
}
|
425
427
|
});
|
426
428
|
}
|
@@ -428,36 +430,36 @@ class w extends F {
|
|
428
430
|
var n, r;
|
429
431
|
let a = s ?? this.options;
|
430
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 });
|
431
|
-
const i =
|
433
|
+
const i = H({
|
432
434
|
abi: t,
|
433
435
|
params: e,
|
434
436
|
options: Object.assign(Object.assign({}, c), { dataInputFill: this.config.contractDataInputFill }),
|
435
437
|
contractOptions: a
|
436
|
-
}),
|
438
|
+
}), d = W(this, i, v, {
|
437
439
|
// TODO Should make this configurable by the user
|
438
440
|
checkRevertBeforeSending: !1,
|
439
441
|
contractAbi: this._jsonInterface
|
440
442
|
});
|
441
|
-
return
|
442
|
-
u instanceof
|
443
|
-
}),
|
443
|
+
return d.on("error", (u) => {
|
444
|
+
u instanceof P && T(o, u.cause);
|
445
|
+
}), d;
|
444
446
|
}
|
445
447
|
_contractMethodDeploySend(t, e, o, c) {
|
446
448
|
var s, n;
|
447
449
|
let r = c ?? this.options;
|
448
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 });
|
449
|
-
const a =
|
451
|
+
const a = H({
|
450
452
|
abi: t,
|
451
453
|
params: e,
|
452
454
|
options: Object.assign(Object.assign({}, o), { dataInputFill: this.config.contractDataInputFill }),
|
453
455
|
contractOptions: r
|
454
456
|
});
|
455
|
-
return
|
457
|
+
return W(this, a, v, {
|
456
458
|
transactionResolver: (i) => {
|
457
459
|
if (i.status === BigInt(0))
|
458
460
|
throw new y("code couldn't be stored", i);
|
459
|
-
const
|
460
|
-
return
|
461
|
+
const d = this.clone();
|
462
|
+
return d.options.address = i.contractAddress, d;
|
461
463
|
},
|
462
464
|
contractAbi: this._jsonInterface,
|
463
465
|
// TODO Should make this configurable by the user
|
@@ -476,10 +478,10 @@ class w extends F {
|
|
476
478
|
});
|
477
479
|
}
|
478
480
|
// eslint-disable-next-line class-methods-use-this
|
479
|
-
_createContractEvent(t, e =
|
481
|
+
_createContractEvent(t, e = v) {
|
480
482
|
return (...o) => {
|
481
483
|
var c;
|
482
|
-
const { topics: s, fromBlock: n } =
|
484
|
+
const { topics: s, fromBlock: n } = U(this.options, t, o[0]), r = new $({
|
483
485
|
address: this.options.address,
|
484
486
|
topics: s,
|
485
487
|
abi: t,
|
@@ -489,22 +491,22 @@ class w extends F {
|
|
489
491
|
subscriptionManager: this.subscriptionManager,
|
490
492
|
returnFormat: e
|
491
493
|
});
|
492
|
-
return
|
493
|
-
a.forEach((i) => r.emit("data", i));
|
494
|
+
return A(n) || this.getPastEvents(t.name, { fromBlock: n, topics: s }, e).then((a) => {
|
495
|
+
a && a.forEach((i) => r.emit("data", i));
|
494
496
|
}).catch((a) => {
|
495
|
-
r.emit("error", new
|
497
|
+
r.emit("error", new F("Failed to get past events.", a));
|
496
498
|
}), (c = this.subscriptionManager) === null || c === void 0 || c.addSubscription(r).catch((a) => {
|
497
|
-
r.emit("error", new
|
499
|
+
r.emit("error", new F("Failed to subscribe.", a));
|
498
500
|
}), r;
|
499
501
|
};
|
500
502
|
}
|
501
503
|
subscribeToContextEvents(t) {
|
502
504
|
const e = this;
|
503
|
-
this.context = t, e.syncWithContext && t.on(
|
505
|
+
this.context = t, e.syncWithContext && t.on(D.CONFIG_CHANGE, (o) => {
|
504
506
|
e.setConfig({ [o.name]: o.newValue });
|
505
507
|
});
|
506
508
|
}
|
507
509
|
}
|
508
510
|
export {
|
509
|
-
|
511
|
+
S as Contract
|
510
512
|
};
|
@@ -1 +1 @@
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("../../../web3-types/lib/esm/data_format_types.cjs");require("../../../web3-types/lib/esm/eth_types.cjs");require("../../../web3-types/lib/esm/web3_base_provider.cjs");const d=require("../../../web3-errors/lib/esm/errors/contract_errors.cjs");require("../../../web3-errors/lib/esm/errors/rpc_errors.cjs");const
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("../../../web3-types/lib/esm/data_format_types.cjs");require("../../../web3-types/lib/esm/eth_types.cjs");require("../../../web3-types/lib/esm/web3_base_provider.cjs");const d=require("../../../web3-errors/lib/esm/errors/contract_errors.cjs");require("../../../web3-errors/lib/esm/errors/rpc_errors.cjs");const E=require("../../../web3-eth-abi/lib/esm/utils.cjs"),y=require("../../../web3-eth-abi/lib/esm/api/events_api.cjs"),A=require("../../../web3-eth-abi/lib/esm/api/functions_api.cjs"),l=require("../../../web3-eth-abi/lib/esm/api/parameters_api.cjs"),f=require("../../../web3-eth-abi/lib/esm/coders/encode.cjs");require("../../../setimmediate/setImmediate.cjs");require("../../../web3-eth/lib/esm/web3_eth.cjs");const m=require("../../../web3-eth/lib/esm/schemas.cjs"),p=require("../../../web3-eth/lib/esm/constants.cjs");require("../../../web3-validator/lib/esm/formats.cjs");require("../../../web3-validator/lib/esm/default_validator.cjs");require("../../../web3-eth/lib/esm/rpc_method_wrappers.cjs");require("../../../web3-eth/lib/esm/utils/prepare_transaction_for_signing.cjs");require("../../../web3-core/lib/esm/web3_config.cjs");require("../../../web3-core/lib/esm/web3_request_manager.cjs");require("../../../web3-core/lib/esm/web3_subscription_manager.cjs");require("../../../web3-core/lib/esm/web3_subscriptions.cjs");require("../../../web3-core/lib/esm/web3_context.cjs");require("../../../web3-core/lib/esm/web3_batch_request.cjs");require("../../../web3-eth-iban/lib/esm/iban.cjs");require("../../../web3-core/lib/esm/web3_promi_event.cjs");require("../../../web3-eth/lib/esm/utils/transaction_builder.cjs");const h=require("../../../web3-utils/lib/esm/validation.cjs"),q=require("../../../web3-utils/lib/esm/formatter.cjs"),g=require("../../../web3-utils/lib/esm/hash.cjs"),B=({address:t},r,e)=>{var i,o;const a=e==null?void 0:e.topics,v=(i=e==null?void 0:e.filter)!==null&&i!==void 0?i:{},n={};if(h.isNullish(e==null?void 0:e.fromBlock)||(n.fromBlock=q.format(m.blockSchema.properties.number,e==null?void 0:e.fromBlock,{number:c.FMT_NUMBER.HEX,bytes:c.FMT_BYTES.HEX})),h.isNullish(e==null?void 0:e.toBlock)||(n.toBlock=q.format(m.blockSchema.properties.number,e==null?void 0:e.toBlock,{number:c.FMT_NUMBER.HEX,bytes:c.FMT_BYTES.HEX})),a&&Array.isArray(a))n.topics=[...a];else if(n.topics=[],r&&!r.anonymous&&![p.ALL_EVENTS,"allEvents"].includes(r.name)&&n.topics.push((o=r.signature)!==null&&o!==void 0?o:y.encodeEventSignature(E.jsonInterfaceMethodToString(r))),![p.ALL_EVENTS,"allEvents"].includes(r.name)&&r.inputs)for(const u of r.inputs){if(!u.indexed)continue;const s=v[u.name];if(!s){n.topics.push(null);continue}Array.isArray(s)?n.topics.push(s.map(_=>l.encodeParameter(u.type,_))):u.type==="string"?n.topics.push(g.keccak256Wrapper(s)):n.topics.push(l.encodeParameter(u.type,s))}return n.topics.length||delete n.topics,t&&(n.address=t.toLowerCase()),n},T=(t,r,e)=>{const i=Array.isArray(t.inputs)?t.inputs.length:0;if(t.inputs&&i!==r.length)throw new d.Web3ContractError(`The number of arguments is not matching the methods required number. You need to pass ${i} arguments.`);let o;if(t.inputs?o=f.encodeParameters(Array.isArray(t.inputs)?t.inputs:[],r).replace("0x",""):o=f.inferTypesAndEncodeParameters(r).replace("0x",""),E.isAbiConstructorFragment(t)){if(!e)throw new d.Web3ContractError("The contract has no contract data option set. This is necessary to append the constructor parameters.");return e.startsWith("0x")?`${e}${o}`:`0x${e}${o}`}return`${A.encodeFunctionSignature(t)}${o}`},M=(t,r)=>{if(t.type==="constructor")return r;if(!r)return null;const e=r.length>=2?r.slice(2):r;if(!t.outputs)return null;const i=l.decodeParameters([...t.outputs],e);return i.__length__===1?i[0]:i};exports.decodeMethodReturn=M;exports.encodeEventABI=B;exports.encodeMethodABI=T;
|