diff --git a/.dockerignore b/.dockerignore index 1492af168..004d9fc18 100644 --- a/.dockerignore +++ b/.dockerignore @@ -4,6 +4,7 @@ package-lock.json # Node Specific */node_modules/ +node_modules/ # Deployment k8s/ diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index b08ef4b71..f4522daba 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -22,6 +22,13 @@ jobs: - name: Install NodeJS dependencies run: yarn install + - name: Prepare types-cosmos for yarn link + run: yarn link + working-directory: docker/types-cosmos + + - name: Yarn link types-cosmos + run: yarn link @subql/types-cosmos + - name: Lint TypeScript run: yarn lint diff --git a/README.md b/README.md index ec73ee952..d60e0eb75 100644 --- a/README.md +++ b/README.md @@ -7,51 +7,66 @@ This is the Fetch ledger SubQuery project, an indexer for the Fetch network. ## Getting Started -### 1. Ensure submodules are updated +1. **Ensure submodules are updated** -```shell -git submodule update --init --recursive -``` + ```shell + git submodule update --init --recursive + ``` -### 2. Install dependencies +1. Install dependencies -```shell -yarn + ```shell + yarn -# install submodule dependencies -(cd ./subql && yarn) -``` + # install submodule dependencies + (cd ./subql && yarn) + ``` -### 3. Generate types +1. Link local (non-workspace) dependencies -```shell -yarn codegen -``` + ```shell + # register non-workspace package for linking + (cd ./docker/types-cosmos && yarn link) + + # link to repo package (ledger-subquery) + yarn link @subql/types-cosmos + ``` + +1. Generate types -### 4. Build + ```shell + yarn codegen + ``` -```shell -yarn build +1. Build -# build submodule -(cd ./subql && yarn build) -``` + ```shell + yarn build -### 5. Run locally + # build submodule + (cd ./subql && yarn build) + ``` -```shell -yarn start:docker -``` +1. Run locally + + ```shell + yarn start:docker + ``` ## End-to-end Testing -### 1. Install dependencies +### Installing python dependencies ```shell -pipenv install +# ensure pipenv is installed +pip install --user pipenv +# (see: https://pipenv.pypa.io/en/latest/index.html) + +# ensure local dependencies match Pipfile.lock +pipenv sync --dev ``` -### 2. Run e2e tests +### Run e2e tests _Note: end-to-end tests will truncate tables in the DB and interact with the configured fetchd node._ diff --git a/docker-compose.yml b/docker-compose.yml index 15e5b2ea3..20bcee96f 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -38,7 +38,8 @@ services: CHAIN_ID: "fetchchain" volumes: - ./:/app - - ./docker/node-cosmos/package.json:/usr/local/lib/node_modules/@subql/node-cosmos/package.json + - ./docker/node-cosmos:/usr/local/lib/node_modules/@subql/node-cosmos + - ./docker/types-cosmos:/usr/local/lib/node_modules/@subql/node-cosmos/node_modules/@subql/types-cosmos command: - -f=/app - --db-schema=app diff --git a/docker/node-cosmos/dist/indexer/store.service.js b/docker/node-cosmos/dist/indexer/store.service.js index 401f79285..a578a4d51 100644 --- a/docker/node-cosmos/dist/indexer/store.service.js +++ b/docker/node-cosmos/dist/indexer/store.service.js @@ -396,6 +396,9 @@ group by } getStore() { return { + selectRaw: async(query) => { + return this.sequelize.query(query, {raw: true, type: sequelize_1.QueryTypes.SELECT}); + }, get: async (entity, id) => { const model = this.sequelize.model(entity); (0, assert_1.default)(model, `model ${entity} not exists`); diff --git a/docker/node.dockerfile b/docker/node.dockerfile index 1cac3aeaf..b63c93331 100644 --- a/docker/node.dockerfile +++ b/docker/node.dockerfile @@ -10,6 +10,11 @@ RUN yarn install --frozen-lockfile # add the remaining parts of the produce the build COPY . /app + +# NB: replace node-cosmos and types-cosmos packages (not included in subql workspace) +COPY ./docker/node-cosmos /app/node_modules/@subql/node-cosmos +COPY ./docker/types-cosmos /app/node_modules/@subql/types-cosmos + RUN yarn codegen && yarn build # build subql common package @@ -36,8 +41,10 @@ WORKDIR /app ADD ./package.json yarn.lock /app/ RUN yarn install --frozen-lockfile --prod -# NB: replace built node-cosmos run module +# replace node-cosmos and types-cosmos packages (not included in subql workspace) COPY ./docker/node-cosmos /usr/local/lib/node_modules/@subql/node-cosmos +COPY ./docker/types-cosmos /usr/local/lib/node_modules/@subql/node-cosmos/node_modules/@subql/types-cosmos +# replace common package (included in subql workspace) COPY --from=builder /app/subql/packages/common /usr/local/lib/node_modules/@subql/node-cosmos/node_modules/@subql/common COPY --from=builder /app/dist /app/dist diff --git a/docker/types-cosmos/CHANGELOG.md b/docker/types-cosmos/CHANGELOG.md new file mode 100644 index 000000000..1dca65f33 --- /dev/null +++ b/docker/types-cosmos/CHANGELOG.md @@ -0,0 +1,32 @@ +# Changelog +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), +and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). + +All logs must start with the format: [x.y.z] - yyyy-mm-dd + +## [Unreleased] + +## [0.1.1] - 2022-07-01 + +- Inject the types registry into the sandbox (#34) + +### Added + +## [0.1.0] - 2022-06-27 + +### Changed +- Messages and events have changed `message.msg.msg` to `message.msg.decodeMsg.msg`. This is due to lazy loading and will mean you don't need to provide chain types for messages you don't care about (#17) + +## [0.0.6] - 2022-06-21 +### Fixed +- Fix chainTypes not being in deployments + +## [0.0.5] - 2022-06-15 +First release + +[Unreleased]: https://github.com/subquery/subql-cosmos/compare/types/0.1.1...HEAD +[0.1.1]: https://github.com/subquery/subql-cosmos/compare/types/0.1.0...types/0.1.1 +[0.1.0]: https://github.com/subquery/subql-cosmos/compare/types/0.0.6...types/0.1.0 +[0.0.6]: https://github.com/subquery/subql-cosmos/compare/types/0.0.5...types/0.0.6 diff --git a/docker/types-cosmos/LICENSE b/docker/types-cosmos/LICENSE new file mode 100644 index 000000000..261eeb9e9 --- /dev/null +++ b/docker/types-cosmos/LICENSE @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/docker/types-cosmos/dist/.tsbuildinfo b/docker/types-cosmos/dist/.tsbuildinfo new file mode 100644 index 000000000..ff1bed396 --- /dev/null +++ b/docker/types-cosmos/dist/.tsbuildinfo @@ -0,0 +1 @@ +{"program":{"fileNames":["../../../../../../../../usr/local/lib/node_modules/typescript/lib/lib.es5.d.ts","../../../../../../../../usr/local/lib/node_modules/typescript/lib/lib.es2015.d.ts","../../../../../../../../usr/local/lib/node_modules/typescript/lib/lib.es2016.d.ts","../../../../../../../../usr/local/lib/node_modules/typescript/lib/lib.es2017.d.ts","../../../../../../../../usr/local/lib/node_modules/typescript/lib/lib.es2018.d.ts","../../../../../../../../usr/local/lib/node_modules/typescript/lib/lib.es2015.core.d.ts","../../../../../../../../usr/local/lib/node_modules/typescript/lib/lib.es2015.collection.d.ts","../../../../../../../../usr/local/lib/node_modules/typescript/lib/lib.es2015.generator.d.ts","../../../../../../../../usr/local/lib/node_modules/typescript/lib/lib.es2015.iterable.d.ts","../../../../../../../../usr/local/lib/node_modules/typescript/lib/lib.es2015.promise.d.ts","../../../../../../../../usr/local/lib/node_modules/typescript/lib/lib.es2015.proxy.d.ts","../../../../../../../../usr/local/lib/node_modules/typescript/lib/lib.es2015.reflect.d.ts","../../../../../../../../usr/local/lib/node_modules/typescript/lib/lib.es2015.symbol.d.ts","../../../../../../../../usr/local/lib/node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","../../../../../../../../usr/local/lib/node_modules/typescript/lib/lib.es2016.array.include.d.ts","../../../../../../../../usr/local/lib/node_modules/typescript/lib/lib.es2017.object.d.ts","../../../../../../../../usr/local/lib/node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts","../../../../../../../../usr/local/lib/node_modules/typescript/lib/lib.es2017.string.d.ts","../../../../../../../../usr/local/lib/node_modules/typescript/lib/lib.es2017.intl.d.ts","../../../../../../../../usr/local/lib/node_modules/typescript/lib/lib.es2017.typedarrays.d.ts","../../../../../../../../usr/local/lib/node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts","../../../../../../../../usr/local/lib/node_modules/typescript/lib/lib.es2018.asynciterable.d.ts","../../../../../../../../usr/local/lib/node_modules/typescript/lib/lib.es2018.intl.d.ts","../../../../../../../../usr/local/lib/node_modules/typescript/lib/lib.es2018.promise.d.ts","../../../../../../../../usr/local/lib/node_modules/typescript/lib/lib.es2018.regexp.d.ts","../../../../../../../../usr/local/lib/node_modules/typescript/lib/lib.es2020.bigint.d.ts","../../../../../../../../usr/local/lib/node_modules/typescript/lib/lib.es2020.intl.d.ts","../../../../../../../../usr/local/lib/node_modules/typescript/lib/lib.esnext.intl.d.ts","../../../node_modules/@cosmjs/amino/build/pubkeys.d.ts","../../../node_modules/@cosmjs/amino/build/addresses.d.ts","../../../node_modules/@cosmjs/amino/build/coins.d.ts","../../../node_modules/@cosmjs/amino/build/encoding.d.ts","../../../node_modules/@cosmjs/amino/build/multisig.d.ts","../../../node_modules/@cosmjs/crypto/build/bip39.d.ts","../../../node_modules/@cosmjs/crypto/build/hash.d.ts","../../../node_modules/@cosmjs/crypto/build/hmac.d.ts","../../../node_modules/@cosmjs/crypto/build/keccak.d.ts","../../../node_modules/@cosmjs/crypto/build/libsodium.d.ts","../../../node_modules/@cosmjs/crypto/build/random.d.ts","../../../node_modules/@cosmjs/crypto/build/ripemd.d.ts","../../../node_modules/@cosmjs/crypto/build/secp256k1signature.d.ts","../../../node_modules/@cosmjs/crypto/build/secp256k1.d.ts","../../../node_modules/@cosmjs/crypto/build/sha.d.ts","../../../node_modules/@cosmjs/math/build/integers.d.ts","../../../node_modules/@cosmjs/math/build/decimal.d.ts","../../../node_modules/@cosmjs/math/build/index.d.ts","../../../node_modules/@cosmjs/crypto/build/slip10.d.ts","../../../node_modules/@cosmjs/crypto/build/index.d.ts","../../../node_modules/@cosmjs/amino/build/paths.d.ts","../../../node_modules/@cosmjs/amino/build/signdoc.d.ts","../../../node_modules/@cosmjs/amino/build/signature.d.ts","../../../node_modules/@cosmjs/amino/build/signer.d.ts","../../../node_modules/@cosmjs/amino/build/wallet.d.ts","../../../node_modules/@cosmjs/amino/build/secp256k1hdwallet.d.ts","../../../node_modules/@cosmjs/amino/build/secp256k1wallet.d.ts","../../../node_modules/@cosmjs/amino/build/stdtx.d.ts","../../../node_modules/@cosmjs/amino/build/index.d.ts","../../../node_modules/@types/long/index.d.ts","../../../node_modules/protobufjs/index.d.ts","../../../node_modules/protobufjs/minimal.d.ts","../../../node_modules/@cosmjs/stargate/node_modules/cosmjs-types/google/protobuf/any.d.ts","../../../node_modules/@cosmjs/stargate/build/accounts.d.ts","../../../node_modules/@cosmjs/proto-signing/build/coins.d.ts","../../../node_modules/@cosmjs/proto-signing/node_modules/cosmjs-types/google/protobuf/any.d.ts","../../../node_modules/@cosmjs/proto-signing/node_modules/cosmjs-types/cosmos/crypto/multisig/v1beta1/multisig.d.ts","../../../node_modules/@cosmjs/proto-signing/node_modules/cosmjs-types/cosmos/tx/signing/v1beta1/signing.d.ts","../../../node_modules/@cosmjs/proto-signing/node_modules/cosmjs-types/cosmos/base/v1beta1/coin.d.ts","../../../node_modules/@cosmjs/proto-signing/node_modules/cosmjs-types/cosmos/tx/v1beta1/tx.d.ts","../../../node_modules/@cosmjs/proto-signing/build/decode.d.ts","../../../node_modules/@cosmjs/proto-signing/build/signer.d.ts","../../../node_modules/@cosmjs/proto-signing/build/wallet.d.ts","../../../node_modules/@cosmjs/proto-signing/build/directsecp256k1hdwallet.d.ts","../../../node_modules/@cosmjs/proto-signing/build/directsecp256k1wallet.d.ts","../../../node_modules/@cosmjs/proto-signing/build/paths.d.ts","../../../node_modules/@cosmjs/proto-signing/build/pubkey.d.ts","../../../node_modules/@cosmjs/proto-signing/build/registry.d.ts","../../../node_modules/@cosmjs/proto-signing/build/signing.d.ts","../../../node_modules/@cosmjs/proto-signing/build/index.d.ts","../../../node_modules/@cosmjs/stargate/build/aminotypes.d.ts","../../../node_modules/@cosmjs/stargate/build/fee.d.ts","../../../node_modules/@cosmjs/stargate/build/logs.d.ts","../../../node_modules/@cosmjs/tendermint-rpc/build/addresses.d.ts","../../../node_modules/readonly-date/index.d.ts","../../../node_modules/@cosmjs/tendermint-rpc/build/dates.d.ts","../../../node_modules/@cosmjs/json-rpc/build/id.d.ts","../../../node_modules/xstream/index.d.ts","../../../node_modules/@cosmjs/json-rpc/build/compatibility.d.ts","../../../node_modules/@cosmjs/json-rpc/build/types.d.ts","../../../node_modules/@cosmjs/json-rpc/build/jsonrpcclient.d.ts","../../../node_modules/@cosmjs/json-rpc/build/parse.d.ts","../../../node_modules/@cosmjs/json-rpc/build/index.d.ts","../../../node_modules/@cosmjs/tendermint-rpc/build/rpcclients/rpcclient.d.ts","../../../node_modules/@cosmjs/tendermint-rpc/build/rpcclients/httpclient.d.ts","../../../node_modules/@cosmjs/tendermint-rpc/build/rpcclients/websocketclient.d.ts","../../../node_modules/@cosmjs/tendermint-rpc/build/rpcclients/index.d.ts","../../../node_modules/@cosmjs/tendermint-rpc/build/tendermint34/requests.d.ts","../../../node_modules/@cosmjs/tendermint-rpc/build/types.d.ts","../../../node_modules/@cosmjs/tendermint-rpc/build/tendermint34/responses.d.ts","../../../node_modules/@cosmjs/tendermint-rpc/build/tendermint34/tendermint34client.d.ts","../../../node_modules/@cosmjs/tendermint-rpc/build/tendermint34/index.d.ts","../../../node_modules/@cosmjs/tendermint-rpc/build/index.d.ts","../../../node_modules/@cosmjs/stargate/node_modules/cosmjs-types/tendermint/crypto/proof.d.ts","../../../node_modules/@cosmjs/stargate/build/queryclient/queryclient.d.ts","../../../node_modules/@cosmjs/stargate/node_modules/cosmjs-types/cosmos/base/query/v1beta1/pagination.d.ts","../../../node_modules/@cosmjs/stargate/build/queryclient/utils.d.ts","../../../node_modules/@cosmjs/stargate/build/queryclient/index.d.ts","../../../node_modules/@cosmjs/stargate/build/modules/auth/queries.d.ts","../../../node_modules/@cosmjs/stargate/build/modules/authz/aminomessages.d.ts","../../../node_modules/@cosmjs/stargate/build/modules/authz/messages.d.ts","../../../node_modules/@cosmjs/stargate/build/modules/bank/aminomessages.d.ts","../../../node_modules/@cosmjs/stargate/node_modules/cosmjs-types/cosmos/base/v1beta1/coin.d.ts","../../../node_modules/@cosmjs/stargate/node_modules/cosmjs-types/cosmos/bank/v1beta1/bank.d.ts","../../../node_modules/@cosmjs/stargate/node_modules/cosmjs-types/cosmos/bank/v1beta1/tx.d.ts","../../../node_modules/@cosmjs/stargate/build/modules/bank/messages.d.ts","../../../node_modules/@cosmjs/stargate/build/modules/bank/queries.d.ts","../../../node_modules/@cosmjs/stargate/build/modules/crisis/aminomessages.d.ts","../../../node_modules/@cosmjs/stargate/build/modules/distribution/aminomessages.d.ts","../../../node_modules/@cosmjs/stargate/node_modules/cosmjs-types/cosmos/distribution/v1beta1/tx.d.ts","../../../node_modules/@cosmjs/stargate/build/modules/distribution/messages.d.ts","../../../node_modules/@cosmjs/stargate/node_modules/cosmjs-types/cosmos/distribution/v1beta1/distribution.d.ts","../../../node_modules/@cosmjs/stargate/node_modules/cosmjs-types/cosmos/distribution/v1beta1/query.d.ts","../../../node_modules/@cosmjs/stargate/build/modules/distribution/queries.d.ts","../../../node_modules/@cosmjs/stargate/build/modules/evidence/aminomessages.d.ts","../../../node_modules/@cosmjs/stargate/build/modules/feegrant/aminomessages.d.ts","../../../node_modules/@cosmjs/stargate/build/modules/feegrant/messages.d.ts","../../../node_modules/@cosmjs/stargate/build/modules/gov/aminomessages.d.ts","../../../node_modules/@cosmjs/stargate/node_modules/cosmjs-types/google/protobuf/timestamp.d.ts","../../../node_modules/@cosmjs/stargate/node_modules/cosmjs-types/google/protobuf/duration.d.ts","../../../node_modules/@cosmjs/stargate/node_modules/cosmjs-types/cosmos/gov/v1beta1/gov.d.ts","../../../node_modules/@cosmjs/stargate/node_modules/cosmjs-types/cosmos/gov/v1beta1/tx.d.ts","../../../node_modules/@cosmjs/stargate/build/modules/gov/messages.d.ts","../../../node_modules/@cosmjs/stargate/node_modules/cosmjs-types/cosmos/gov/v1beta1/query.d.ts","../../../node_modules/@cosmjs/stargate/build/modules/gov/queries.d.ts","../../../node_modules/@cosmjs/stargate/build/modules/ibc/aminomessages.d.ts","../../../node_modules/@cosmjs/stargate/node_modules/cosmjs-types/ibc/core/client/v1/client.d.ts","../../../node_modules/@cosmjs/stargate/node_modules/cosmjs-types/ibc/applications/transfer/v1/tx.d.ts","../../../node_modules/@cosmjs/stargate/build/modules/ibc/messages.d.ts","../../../node_modules/@cosmjs/stargate/node_modules/cosmjs-types/ibc/applications/transfer/v1/transfer.d.ts","../../../node_modules/@cosmjs/stargate/node_modules/cosmjs-types/ibc/applications/transfer/v1/query.d.ts","../../../node_modules/@cosmjs/stargate/node_modules/cosmjs-types/ibc/core/channel/v1/channel.d.ts","../../../node_modules/@cosmjs/stargate/node_modules/cosmjs-types/ibc/core/channel/v1/query.d.ts","../../../node_modules/@cosmjs/stargate/node_modules/cosmjs-types/ibc/core/client/v1/query.d.ts","../../../node_modules/@cosmjs/stargate/node_modules/cosmjs-types/confio/proofs.d.ts","../../../node_modules/@cosmjs/stargate/node_modules/cosmjs-types/ibc/core/commitment/v1/commitment.d.ts","../../../node_modules/@cosmjs/stargate/node_modules/cosmjs-types/ibc/core/connection/v1/connection.d.ts","../../../node_modules/@cosmjs/stargate/node_modules/cosmjs-types/ibc/core/connection/v1/query.d.ts","../../../node_modules/@cosmjs/stargate/node_modules/cosmjs-types/tendermint/version/types.d.ts","../../../node_modules/@cosmjs/stargate/node_modules/cosmjs-types/tendermint/crypto/keys.d.ts","../../../node_modules/@cosmjs/stargate/node_modules/cosmjs-types/tendermint/types/validator.d.ts","../../../node_modules/@cosmjs/stargate/node_modules/cosmjs-types/tendermint/types/types.d.ts","../../../node_modules/@cosmjs/stargate/node_modules/cosmjs-types/ibc/lightclients/tendermint/v1/tendermint.d.ts","../../../node_modules/@cosmjs/stargate/build/modules/ibc/queries.d.ts","../../../node_modules/@cosmjs/stargate/node_modules/cosmjs-types/cosmos/mint/v1beta1/mint.d.ts","../../../node_modules/@cosmjs/stargate/build/modules/mint/queries.d.ts","../../../node_modules/@cosmjs/stargate/build/modules/slashing/aminomessages.d.ts","../../../node_modules/@cosmjs/stargate/node_modules/cosmjs-types/cosmos/slashing/v1beta1/slashing.d.ts","../../../node_modules/@cosmjs/stargate/node_modules/cosmjs-types/cosmos/slashing/v1beta1/query.d.ts","../../../node_modules/@cosmjs/stargate/build/modules/slashing/queries.d.ts","../../../node_modules/@cosmjs/stargate/build/modules/staking/aminomessages.d.ts","../../../node_modules/@cosmjs/stargate/node_modules/cosmjs-types/cosmos/staking/v1beta1/staking.d.ts","../../../node_modules/@cosmjs/stargate/node_modules/cosmjs-types/cosmos/staking/v1beta1/tx.d.ts","../../../node_modules/@cosmjs/stargate/build/modules/staking/messages.d.ts","../../../node_modules/@cosmjs/stargate/node_modules/cosmjs-types/cosmos/staking/v1beta1/query.d.ts","../../../node_modules/@cosmjs/stargate/build/modules/staking/queries.d.ts","../../../node_modules/@cosmjs/stargate/node_modules/cosmjs-types/tendermint/types/params.d.ts","../../../node_modules/@cosmjs/stargate/node_modules/cosmjs-types/tendermint/abci/types.d.ts","../../../node_modules/@cosmjs/stargate/node_modules/cosmjs-types/cosmos/base/abci/v1beta1/abci.d.ts","../../../node_modules/@cosmjs/stargate/node_modules/cosmjs-types/cosmos/tx/v1beta1/tx.d.ts","../../../node_modules/@cosmjs/stargate/node_modules/cosmjs-types/cosmos/tx/signing/v1beta1/signing.d.ts","../../../node_modules/@cosmjs/stargate/node_modules/cosmjs-types/cosmos/crypto/multisig/v1beta1/multisig.d.ts","../../../node_modules/@cosmjs/stargate/node_modules/cosmjs-types/cosmos/tx/v1beta1/service.d.ts","../../../node_modules/@cosmjs/stargate/build/modules/tx/queries.d.ts","../../../node_modules/@cosmjs/stargate/build/modules/vesting/aminomessages.d.ts","../../../node_modules/@cosmjs/stargate/build/modules/vesting/messages.d.ts","../../../node_modules/@cosmjs/stargate/build/modules/index.d.ts","../../../node_modules/@cosmjs/stargate/build/multisignature.d.ts","../../../node_modules/@cosmjs/stargate/build/search.d.ts","../../../node_modules/@cosmjs/stargate/build/stargateclient.d.ts","../../../node_modules/@cosmjs/stargate/build/signingstargateclient.d.ts","../../../node_modules/@cosmjs/stargate/build/index.d.ts","../../../node_modules/@cosmjs/cosmwasm-stargate/build/modules/wasm/aminomessages.d.ts","../../../node_modules/@cosmjs/cosmwasm-stargate/node_modules/cosmjs-types/google/protobuf/any.d.ts","../../../node_modules/@cosmjs/cosmwasm-stargate/node_modules/cosmjs-types/cosmwasm/wasm/v1/types.d.ts","../../../node_modules/@cosmjs/cosmwasm-stargate/node_modules/cosmjs-types/cosmos/base/v1beta1/coin.d.ts","../../../node_modules/@cosmjs/cosmwasm-stargate/node_modules/cosmjs-types/cosmwasm/wasm/v1/tx.d.ts","../../../node_modules/@cosmjs/cosmwasm-stargate/build/modules/wasm/messages.d.ts","../../../node_modules/@cosmjs/cosmwasm-stargate/node_modules/cosmjs-types/cosmos/base/query/v1beta1/pagination.d.ts","../../../node_modules/@cosmjs/cosmwasm-stargate/node_modules/cosmjs-types/cosmwasm/wasm/v1/query.d.ts","../../../node_modules/@cosmjs/cosmwasm-stargate/build/modules/wasm/queries.d.ts","../../../node_modules/@cosmjs/cosmwasm-stargate/build/modules/index.d.ts","../../../node_modules/@cosmjs/cosmwasm-stargate/build/cosmwasmclient.d.ts","../../../node_modules/@cosmjs/cosmwasm-stargate/build/encoding.d.ts","../../../node_modules/@cosmjs/cosmwasm-stargate/node_modules/cosmjs-types/cosmos/tx/v1beta1/tx.d.ts","../../../node_modules/@cosmjs/cosmwasm-stargate/build/signingcosmwasmclient.d.ts","../../../node_modules/@cosmjs/cosmwasm-stargate/build/index.d.ts","../../../node_modules/@types/node/assert.d.ts","../../../node_modules/@types/node/globals.d.ts","../../../node_modules/@types/node/async_hooks.d.ts","../../../node_modules/@types/node/buffer.d.ts","../../../node_modules/@types/node/child_process.d.ts","../../../node_modules/@types/node/cluster.d.ts","../../../node_modules/@types/node/console.d.ts","../../../node_modules/@types/node/constants.d.ts","../../../node_modules/@types/node/crypto.d.ts","../../../node_modules/@types/node/dgram.d.ts","../../../node_modules/@types/node/dns.d.ts","../../../node_modules/@types/node/domain.d.ts","../../../node_modules/@types/node/events.d.ts","../../../node_modules/@types/node/fs.d.ts","../../../node_modules/@types/node/fs/promises.d.ts","../../../node_modules/@types/node/http.d.ts","../../../node_modules/@types/node/http2.d.ts","../../../node_modules/@types/node/https.d.ts","../../../node_modules/@types/node/inspector.d.ts","../../../node_modules/@types/node/module.d.ts","../../../node_modules/@types/node/net.d.ts","../../../node_modules/@types/node/os.d.ts","../../../node_modules/@types/node/path.d.ts","../../../node_modules/@types/node/perf_hooks.d.ts","../../../node_modules/@types/node/process.d.ts","../../../node_modules/@types/node/punycode.d.ts","../../../node_modules/@types/node/querystring.d.ts","../../../node_modules/@types/node/readline.d.ts","../../../node_modules/@types/node/repl.d.ts","../../../node_modules/@types/node/stream.d.ts","../../../node_modules/@types/node/string_decoder.d.ts","../../../node_modules/@types/node/timers.d.ts","../../../node_modules/@types/node/tls.d.ts","../../../node_modules/@types/node/trace_events.d.ts","../../../node_modules/@types/node/tty.d.ts","../../../node_modules/@types/node/url.d.ts","../../../node_modules/@types/node/util.d.ts","../../../node_modules/@types/node/v8.d.ts","../../../node_modules/@types/node/vm.d.ts","../../../node_modules/@types/node/wasi.d.ts","../../../node_modules/@types/node/worker_threads.d.ts","../../../node_modules/@types/node/zlib.d.ts","../../../node_modules/@types/node/globals.global.d.ts","../../../node_modules/@types/node/index.d.ts","../../../node_modules/sonic-boom/types/index.d.ts","../../../node_modules/@types/pino-std-serializers/index.d.ts","../../../node_modules/@types/pino-pretty/index.d.ts","../../../node_modules/@types/pino/index.d.ts","../src/interfaces.ts","../src/global.ts","../src/project.ts","../src/index.ts","../../../node_modules/chalk/index.d.ts","../../../node_modules/jest-diff/build/cleanupSemantic.d.ts","../../../node_modules/pretty-format/build/types.d.ts","../../../node_modules/pretty-format/build/index.d.ts","../../../node_modules/jest-diff/build/types.d.ts","../../../node_modules/jest-diff/build/diffLines.d.ts","../../../node_modules/jest-diff/build/printDiffs.d.ts","../../../node_modules/jest-diff/build/index.d.ts","../../../node_modules/jest-matcher-utils/build/index.d.ts","../../../node_modules/@types/jest/index.d.ts"],"fileInfos":[{"version":"f5c28122bee592cfaf5c72ed7bcc47f453b79778ffa6e301f45d21a0970719d4","affectsGlobalScope":true},"dc47c4fa66b9b9890cf076304de2a9c5201e94b740cffdf09f87296d877d71f6","7a387c58583dfca701b6c85e0adaf43fb17d590fb16d5b2dc0a2fbd89f35c467","8a12173c586e95f4433e0c6dc446bc88346be73ffe9ca6eec7aa63c8f3dca7f9","5f4e733ced4e129482ae2186aae29fde948ab7182844c3a5a51dd346182c7b06",{"version":"adb996790133eb33b33aadb9c09f15c2c575e71fb57a62de8bf74dbf59ec7dfb","affectsGlobalScope":true},{"version":"43fb1d932e4966a39a41b464a12a81899d9ae5f2c829063f5571b6b87e6d2f9c","affectsGlobalScope":true},{"version":"cdccba9a388c2ee3fd6ad4018c640a471a6c060e96f1232062223063b0a5ac6a","affectsGlobalScope":true},{"version":"c5c05907c02476e4bde6b7e76a79ffcd948aedd14b6a8f56e4674221b0417398","affectsGlobalScope":true},{"version":"0d5f52b3174bee6edb81260ebcd792692c32c81fd55499d69531496f3f2b25e7","affectsGlobalScope":true},{"version":"810627a82ac06fb5166da5ada4159c4ec11978dfbb0805fe804c86406dab8357","affectsGlobalScope":true},{"version":"181f1784c6c10b751631b24ce60c7f78b20665db4550b335be179217bacc0d5f","affectsGlobalScope":true},{"version":"3013574108c36fd3aaca79764002b3717da09725a36a6fc02eac386593110f93","affectsGlobalScope":true},{"version":"75ec0bdd727d887f1b79ed6619412ea72ba3c81d92d0787ccb64bab18d261f14","affectsGlobalScope":true},{"version":"3be5a1453daa63e031d266bf342f3943603873d890ab8b9ada95e22389389006","affectsGlobalScope":true},{"version":"17bb1fc99591b00515502d264fa55dc8370c45c5298f4a5c2083557dccba5a2a","affectsGlobalScope":true},{"version":"7ce9f0bde3307ca1f944119f6365f2d776d281a393b576a18a2f2893a2d75c98","affectsGlobalScope":true},{"version":"6a6b173e739a6a99629a8594bfb294cc7329bfb7b227f12e1f7c11bc163b8577","affectsGlobalScope":true},{"version":"12a310447c5d23c7d0d5ca2af606e3bd08afda69100166730ab92c62999ebb9d","affectsGlobalScope":true},{"version":"b0124885ef82641903d232172577f2ceb5d3e60aed4da1153bab4221e1f6dd4e","affectsGlobalScope":true},{"version":"0eb85d6c590b0d577919a79e0084fa1744c1beba6fd0d4e951432fa1ede5510a","affectsGlobalScope":true},{"version":"da233fc1c8a377ba9e0bed690a73c290d843c2c3d23a7bd7ec5cd3d7d73ba1e0","affectsGlobalScope":true},{"version":"d154ea5bb7f7f9001ed9153e876b2d5b8f5c2bb9ec02b3ae0d239ec769f1f2ae","affectsGlobalScope":true},{"version":"bb2d3fb05a1d2ffbca947cc7cbc95d23e1d053d6595391bd325deb265a18d36c","affectsGlobalScope":true},{"version":"c80df75850fea5caa2afe43b9949338ce4e2de086f91713e9af1a06f973872b8","affectsGlobalScope":true},{"version":"09aa50414b80c023553090e2f53827f007a301bc34b0495bfb2c3c08ab9ad1eb","affectsGlobalScope":true},{"version":"cd483c056da900716879771893a3c9772b66c3c88f8943b4205aec738a94b1d0","affectsGlobalScope":true},{"version":"c37f8a49593a0030eecb51bbfa270e709bec9d79a6cc3bb851ef348d4e6b26f8","affectsGlobalScope":true},"1b07773ee3ca8a62873be6a6b8b3aa29455c7b53db2cd4399ec4c6e362cef92b","bb82c2f6ce46746ddff974720459546747854d8e83a5ab2bf1ea5e11dbc535fe","ff6d4e9f0059a84861c97d04a04844d07d778cd95ddac6f923605c0ee7e4cba2","cae8d8e138397485e3f8023882ee63e6abe0cb0fa21d2bf5b7150b19db610e6d","684b95e60a1346cb54c7a45cb424091d97c9d573cecdaf2b5954a4d63d4bb5a9","2321e25e34075320eeedbc5cd56051c9ce0341cb6a51e4faafb8f827d8045ceb","1cc2355816ba43eb2d6eb2670ac83d29a3ef02a01c09a4e2d5c0cc21e35249f7","ce47207ec1bd458b7966f0bbb5d9d15be0b00116fec4efda52ec8fcae8321586","a1f914818a2cc3bf3a693b99902d9cb0c1a6613df3cdd2bd8134cc63e695565c","3bd1d708281a33e7736f9c75c74221c077827d21c941f72ed3a8533b55fa5c7c","838c4154f06e964281fbfa88cf8cf8d76f194cbdd4d3f13e0a9e9a52e5faac6b","e32f79a7f77271780ecfcff5205300791429c2526b0b72307bb300ded25420c4","6ea46b5278f87aaf63479e72bb2d44474e458b4e603fa7ef46b3730c8a320073","22176ca5c9549edad90a532d5623a9b6ec552505178a7aeec3591f0b8f485d87","ba01df9e06cc51729deef602895fe3ceafd9ce2f17f2119db81eb67ff6ef7998","ceb9c2382841d13564815643d804f09f28bff3eda42d1b798ee352be9ce1dace","2dee5f01ddfa5375af2104e3d58e98afb881b63294187bab0a3df873a7bb2ad1","3dbe631d8fddc408346806ef5cf4195ba34a8ba1eb3cfde3aeffb813a38bffd2","6b216f697ce8c923cea1c13cfba281a0afb08737517630caa64cdd9e5cd0366e","3d444fa6e8057de7ea8ff4a9b737adc9538b2fcf7767969bdedc58bfc892582c","1906f0be92468440d7ab4b26dcced83ce978a939c64806cc75e4f484e9b649c0","3633df8c9c377521d9f587bb0b9c129a4a16360799e68ba42307adfba38acbc9","3d135e55be21b9f506a4d7f441abf7fc159a54ad2b64556b0ba0f819695c3c47","d7c9317d3ed78356123b2fddc847da2bd32f0f3ce605624af1f0b5ff5c1a7508","d72588d7853732dcbf1c5186389458d6a123dbe8f19cede386f424ba32afef8f","3babffecf1c0fb251b65b6167fa5909c87bd3e4c1a976d26a156a0cddb84f852","406a17e0a2cc399c644b5bc1fb807c9dc71f3247dac25a232864b13370d6f5e9","21f75cbb084ee0b35a8792e94e83d937532154a99c343a5bd3d86c26b5d7e0bb","f5b6fe136fb118c241a6ef86fef91629859c83cc8a4579ba1265bdde1a22a62b","0e60e0cbf2283adfd5a15430ae548cd2f662d581b5da6ecd98220203e7067c70","1558c642e03689d42843e7b047b9c20e77ee09ab388ff854484db5dcfbed11da","932cade1c5802123b5831f332ad8a6297f0f7d14d0ee04f5a774408f393e2200","d102832263a974878fdf065cd906665eb5c9f61697e292b9e5189daa56533a96","26ceee69ce397eacee58c24011044a161b69d2aae975c80c39ff3f6d15dcc648","f86133755a57f62630c55b6d4f2aded22a2ed92bfbdbb80f8de7abfa532fbada","d102832263a974878fdf065cd906665eb5c9f61697e292b9e5189daa56533a96","3accd9a477f084cc03cfe49481d5a26fe0ba26cd0cad275356b8d8299f3d121c","284bd63eb0c3024fd05f10534887cfb2fd317c4e213b0bbde4290fa1d1e3101d","65b9764e658be237f9ea48d298aa71ea75bc1ef55e737b13931f71c688d741f9","e5823e9ef3fe4c75e46b37fac5f7f82278fd5cb6b1e6a791fe010a68b651d3fe","d99a8619851f168989eb222276717a22608fc98734da3fc2de57b74f695136d6","101fc16737cd03427180def41f5acdeb9af48d957c961b6af90d7025dcb73e4b","d72588d7853732dcbf1c5186389458d6a123dbe8f19cede386f424ba32afef8f","de0541b716cd138c87a796f259883a1c9794fc68ec3f5f7778ff9e0613859c05","47595460b73d788d6294b215d376fded84583696dcadd522d26fcffb5147b0bd","1906f0be92468440d7ab4b26dcced83ce978a939c64806cc75e4f484e9b649c0","18fc735b44e29d2f534df14ad056ab38f0edbca7b0b238d1a9c3549ed1e020a7","cea33c644629f4fc041b8cc988103a2c10389dca5b53a54c57b0b0686e16cc47","c5ce0a3bea64d61fa10c7a581ad625e1da5963f4a5e4c7dc4266663866a20db6","139e6717c27ae6ed4b81c50a36510f7b8fb3c511c5d5c0f17c04157fded671e7","8852cd83c67f56676a2a85609ed75345f5338a43fe893ae1f8a5d0b361d93e99","bcf02e8cb54f4b47b3d1002dff222d95d66384f3b7063783002923f90a975003","ca20236e3e6f5bc8a923bc82e8100b7c6ed5dd7b1c1d86fdccf9c72d74926f84","1e0650d3c72287bd6d7030df9485c9d63ed964e6e3552edf630654db193222d6","6ba292cc3df1eea225aacb3182f9b0b8eab9d8637a9c698af1e5b58aa5492e9e","f9f55a2f6f8e07d3ea10e1154a0fc129ec72c21e57ffe9b8720bbb80ce6407ac","66ea2ca4caba80ab1ace4e661ed9eff6d7e2c2838f8b8e5801e73e30108f1aeb","07d39f8730ecb29d631e57e8a8a7491fc10d7ef8b0eb035781bdaf81b948e6b3","092dfe0ce4b20c92b313e282fb79f419f68433a5d4a2c285041e4b1f66d51b55","b6efbd8c40674b61f37f50a17884fe0ca0f7bd90e405cbba2c9708333f02a902","376a324ad9678bc3d6cadf4bbef4ae7ea2624c8ebf4bc149064f4b4b4c00024c","43760728760f66940ad6012894dbf7808a9399628a7a21de89ce26389a94d98d","0fc31521f9064f13d54215d6ef35bafb61b68acd7e87f7bc53bb85d3404668f1","0cbfce53b86891a1581b878fb3361fb175cc866c98f7f446433e45f3e8befa26","b5785ffd8bfea1811c583f3334b2d3d62eeca816f8db66b94806fb00c04582d3","34623a91c4f3f0f2203b06c51b37d229a3ef1007352bd5bcc41086370cca6e0b","e1308c3cdc403367b6626205e4091ad1b76ae5a3d1af5420adbdd1ddcb5d8f35","0b7d12bf60d6482b08cea1808b77159603dbdbb7074a62cbb1ca31d545fc78b8","84de7485f6e3a436ead434647d097757222b4c9e3f9b9b74a7d5664444eb1e67","4e43c9a3beb004090d45e08b03c296df9d386d9a4eac170a1ede586f1b97fd35","9f80a06ee74447217b7b037c3234be7de3f62b02ad82c407c7777a38bb43e11d","88819391bc47dc1baece98bcf696c3be4356a1caed3ac5b8e2379e3ada6879b9","7bfe77d5edb4853b0bbfd728c6f97fe2f27c1fe4d17190e17571f78f4e8b1fe2","84b1762e5fec9ccb032fa41e00ca4725c4f34b97e6d25b1f1bf770d2d9a3e7cb","2f8f81fa35c9a3986ce69d434b439ec253426b725e7185bd1478f7206f9cfbcb","7910ce0dd4b9a486fd62b3071e7cbaa4f5e361d11970835f707dba2fdd08546b","e06ff5174ccce9300da8a05267ebab25077ee749717b35f24e490e47528d1c09","c74386bc691f37e6faf967ab903c32a99af6faf5db76882a65ef1670169a2eed","5bbe0df99c276b5519bd048205790825cfda7ced546cae8b84cac9841a047f6b","ec9a719ce1d43b91d9233852eedb8af5c3c86cb5d4d3adaea05cbe4ef799e8e8","7c3009f92b4440ddbd73963da9755493be2839b670a6a8211664228897fae84a","e79728ebbf14b6ec50c424fc06979f606ab62b9bb23175934b8ecd9425a0de99","65b9764e658be237f9ea48d298aa71ea75bc1ef55e737b13931f71c688d741f9","1bdf9be9af5079a5352aa9ab9b01deadc97b461895e067e26e52153ffb267754","c6e7b8235c39be4c799911e6e6a3abe2363ecedd9a2166e223d0290ad3fdd8fc","c35791af1d03a4641dbf057344d664f49638ecea433dd9390725ba74066fd4be","d676dde67e765eeafafc9ec3aef08cb02305b0919b0f50f4445667650eb6031a","2ef6dd37cc81266c00017d913a7df2afd08c1460d12b03d6dca16da9bfc223fb","d16bfdf77f61c7d42087057820782b2c6b31646ee86acf101cba19c965ade5bf","d2be20bdb99bb360a7f97420dd6eff36b57eff2fbbce2afc90767ca0770300c7","7634c88ae7b38d03fd0ade5e2c8e19f14007bd1993be62c17327a8713dd58a0c","680e9a47ccf1e57c57cf9c27c232dcf616981b6233476f907225da4a97c040bf","756a629d1e7049fbf31dc7b41f075c1c7775c056383eb64dbc9c3b38c81d355a","5d8367cabd5cbe281bbcda28a6de7e18528aba6176c57152443f691e3d98e9fc","d5f3f96b702fea4ef43d2d1e509cc828bb371a433941c3edf7b6848064156ba8","c8501d4d265d11cfc7d668cbbcbd3b32cbadfd0b3174be2d0f409857ae1263fb","56f50fa2dc498886c43ae862b2510826a52a6fe01617ff421a8c6a8bf1ebde5f","d0a3c39acab11a3e72b88d511c943984dad2a7b32f23d3c6614f48dcd7e1f7ad","16a71faab2b7d7326fd67d4c62c0f82c22d4279bb105e6ce277b2f0725795fa8","999c138d956f709832ad5f5ee817044013a6e8b393ef77425ac39a6c5a571a2f","2b7675e19659b58d255457817cb13df7d9513c59df26b796ee3b070a97abf987","a4c61cf10ccc579e39929368529875a9595bddf1c1e9b997a609452fd710488c","44893cfffcad9846f3e0baa00c1f013ee910cbd153efa532a6d73266bb50418c","003d1ae54ce84a67ef130769c9906431191180b3e1ff9678ecb3be9594a98c3a","8eba9a651689645dc6deefb63aa3c3a458baa5518893096f72522fa41e145117","1f6972c1403b299a424da5ac584a23897b558304b40de8309e55228a0dced022","1dc193ce1e96ec16a939082c62a8f5b21608fdd089c60982d837ba6bfcd4d537","dccea4fd3611a7214d4376b0b0909a592fd0e89c24f51bf27877507d7bf830ef","8e03b7c67e71d70bd18cffe926ce7cd4e178a1c7978bdce90d49a4fcd2c9e2dc","752115c01b309d1cb1e12798676b5ef9d70dd69237a3a8feb21068a5502d104c","9185eb1fa3b54f7eedc737d7489aa84f43be119719bb836101692ad18733b073","6c6ac7e4bc684fdc0141d3751ef1828d218ae11c84ee7b647b08eabcd6808ab9","3bcf223f4fb8a3dfbf3bfee37e4684a0fe6b9e22582149c63bd5dbfb362bb9ab","8c9646ca472453bba5d5465d315167306484dbe7114630d22630d357ee646a68","c3ee357b7ba1ed9dc9e4a002b88ae2cc04f91e3ba61f8ba8ad823246f2216551","0fe227d2a90df9d851a0575f1db3edbf5381372daeb6ad218a1e6b4ad1d13662","a40420119b1efa7769e75daa3a81970ad74db73f043ad5b81b943f6586778518","1af2b9c5d771a60e585cbef83814d21f4c26ed193e111ff21b6f0de110d17402","a0d0db8aa57bdc3cfe8b0981932540986d1077019db6aa15be17c429f43c7d27","248181df3b841d4ad56bbc09e21644ae7c41a4d5182cd1b6e74674f7ee1d309f","b460f8e483c3e100e2a804cabff85a71eec20f9e306b36890d169dc544b3873c","44f5849d6280ea8062d2fb7752bea910636aee66c16038f3bccbe1d1f2fd3646","3141b074e5a85a17fc5c6e1c0a2f553eb4558a8e5bb0ae81636b336168217df8","67df6a25a709da78d49ad9649128bffa0c80fd2942fc94758687e91768ce1d43","a0f9cd316c67337b539230f41f4e5cd198a920cff4376ee7f7d628b873e5f7fe","2be41e8798aa2720dcdc9c2f3ac9a1a1bebc2cebb297d7a00b3a863317524ffd","868f8bf3619fff7852ba895408fdf979838a3ec163eaad1e25d94fcd831a31b0","f984944916dceb37c184483e06f9cec72f194ea3c28f2a5027fe0e329c72c13a","547545f61076329f5b1d926cbc06f53504b4a618e5ea1b44d88432b2ee39cb1f","4e46da7a42ef0580d2a7f530ce40fdc39d4da01c93a19ec089878a5d2dd39098","356db9b1a59ef43c8e36fe85709aa67deb92987431b609599871bb12101f4957","ff66fa23822f2991295252210f8bf6aa9bfa472e7811726386d05ed6386cb9bc","7f7cdd2dfd7dc67506635ffb0b653047fa2c244b3d758c06d80fa1b3cc16bd57","8570b0ad0cd1367112069086882ec4a978f61ebe43c76b341ba84cff3f8d9141","a8e19437eeee45d69bdaf621cf3b65592bbf86eac4aba35e9a349cc87f51f350","fe348391e17a590cc55eff846ac83333dcc6de0b6340822c5a1a4cc878bf30a2","f11e4b02dd54deb1e9589265337f0dd95752ff1a06f081a106fac710057917b1","126caa97a0304ca62e42df06cdf6a24aea1b346b577a0b321d8000e56e12a39c","a5e01c35a3e4ac274246e72a4c46dfc8be738079a209db5487efb875112d2929","e5823e9ef3fe4c75e46b37fac5f7f82278fd5cb6b1e6a791fe010a68b651d3fe","284bd63eb0c3024fd05f10534887cfb2fd317c4e213b0bbde4290fa1d1e3101d","3accd9a477f084cc03cfe49481d5a26fe0ba26cd0cad275356b8d8299f3d121c","640955b590f37b652a2ec92875f1f23f08f9c49a14eb6b45f56b7177f143c761","bdb73f52284d8f2a6f0b3301f34dade21d7556402f194c260bd6012f89af5fff","4d88aefc30eb7a15caf6607f8483c135b199bd46a99c53bea0947305527db1d2","b2ed1380abd77596d9b3bfea56c00fc2cb56085d570a3646b810d85e6f62b133","7578a85111ee0a10dc7a7f2fdc71112e72c344077634e318ad8063020d78af72","fddae78fb12dcc2cf1f26c98698968d4b6bec2d95f517b5d283bcc4f718c7008","96852a804ea5e49b38bddd0eef8a539242c081207dba1441c607aee6a69d7ea4","cbc3dcb5d6e4856536d11221c5d7f614a8c5ed1a006cb542ffe89c82b9dc9d96","49e040ec22b418b5b4e32019601744adbec5f234e84f8fddcee933324670d133","d5646187187a1eb8e5bddac987fa19b3287f15c5e32ab70a78658aaba8801353","45b0b4bee1b9c5b8b88b4d08efe474b2a26cf80813cbba34d92e5200095ca8a2","d102832263a974878fdf065cd906665eb5c9f61697e292b9e5189daa56533a96","8eeacfa92c89c767ae8d1514458d90c5b014a04fd8d11f7b719e0fd63943c49f","65b9764e658be237f9ea48d298aa71ea75bc1ef55e737b13931f71c688d741f9","a544db0e867e140827d72547d82b5038072d900368cefabc7fc39d61da9d0e51","2c54cad20224928f94d0065011b59dddf5a64e37b52c84dfa0f829315e93a068","7910ce0dd4b9a486fd62b3071e7cbaa4f5e361d11970835f707dba2fdd08546b","9a0aa8f6172dfe3c70cb01afb7db2a2c61fd98e2b7e72903ab20ecbbca7359c0","58485aeb104c6f05524899c5613d467b2a7671c6f17be15608115e8e3fc28703","0390a17e67f5143779da05866b2e59149a02178fb483f4af6f178a0096238ee8","403084999aa801d016213959b860d56774ca93e217e5f7a28bce10a99f3038fd","3a9fa7da35ae57210dfac79453021f193689256ef122342fad901ed541850f30","e5823e9ef3fe4c75e46b37fac5f7f82278fd5cb6b1e6a791fe010a68b651d3fe","f77d8d1ab6ad60f1a483e27f7002998d1efec229e0f11f7192c7f0981869caba","70b1e7c1fa67009d985a39b6b8158a423c28b807d7c3c1fe42ce325ce64c7c7f","4c2c4f53e8eedd970f8afa369d7371544fb6231bf95e659f8602e09abe74d5a5",{"version":"32ddf2b046fa7269050f64a87f1f3d2db10b92ad6302460681915af1207b1222","affectsGlobalScope":true},"c2b5085f47e41d6940bbc5b0d3bd7cc0037c752efb18aecd243c9cf83ad0c0b7","3143a5add0467b83150961ecd33773b561a1207aec727002aa1d70333068eb1b","9b2a8f604e7c0482a9061755f00b287cc99bd8718dc82d8207dd74c599b6dc43","d0fc76a91c828fbe3f0be5d683273634b7b101068333ceed975a8a9ac464137b",{"version":"1a048ff164b8d9609f5de3139d4e37f6e8a82af82087ac414b9208f52ef8aac7","affectsGlobalScope":true},"3111079f3cb5f2b9c812ca3f46161562bce5bfb355e915f46ed46c41714dc1c3","50ae84dc0183f9f69b4d0933e240fb76cc77fddb2ec223dd070d12420b6ccfa6","b32b6b16cb0bda68199582ad6f22242d07ee75fac9b1f28a98cd838afc5eea45","4441ee4119824bfaebc49308559edd7545978f9cb41a40f115074e1031dde75f",{"version":"60693a88462d0e97900123b5bf7c73e146ce0cc94da46a61fe6775b430d2ff05","affectsGlobalScope":true},{"version":"588c69eda58b9202676ec7ca11a72c3762819b46a0ed72462c769846153c447c","affectsGlobalScope":true},"ae064ed4f855716b7ff348639ddcd6a6d354a72fae82f506608a7dc9266aa24c","8e63e656267f767e6c15b47776f641d30ef29690581ab9bdddff5b83885d1a43","53d2c24a3cbc00a88ebaf8ab8e1b6e206bc3a6647d544f877241684ea3d484e3","ecee890ff04b70d8e8815fb753c20f24f95203426267a577823d375009c1ace7","0ce99c641ea20b0c0c09d093fc28f18f5ab31dc80033707a1ac3154399de2559","7dc9ed91e245cf0c4f8add7f6845d0cb08cceec4408ce3398c51e1f6dd7679ec","44e42ed6ec9c4451ebe89524e80ac8564e9dd0988c56e6c58f393c810730595d","d79fda68cbfb361c4ee9cd9ea169babb65887534d64017726cd01f54783d20a5","1606ea615c0a5ea9f5c1376a33e34c0e1112e8dee31a5b3b8a74ce781893aa6f","9fef9de633d01cb7f01f68195626a890ededd25cf96a1e785617d08c8668230d","4455c78d226d061b1203c7614c6c6eb5f4f9db5f00d44ff47d0112de8766fbc4",{"version":"ec369bb9d97c4dc09dd2a4093b7ca3ba69ad284831fccac8a1977785e9e38ce5","affectsGlobalScope":true},"4465a636f5f6e9665a90e30691862c9e0a3ac2edc0e66296704f10865e924f2a","9af781f03d44f5635ed7844be0ce370d9d595d4b4ec67cad88f0fac03255257e","f9fd4c3ef6de27fa0e256f4e75b61711c4be05a3399f7714621d3edc832e36b0","e49290b7a927995c0d7e6b2b9c8296284b68a9036d9966531de65185269258d7","c3689f70ce7563c2299f2dcb3c72efdf6f87ae510e7456fa6223c767d0ca99fc","874ca809b79276460011480a2829f4c8d4db29416dd411f71efbf8f497f0ac09","6c903bceaf3f3bc04f2d4c7dcd89ce9fb148b3ba0a5f5408d8f6de2b7eecc7ea","c65a0eeb867ff5c41debade8e2e8e63ec5367172d121afa726a598111d348816","23a28f834a078986bbf58f4e3705956983ff81c3c2493f3db3e5f0e8a9507779","4febdf7f3ec92706c58e0b4e8159cd6de718284ef384260b07c9641c13fc70ce",{"version":"eabefc2999c1489cf870e0c85af908900462fa245822d9a4616780a1a129945d","affectsGlobalScope":true},"7335933d9f30dcfd2c4b6080a8b78e81912a7fcefb1dafccb67ca4cb4b3ac23d","a6bfe9de9adef749010c118104b071d14943802ff0614732b47ce4f1c3e383cd","4c3d0e10396646db4a1e917fb852077ee77ae62e512913bef9cccc2bb0f8bd0e","3b220849d58140dcc6718f5b52dcd29fdb79c45bc28f561cbd29eb1cac6cce13","0ee22fce41f7417a24c808d266e91b850629113c104713a35854393d55994beb","22d1b1d965baba05766613e2e6c753bb005d4386c448cafd72c309ba689e8c24",{"version":"2708349d5a11a5c2e5f3a0765259ebe7ee00cdcc8161cb9990cb4910328442a1","affectsGlobalScope":true},"79d679a1d56574cc5cef92be1f0e5e8fb4af62fb55933b236670a0e0a23c83f6","172f31b538f6e3f70c2d001d665d5a46c4b043f707ba822b4d906d59bd9c229d","799475c7b67b02267bd548418cd9a29a05c1f6484ae0a44dff74510374cbb585","9fb516ebe85470350609bb6bd3c38181bef2e64970aa2233391d5cb2bb096270","685fbeeffdff5e703820a6328ef0c7b693d398bf8d061e1050e20344f8ddf47a",{"version":"e22cfb48876b9e017713228a59f354252d90ffc251cdcb77ff57fd4588e486af","signature":"532b74f68ef9e17d08c309c304f409c38f70c9f5d8533f6d57650d9dc541211b"},{"version":"e0869401ab13b5c1daeea3e55839e18ffec9176d5f0bf25038ac2ef320a253ad","signature":"de429a055674fb946cf25c01b85a71a58060e3ed58ad82a1f71cdedc90561d7d","affectsGlobalScope":true},{"version":"2d20db218185855054aeda5219e0ced9b854a4aebec9abda84d2a6927242567b","signature":"cae3bd62a5a0289df6a004341314a4e1468ee6c20f6c372eb96d6909464164de"},{"version":"cbb0ca15b3b9c0894af730f4583c1da3351e4c09da091fa0407d6e274045f8ef","signature":"48e2a32b9ee1c34a7cddbc5315bb61826e122554f1bee1e0dc5475a01e579f8b"},"0d14fa22c41fdc7277e6f71473b20ebc07f40f00e38875142335d5b63cdfc9d2","d8aab31ba8e618cc3eea10b0945de81cb93b7e8150a013a482332263b9305322","462bccdf75fcafc1ae8c30400c9425e1a4681db5d605d1a0edb4f990a54d8094","5923d8facbac6ecf7c84739a5c701a57af94a6f6648d6229a6c768cf28f0f8cb","7adecb2c3238794c378d336a8182d4c3dd2c4fa6fa1785e2797a3db550edea62","dc12dc0e5aa06f4e1a7692149b78f89116af823b9e1f1e4eae140cd3e0e674e6","1bfc6565b90c8771615cd8cfcf9b36efc0275e5e83ac7d9181307e96eb495161","8a8a96898906f065f296665e411f51010b51372fa260d5373bf9f64356703190","7f82ef88bdb67d9a850dd1c7cd2d690f33e0f0acd208e3c9eba086f3670d4f73",{"version":"ccfd8774cd9b929f63ff7dcf657977eb0652e3547f1fcac1b3a1dc5db22d4d58","affectsGlobalScope":true}],"options":{"allowSyntheticDefaultImports":true,"composite":true,"declaration":true,"emitDecoratorMetadata":true,"esModuleInterop":true,"experimentalDecorators":true,"inlineSources":true,"module":1,"noImplicitAny":true,"noImplicitThis":true,"outDir":"./","rootDir":"../src","skipLibCheck":true,"sourceMap":true,"strictNullChecks":true,"target":4,"tsBuildInfoFile":"./.tsbuildinfo"},"fileIdsList":[[29],[29,30,31,32,33,49,50,51,52,53,54,55,56],[48],[48,50,52,53],[50,52],[31],[50,51],[101,180,190],[101,190,191,192,194],[181,186,189],[180],[78,185],[180,188],[68,78,101,180,191],[58,60],[58,60,61,65,66,67],[58,60,61,104,183],[58,60,67,183],[58,60,61],[35],[34,35,36,37,38,39,40,41,42,43,47],[41],[46],[85,88,89,90],[86,88],[88],[87],[44],[44,45],[57],[68],[48,68,70,71],[68,70],[57,63,69,70,71,72,73,74,75,76,77],[57,61],[58,59,61,68],[57,68],[61,66,67,68],[58,60,61,65],[57,78],[46,57],[57,62,78,79,80,81,101,106,175,176,177,178,179],[61,106],[79],[78],[57,79],[78,113],[67,106,112],[57,180],[78,118],[106,121],[78,130],[46,58,106,129,132],[78,136],[58,106,135,139,140,141,142,146,151],[107,108,109,110,114,115,116,117,119,122,123,124,125,126,131,133,134,137,152,154,155,158,159,162,164,172,173,174],[46,106,153],[106,157],[78,161],[106,160,163],[57,61,106,171],[57,65,68],[103,105],[101,102],[46,58,103,104],[57,67,68,78,79,80,101,135,178],[62,67,101,106,167,175,177],[58,60,67],[58,60,67,112],[58,60,61,166],[58,60,67,104,120],[58,60,61,67,127,128],[58,60,61,67,104,127,128,129],[58,60,61,67,129],[58,60,104,127,128,156],[58,60,127,128],[58,60,61,67,104,127,128,147,150,160],[58,60,61,67,127,128,147,150],[58,60,61,67,127,160],[58,60,61,65,66,67,68,104,166,167],[58,60,104,138],[58,60,67,135],[58,60,135],[58,60,61,104,135,140],[58,60,61,104,135],[58,60,143],[58,60,144],[58,60,61,104,135,145],[58,60,127,128,135,143,144,147,148,149,150],[58,60,102,127,128,147,148,150,165],[58,60,128],[58,60,102,127,147,148,149],[58,60,148],[83],[82,84,95,97,100],[91,92],[92,93,94],[86,91],[86,91,92],[96,98,99],[83,84,97],[86,95,96,98],[84],[251,256],[196],[198],[199,204],[200,208,209,216,225],[200,201,208,216],[202,232],[203,204,209,217],[204,225],[205,206,208,216],[206],[207,208],[208],[208,209,210,225,231],[209,210],[211,216,225,231],[208,209,211,212,216,225,228,231],[211,213,225,228,231],[196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238],[208,214],[215,231],[206,208,216,225],[217],[218],[198,219],[220,230],[221],[222],[208,223],[223,224,232,234],[208,225],[226],[227],[216,225,228],[229],[216,230],[222,231],[232],[225,233],[234],[235],[208,210,225,231,234,236],[225,237],[239,243],[211,239],[208,211,225,239,240,241,242],[249,252],[249,252,253,254],[251],[248,255],[250],[59],[208,239],[78,195,243,244],[244,246],[78,81,101,180],[195,244]],"referencedMap":[[30,1],[32,1],[57,2],[33,1],[49,3],[54,4],[55,5],[51,1],[50,6],[52,7],[56,7],[191,8],[195,9],[190,10],[181,11],[186,12],[189,13],[194,14],[187,15],[184,15],[193,16],[188,17],[185,18],[183,19],[182,15],[36,20],[48,21],[37,20],[40,20],[42,22],[43,20],[47,23],[91,24],[89,25],[90,26],[88,27],[45,28],[46,29],[63,30],[69,31],[72,32],[73,33],[78,34],[74,3],[75,35],[76,36],[70,37],[77,38],[67,15],[65,15],[66,39],[68,16],[64,15],[62,35],[79,40],[80,41],[180,42],[107,43],[108,44],[109,45],[110,46],[114,47],[115,48],[116,46],[117,49],[119,50],[122,51],[123,46],[124,44],[125,45],[126,46],[131,52],[133,53],[134,46],[137,54],[152,55],[175,56],[154,57],[155,46],[158,58],[159,49],[162,59],[164,60],[172,61],[173,44],[174,45],[176,62],[106,63],[103,64],[105,65],[179,66],[178,67],[143,15],[112,68],[113,69],[167,70],[104,15],[111,15],[170,15],[120,68],[121,71],[118,68],[129,72],[132,73],[130,74],[153,15],[157,75],[156,76],[163,77],[160,78],[161,79],[169,39],[171,80],[168,16],[61,15],[128,15],[127,15],[139,81],[138,15],[136,82],[140,83],[141,84],[135,19],[142,85],[144,86],[145,87],[146,88],[151,89],[166,90],[148,15],[102,15],[165,91],[150,92],[149,93],[147,15],[84,94],[101,95],[93,96],[95,97],[92,98],[94,99],[100,100],[98,101],[99,102],[97,103],[257,104],[196,105],[198,106],[199,107],[200,108],[201,109],[202,110],[203,111],[204,112],[205,113],[206,114],[207,115],[208,116],[209,117],[210,118],[211,119],[212,120],[213,121],[239,122],[214,123],[215,124],[216,125],[217,126],[218,127],[219,128],[220,129],[221,130],[222,131],[223,132],[224,133],[225,134],[226,135],[227,136],[228,137],[229,138],[230,139],[231,140],[232,141],[233,142],[234,143],[235,144],[236,145],[237,146],[242,147],[241,148],[243,149],[253,150],[255,151],[254,150],[252,152],[256,153],[251,154],[60,155],[240,156],[245,157],[247,158],[244,159],[246,160]],"exportedModulesMap":[[30,1],[32,1],[57,2],[33,1],[49,3],[54,4],[55,5],[51,1],[50,6],[52,7],[56,7],[191,8],[195,9],[190,10],[181,11],[186,12],[189,13],[194,14],[187,15],[184,15],[193,16],[188,17],[185,18],[183,19],[182,15],[36,20],[48,21],[37,20],[40,20],[42,22],[43,20],[47,23],[91,24],[89,25],[90,26],[88,27],[45,28],[46,29],[63,30],[69,31],[72,32],[73,33],[78,34],[74,3],[75,35],[76,36],[70,37],[77,38],[67,15],[65,15],[66,39],[68,16],[64,15],[62,35],[79,40],[80,41],[180,42],[107,43],[108,44],[109,45],[110,46],[114,47],[115,48],[116,46],[117,49],[119,50],[122,51],[123,46],[124,44],[125,45],[126,46],[131,52],[133,53],[134,46],[137,54],[152,55],[175,56],[154,57],[155,46],[158,58],[159,49],[162,59],[164,60],[172,61],[173,44],[174,45],[176,62],[106,63],[103,64],[105,65],[179,66],[178,67],[143,15],[112,68],[113,69],[167,70],[104,15],[111,15],[170,15],[120,68],[121,71],[118,68],[129,72],[132,73],[130,74],[153,15],[157,75],[156,76],[163,77],[160,78],[161,79],[169,39],[171,80],[168,16],[61,15],[128,15],[127,15],[139,81],[138,15],[136,82],[140,83],[141,84],[135,19],[142,85],[144,86],[145,87],[146,88],[151,89],[166,90],[148,15],[102,15],[165,91],[150,92],[149,93],[147,15],[84,94],[101,95],[93,96],[95,97],[92,98],[94,99],[100,100],[98,101],[99,102],[97,103],[257,104],[196,105],[198,106],[199,107],[200,108],[201,109],[202,110],[203,111],[204,112],[205,113],[206,114],[207,115],[208,116],[209,117],[210,118],[211,119],[212,120],[213,121],[239,122],[214,123],[215,124],[216,125],[217,126],[218,127],[219,128],[220,129],[221,130],[222,131],[223,132],[224,133],[225,134],[226,135],[227,136],[228,137],[229,138],[230,139],[231,140],[232,141],[233,142],[234,143],[235,144],[236,145],[237,146],[242,147],[241,148],[243,149],[253,150],[255,151],[254,150],[252,152],[256,153],[251,154],[60,155],[240,156],[245,157],[247,158],[244,159],[246,160]],"semanticDiagnosticsPerFile":[30,31,32,57,33,49,29,54,55,51,50,52,56,53,191,192,195,190,181,186,189,194,187,184,193,188,185,183,182,34,35,36,48,37,38,39,40,42,41,43,47,87,85,91,89,90,88,45,46,44,63,69,72,73,78,74,75,76,70,77,71,67,65,66,68,64,62,79,80,180,81,107,108,109,110,114,115,116,117,119,122,123,124,125,126,131,133,134,137,152,175,154,155,158,159,162,164,172,173,174,176,106,103,105,177,179,178,143,112,113,167,104,111,170,120,121,118,129,132,130,153,157,156,163,160,161,169,171,168,61,128,127,139,138,136,140,141,135,142,144,145,146,151,166,148,102,165,150,149,147,82,84,101,93,95,92,94,100,96,98,99,97,257,58,196,198,199,200,201,202,203,204,205,206,207,208,209,210,197,238,211,212,213,239,214,215,216,217,218,219,220,221,222,223,224,225,226,227,228,229,230,231,232,233,234,235,236,237,242,241,243,248,249,253,255,254,252,256,251,250,59,60,83,240,86,245,247,244,246,7,6,2,8,9,10,11,12,13,14,15,3,4,19,16,17,18,20,21,22,5,23,24,25,26,27,1,28]},"version":"4.7.4"} \ No newline at end of file diff --git a/docker/types-cosmos/dist/global.d.ts b/docker/types-cosmos/dist/global.d.ts new file mode 100644 index 000000000..efb16de9b --- /dev/null +++ b/docker/types-cosmos/dist/global.d.ts @@ -0,0 +1,12 @@ +import type { CosmWasmClient } from '@cosmjs/cosmwasm-stargate'; +import type { Registry } from '@cosmjs/proto-signing'; +import type Pino from 'pino'; +import { Store, DynamicDatasourceCreator } from './interfaces'; +declare global { + const apiUnsafe: CosmWasmClient; + const api: CosmWasmClient; + const logger: Pino.Logger; + const store: Store; + const createDynamicDatasource: DynamicDatasourceCreator; + const registry: Registry; +} diff --git a/docker/types-cosmos/dist/global.js b/docker/types-cosmos/dist/global.js new file mode 100644 index 000000000..4e9c8a838 --- /dev/null +++ b/docker/types-cosmos/dist/global.js @@ -0,0 +1,5 @@ +"use strict"; +// Copyright 2020-2022 OnFinality Limited authors & contributors +// SPDX-License-Identifier: Apache-2.0 +Object.defineProperty(exports, "__esModule", { value: true }); +//# sourceMappingURL=global.js.map \ No newline at end of file diff --git a/docker/types-cosmos/dist/global.js.map b/docker/types-cosmos/dist/global.js.map new file mode 100644 index 000000000..6985b9266 --- /dev/null +++ b/docker/types-cosmos/dist/global.js.map @@ -0,0 +1 @@ +{"version":3,"file":"global.js","sourceRoot":"","sources":["../src/global.ts"],"names":[],"mappings":";AAAA,gEAAgE;AAChE,sCAAsC","sourcesContent":["// Copyright 2020-2022 OnFinality Limited authors & contributors\n// SPDX-License-Identifier: Apache-2.0\n\nimport type {CosmWasmClient} from '@cosmjs/cosmwasm-stargate';\nimport type {Registry} from '@cosmjs/proto-signing';\nimport type Pino from 'pino';\nimport {Store, DynamicDatasourceCreator} from './interfaces';\n\ndeclare global {\n const apiUnsafe: CosmWasmClient; //requires --unsafe flag to be defined\n const api: CosmWasmClient;\n const logger: Pino.Logger;\n const store: Store;\n const createDynamicDatasource: DynamicDatasourceCreator;\n const registry: Registry;\n}\n"]} \ No newline at end of file diff --git a/docker/types-cosmos/dist/index.d.ts b/docker/types-cosmos/dist/index.d.ts new file mode 100644 index 000000000..61acde2e2 --- /dev/null +++ b/docker/types-cosmos/dist/index.d.ts @@ -0,0 +1,2 @@ +export * from './interfaces'; +export * from './project'; diff --git a/docker/types-cosmos/dist/index.js b/docker/types-cosmos/dist/index.js new file mode 100644 index 000000000..96b62ade0 --- /dev/null +++ b/docker/types-cosmos/dist/index.js @@ -0,0 +1,21 @@ +"use strict"; +// Copyright 2020-2022 OnFinality Limited authors & contributors +// SPDX-License-Identifier: Apache-2.0 +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __exportStar = (this && this.__exportStar) || function(m, exports) { + for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); +}; +Object.defineProperty(exports, "__esModule", { value: true }); +__exportStar(require("./interfaces"), exports); +__exportStar(require("./project"), exports); +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/docker/types-cosmos/dist/index.js.map b/docker/types-cosmos/dist/index.js.map new file mode 100644 index 000000000..be71cb3ea --- /dev/null +++ b/docker/types-cosmos/dist/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAAA,gEAAgE;AAChE,sCAAsC;;;;;;;;;;;;;;;;AAEtC,+CAA6B;AAC7B,4CAA0B","sourcesContent":["// Copyright 2020-2022 OnFinality Limited authors & contributors\n// SPDX-License-Identifier: Apache-2.0\n\nexport * from './interfaces';\nexport * from './project';\n"]} \ No newline at end of file diff --git a/docker/types-cosmos/dist/interfaces.d.ts b/docker/types-cosmos/dist/interfaces.d.ts new file mode 100644 index 000000000..60da5d432 --- /dev/null +++ b/docker/types-cosmos/dist/interfaces.d.ts @@ -0,0 +1,48 @@ +import { DecodedTxRaw } from '@cosmjs/proto-signing'; +import { Block } from '@cosmjs/stargate'; +import { Event, Log } from '@cosmjs/stargate/build/logs'; +import { TxData } from '@cosmjs/tendermint-rpc'; +export interface Entity { + id: string; +} +export declare type FunctionPropertyNames = { + [K in keyof T]: T[K] extends Function ? K : never; +}[keyof T]; +export interface Store { + selectRaw(query: string): Promise[]>; + get(entity: string, id: string): Promise; + getByField(entity: string, field: string, value: any): Promise; + getOneByField(entity: string, field: string, value: any): Promise; + set(entity: string, id: string, data: Entity): Promise; + bulkCreate(entity: string, data: Entity[]): Promise; + remove(entity: string, id: string): Promise; +} +export interface CosmosBlock { + block: Block; + txs: TxData[]; +} +export interface CosmosTransaction { + idx: number; + block: CosmosBlock; + hash: string; + tx: TxData; + decodedTx: DecodedTxRaw; +} +export interface CosmosMessage { + idx: number; + block: CosmosBlock; + tx: CosmosTransaction; + msg: { + typeUrl: string; + decodedMsg: T; + }; +} +export interface CosmosEvent { + idx: number; + block: CosmosBlock; + tx: CosmosTransaction; + msg: CosmosMessage; + log: Log; + event: Event; +} +export declare type DynamicDatasourceCreator = (name: string, args: Record) => Promise; diff --git a/docker/types-cosmos/dist/interfaces.js b/docker/types-cosmos/dist/interfaces.js new file mode 100644 index 000000000..8e46776de --- /dev/null +++ b/docker/types-cosmos/dist/interfaces.js @@ -0,0 +1,5 @@ +"use strict"; +// Copyright 2020-2022 OnFinality Limited authors & contributors +// SPDX-License-Identifier: Apache-2.0 +Object.defineProperty(exports, "__esModule", { value: true }); +//# sourceMappingURL=interfaces.js.map \ No newline at end of file diff --git a/docker/types-cosmos/dist/interfaces.js.map b/docker/types-cosmos/dist/interfaces.js.map new file mode 100644 index 000000000..d19ba5981 --- /dev/null +++ b/docker/types-cosmos/dist/interfaces.js.map @@ -0,0 +1 @@ +{"version":3,"file":"interfaces.js","sourceRoot":"","sources":["../src/interfaces.ts"],"names":[],"mappings":";AAAA,gEAAgE;AAChE,sCAAsC","sourcesContent":["// Copyright 2020-2022 OnFinality Limited authors & contributors\n// SPDX-License-Identifier: Apache-2.0\n\nimport {DecodedTxRaw} from '@cosmjs/proto-signing';\nimport {Block} from '@cosmjs/stargate';\nimport {Event, Log} from '@cosmjs/stargate/build/logs';\nimport {TxData} from '@cosmjs/tendermint-rpc';\nexport interface Entity {\n id: string;\n}\n\nexport type FunctionPropertyNames = {\n [K in keyof T]: T[K] extends Function ? K : never;\n}[keyof T];\n\nexport interface Store {\n get(entity: string, id: string): Promise;\n getByField(entity: string, field: string, value: any): Promise;\n getOneByField(entity: string, field: string, value: any): Promise;\n set(entity: string, id: string, data: Entity): Promise;\n bulkCreate(entity: string, data: Entity[]): Promise;\n remove(entity: string, id: string): Promise;\n}\n\nexport interface CosmosBlock {\n block: Block;\n txs: TxData[];\n}\n\nexport interface CosmosTransaction {\n idx: number;\n block: CosmosBlock;\n hash: string;\n tx: TxData;\n decodedTx: DecodedTxRaw;\n}\n\nexport interface CosmosMessage {\n idx: number;\n block: CosmosBlock;\n tx: CosmosTransaction;\n msg: {\n typeUrl: string;\n decodedMsg: T;\n };\n}\n\nexport interface CosmosEvent {\n idx: number;\n block: CosmosBlock;\n tx: CosmosTransaction;\n msg: CosmosMessage;\n log: Log;\n event: Event;\n}\n\nexport type DynamicDatasourceCreator = (name: string, args: Record) => Promise;\n"]} \ No newline at end of file diff --git a/docker/types-cosmos/dist/project.d.ts b/docker/types-cosmos/dist/project.d.ts new file mode 100644 index 000000000..dfa39b764 --- /dev/null +++ b/docker/types-cosmos/dist/project.d.ts @@ -0,0 +1,160 @@ +import { CosmWasmClient } from '@cosmjs/cosmwasm-stargate'; +import { CosmosBlock, CosmosTransaction, CosmosMessage, CosmosEvent } from './interfaces'; +export interface FileReference { + file: string; +} +export interface CustomModule { + file: string; + messages: string[]; +} +export declare type CustomDataSourceAsset = FileReference; +export declare type Processor = FileReference & { + options?: O; +}; +export declare enum SubqlCosmosDatasourceKind { + Runtime = "cosmos/Runtime", + Custom = "cosmos/Custom" +} +export declare enum SubqlCosmosHandlerKind { + Block = "cosmos/BlockHandler", + Transaction = "cosmos/TransactionHandler", + Message = "cosmos/MessageHandler", + Event = "cosmos/EventHandler" +} +export declare type CosmosRuntimeHandlerInputMap = { + [SubqlCosmosHandlerKind.Block]: CosmosBlock; + [SubqlCosmosHandlerKind.Transaction]: CosmosTransaction; + [SubqlCosmosHandlerKind.Message]: CosmosMessage; + [SubqlCosmosHandlerKind.Event]: CosmosEvent; +}; +declare type CosmosRuntimeFilterMap = { + [SubqlCosmosHandlerKind.Block]: {}; + [SubqlCosmosHandlerKind.Transaction]: {}; + [SubqlCosmosHandlerKind.Message]: SubqlCosmosMessageFilter; + [SubqlCosmosHandlerKind.Event]: SubqlCosmosEventFilter; +}; +export interface CosmosProjectManifest { + specVersion: string; + description: string; + repository: string; + schema: { + file: string; + }; + network: CosmosNetwork; + dataSources: SubqlCosmosDatasource[]; +} +export interface CosmosNetwork { + genesisHash: string; + endpoint: string; + chainId: string; + chainTypes?: Map; +} +export interface SubqlCosmosMessageFilter { + type: string; + contractCall?: string; + values?: { + [key: string]: string; + }; +} +export interface SubqlCosmosEventFilter { + type: string; + messageFilter?: SubqlCosmosMessageFilter; +} +export declare type SubqlCosmosHandlerFilter = SubqlCosmosEventFilter | SubqlCosmosMessageFilter; +export interface SubqlCosmosBlockHandler { + handler: string; + kind: SubqlCosmosHandlerKind.Block; + filter?: undefined; +} +export interface SubqlCosmosTransactionHandler { + handler: string; + kind: SubqlCosmosHandlerKind.Transaction; + filter?: undefined; +} +export interface SubqlCosmosMessageHandler { + handler: string; + kind: SubqlCosmosHandlerKind.Message; + filter?: SubqlCosmosMessageFilter; +} +export interface SubqlCosmosEventHandler { + handler: string; + kind: SubqlCosmosHandlerKind.Event; + filter?: SubqlCosmosEventFilter; +} +export interface SubqlCosmosCustomHandler> { + handler: string; + kind: K; + filter?: F; +} +export declare type SubqlCosmosRuntimeHandler = SubqlCosmosBlockHandler | SubqlCosmosTransactionHandler | SubqlCosmosMessageHandler | SubqlCosmosEventHandler; +export declare type SubqlCosmosHandler = SubqlCosmosRuntimeHandler | SubqlCosmosCustomHandler; +export interface SubqlCosmosMapping { + file: string; + handlers: T[]; +} +interface ISubqlCosmosDatasource { + name?: string; + kind: string; + startBlock?: number; + mapping: M; +} +export interface SubqlCosmosRuntimeDatasource = SubqlCosmosMapping> extends ISubqlCosmosDatasource { + kind: SubqlCosmosDatasourceKind.Runtime; +} +export declare type SubqlCosmosDatasource = SubqlCosmosRuntimeDatasource | SubqlCosmosCustomDatasource; +export declare type CustomCosmosDataSourceAsset = FileReference; +export interface SubqlCosmosCustomDatasource, O = any> extends ISubqlCosmosDatasource { + kind: K; + assets: Map; + processor?: Processor; +} +export interface HandlerInputTransformer_0_0_0 { + (input: CosmosRuntimeHandlerInputMap[T], ds: DS, api: CosmWasmClient, assets?: Record): Promise; +} +export interface HandlerInputTransformer_1_0_0 { + (params: { + input: CosmosRuntimeHandlerInputMap[T]; + ds: DS; + filter?: F; + api: CosmWasmClient; + assets?: Record; + }): Promise; +} +export declare type SecondLayerHandlerProcessorArray = SubqlCosmosCustomDatasource> = SecondLayerHandlerProcessor | SecondLayerHandlerProcessor | SecondLayerHandlerProcessor | SecondLayerHandlerProcessor; +export interface SubqlCosmosDatasourceProcessor = SubqlCosmosCustomDatasource, P extends Record> = Record>> { + kind: K; + validate(ds: DS, assets: Record): void; + dsFilterProcessor(ds: DS, api: CosmWasmClient): boolean; + handlerProcessors: P; +} +export interface DictionaryQueryCondition { + field: string; + value: string | Record | Array>; + matcher?: string; +} +export interface DictionaryQueryEntry { + entity: string; + conditions: DictionaryQueryCondition[]; +} +interface SecondLayerHandlerProcessorBase { + baseHandlerKind: K; + baseFilter: CosmosRuntimeFilterMap[K] | CosmosRuntimeFilterMap[K][]; + filterValidator: (filter?: F) => void; + dictionaryQuery?: (filter: F, ds: DS) => DictionaryQueryEntry | undefined; +} +export interface SecondLayerHandlerProcessor_0_0_0 extends SecondLayerHandlerProcessorBase { + specVersion: undefined; + transformer: HandlerInputTransformer_0_0_0; + filterProcessor: (filter: F | undefined, input: CosmosRuntimeHandlerInputMap[K], ds: DS) => boolean; +} +export interface SecondLayerHandlerProcessor_1_0_0 extends SecondLayerHandlerProcessorBase { + specVersion: '1.0.0'; + transformer: HandlerInputTransformer_1_0_0; + filterProcessor: (params: { + filter: F | undefined; + input: CosmosRuntimeHandlerInputMap[K]; + ds: DS; + }) => boolean; +} +export declare type SecondLayerHandlerProcessor = SecondLayerHandlerProcessor_0_0_0 | SecondLayerHandlerProcessor_1_0_0; +export {}; diff --git a/docker/types-cosmos/dist/project.js b/docker/types-cosmos/dist/project.js new file mode 100644 index 000000000..18ae24fcc --- /dev/null +++ b/docker/types-cosmos/dist/project.js @@ -0,0 +1,18 @@ +"use strict"; +// Copyright 2020-2022 OnFinality Limited authors & contributors +// SPDX-License-Identifier: Apache-2.0 +Object.defineProperty(exports, "__esModule", { value: true }); +exports.SubqlCosmosHandlerKind = exports.SubqlCosmosDatasourceKind = void 0; +var SubqlCosmosDatasourceKind; +(function (SubqlCosmosDatasourceKind) { + SubqlCosmosDatasourceKind["Runtime"] = "cosmos/Runtime"; + SubqlCosmosDatasourceKind["Custom"] = "cosmos/Custom"; +})(SubqlCosmosDatasourceKind = exports.SubqlCosmosDatasourceKind || (exports.SubqlCosmosDatasourceKind = {})); +var SubqlCosmosHandlerKind; +(function (SubqlCosmosHandlerKind) { + SubqlCosmosHandlerKind["Block"] = "cosmos/BlockHandler"; + SubqlCosmosHandlerKind["Transaction"] = "cosmos/TransactionHandler"; + SubqlCosmosHandlerKind["Message"] = "cosmos/MessageHandler"; + SubqlCosmosHandlerKind["Event"] = "cosmos/EventHandler"; +})(SubqlCosmosHandlerKind = exports.SubqlCosmosHandlerKind || (exports.SubqlCosmosHandlerKind = {})); +//# sourceMappingURL=project.js.map \ No newline at end of file diff --git a/docker/types-cosmos/dist/project.js.map b/docker/types-cosmos/dist/project.js.map new file mode 100644 index 000000000..d38095292 --- /dev/null +++ b/docker/types-cosmos/dist/project.js.map @@ -0,0 +1 @@ +{"version":3,"file":"project.js","sourceRoot":"","sources":["../src/project.ts"],"names":[],"mappings":";AAAA,gEAAgE;AAChE,sCAAsC;;;AAkBtC,IAAY,yBAGX;AAHD,WAAY,yBAAyB;IACnC,uDAA0B,CAAA;IAC1B,qDAAwB,CAAA;AAC1B,CAAC,EAHW,yBAAyB,GAAzB,iCAAyB,KAAzB,iCAAyB,QAGpC;AAED,IAAY,sBAKX;AALD,WAAY,sBAAsB;IAChC,uDAA6B,CAAA;IAC7B,mEAAyC,CAAA;IACzC,2DAAiC,CAAA;IACjC,uDAA6B,CAAA;AAC/B,CAAC,EALW,sBAAsB,GAAtB,8BAAsB,KAAtB,8BAAsB,QAKjC","sourcesContent":["// Copyright 2020-2022 OnFinality Limited authors & contributors\n// SPDX-License-Identifier: Apache-2.0\n\nimport {CosmWasmClient} from '@cosmjs/cosmwasm-stargate';\nimport {CosmosBlock, CosmosTransaction, CosmosMessage, CosmosEvent} from './interfaces';\n\nexport interface FileReference {\n file: string;\n}\n\nexport interface CustomModule {\n file: string;\n messages: string[];\n}\n\nexport type CustomDataSourceAsset = FileReference;\n\nexport type Processor = FileReference & {options?: O};\n\nexport enum SubqlCosmosDatasourceKind {\n Runtime = 'cosmos/Runtime',\n Custom = 'cosmos/Custom',\n}\n\nexport enum SubqlCosmosHandlerKind {\n Block = 'cosmos/BlockHandler',\n Transaction = 'cosmos/TransactionHandler',\n Message = 'cosmos/MessageHandler',\n Event = 'cosmos/EventHandler',\n}\n\nexport type CosmosRuntimeHandlerInputMap = {\n [SubqlCosmosHandlerKind.Block]: CosmosBlock;\n [SubqlCosmosHandlerKind.Transaction]: CosmosTransaction;\n [SubqlCosmosHandlerKind.Message]: CosmosMessage;\n [SubqlCosmosHandlerKind.Event]: CosmosEvent;\n};\n\ntype CosmosRuntimeFilterMap = {\n [SubqlCosmosHandlerKind.Block]: {};\n [SubqlCosmosHandlerKind.Transaction]: {};\n [SubqlCosmosHandlerKind.Message]: SubqlCosmosMessageFilter;\n [SubqlCosmosHandlerKind.Event]: SubqlCosmosEventFilter;\n};\n\nexport interface CosmosProjectManifest {\n specVersion: string;\n description: string;\n repository: string;\n\n schema: {\n file: string;\n };\n\n network: CosmosNetwork;\n\n dataSources: SubqlCosmosDatasource[];\n}\n\nexport interface CosmosNetwork {\n genesisHash: string;\n endpoint: string;\n chainId: string;\n chainTypes?: Map;\n}\n\nexport interface SubqlCosmosMessageFilter {\n type: string;\n contractCall?: string;\n values?: {\n [key: string]: string;\n };\n}\n\nexport interface SubqlCosmosEventFilter {\n type: string;\n messageFilter?: SubqlCosmosMessageFilter;\n}\n\nexport type SubqlCosmosHandlerFilter = SubqlCosmosEventFilter | SubqlCosmosMessageFilter;\n\nexport interface SubqlCosmosBlockHandler {\n handler: string;\n kind: SubqlCosmosHandlerKind.Block;\n filter?: undefined;\n}\n\nexport interface SubqlCosmosTransactionHandler {\n handler: string;\n kind: SubqlCosmosHandlerKind.Transaction;\n filter?: undefined;\n}\n\nexport interface SubqlCosmosMessageHandler {\n handler: string;\n kind: SubqlCosmosHandlerKind.Message;\n filter?: SubqlCosmosMessageFilter;\n}\n\nexport interface SubqlCosmosEventHandler {\n handler: string;\n kind: SubqlCosmosHandlerKind.Event;\n filter?: SubqlCosmosEventFilter;\n}\n\nexport interface SubqlCosmosCustomHandler> {\n handler: string;\n kind: K;\n filter?: F;\n}\n\nexport type SubqlCosmosRuntimeHandler =\n | SubqlCosmosBlockHandler\n | SubqlCosmosTransactionHandler\n | SubqlCosmosMessageHandler\n | SubqlCosmosEventHandler;\n\nexport type SubqlCosmosHandler = SubqlCosmosRuntimeHandler | SubqlCosmosCustomHandler;\n\nexport interface SubqlCosmosMapping {\n file: string;\n handlers: T[];\n}\n\ninterface ISubqlCosmosDatasource {\n name?: string;\n kind: string;\n startBlock?: number;\n mapping: M;\n}\n\nexport interface SubqlCosmosRuntimeDatasource<\n M extends SubqlCosmosMapping = SubqlCosmosMapping\n> extends ISubqlCosmosDatasource {\n kind: SubqlCosmosDatasourceKind.Runtime;\n}\n\nexport type SubqlCosmosDatasource = SubqlCosmosRuntimeDatasource | SubqlCosmosCustomDatasource;\n\nexport type CustomCosmosDataSourceAsset = FileReference;\n\nexport interface SubqlCosmosCustomDatasource<\n K extends string = string,\n M extends SubqlCosmosMapping = SubqlCosmosMapping,\n O = any\n> extends ISubqlCosmosDatasource {\n kind: K;\n assets: Map;\n processor?: Processor;\n}\n\nexport interface HandlerInputTransformer_0_0_0<\n T extends SubqlCosmosHandlerKind,\n E,\n DS extends SubqlCosmosCustomDatasource = SubqlCosmosCustomDatasource\n> {\n (input: CosmosRuntimeHandlerInputMap[T], ds: DS, api: CosmWasmClient, assets?: Record): Promise; // | SubstrateBuiltinDataSource\n}\n\nexport interface HandlerInputTransformer_1_0_0<\n T extends SubqlCosmosHandlerKind,\n F,\n E,\n DS extends SubqlCosmosCustomDatasource = SubqlCosmosCustomDatasource\n> {\n (params: {\n input: CosmosRuntimeHandlerInputMap[T];\n ds: DS;\n filter?: F;\n api: CosmWasmClient;\n assets?: Record;\n }): Promise; // | SubstrateBuiltinDataSource\n}\n\nexport type SecondLayerHandlerProcessorArray<\n K extends string,\n F,\n T,\n DS extends SubqlCosmosCustomDatasource = SubqlCosmosCustomDatasource\n> =\n | SecondLayerHandlerProcessor\n | SecondLayerHandlerProcessor\n | SecondLayerHandlerProcessor\n | SecondLayerHandlerProcessor;\n\nexport interface SubqlCosmosDatasourceProcessor<\n K extends string,\n F,\n DS extends SubqlCosmosCustomDatasource = SubqlCosmosCustomDatasource,\n P extends Record> = Record<\n string,\n SecondLayerHandlerProcessorArray\n >\n> {\n kind: K;\n validate(ds: DS, assets: Record): void;\n dsFilterProcessor(ds: DS, api: CosmWasmClient): boolean;\n handlerProcessors: P;\n}\n\nexport interface DictionaryQueryCondition {\n field: string;\n value: string | Record | Array>;\n matcher?: string; // defaults to \"equalTo\", use \"contains\" for JSON\n}\n\nexport interface DictionaryQueryEntry {\n entity: string;\n conditions: DictionaryQueryCondition[];\n}\n\ninterface SecondLayerHandlerProcessorBase<\n K extends SubqlCosmosHandlerKind,\n F,\n DS extends SubqlCosmosCustomDatasource = SubqlCosmosCustomDatasource\n> {\n baseHandlerKind: K;\n baseFilter: CosmosRuntimeFilterMap[K] | CosmosRuntimeFilterMap[K][];\n filterValidator: (filter?: F) => void;\n dictionaryQuery?: (filter: F, ds: DS) => DictionaryQueryEntry | undefined;\n}\n\nexport interface SecondLayerHandlerProcessor_0_0_0<\n K extends SubqlCosmosHandlerKind,\n F,\n E,\n DS extends SubqlCosmosCustomDatasource = SubqlCosmosCustomDatasource\n> extends SecondLayerHandlerProcessorBase {\n specVersion: undefined;\n transformer: HandlerInputTransformer_0_0_0;\n filterProcessor: (filter: F | undefined, input: CosmosRuntimeHandlerInputMap[K], ds: DS) => boolean;\n}\n\nexport interface SecondLayerHandlerProcessor_1_0_0<\n K extends SubqlCosmosHandlerKind,\n F,\n E,\n DS extends SubqlCosmosCustomDatasource = SubqlCosmosCustomDatasource\n> extends SecondLayerHandlerProcessorBase {\n specVersion: '1.0.0';\n transformer: HandlerInputTransformer_1_0_0;\n filterProcessor: (params: {filter: F | undefined; input: CosmosRuntimeHandlerInputMap[K]; ds: DS}) => boolean;\n}\n\nexport type SecondLayerHandlerProcessor<\n K extends SubqlCosmosHandlerKind,\n F,\n E,\n DS extends SubqlCosmosCustomDatasource = SubqlCosmosCustomDatasource\n> = SecondLayerHandlerProcessor_0_0_0 | SecondLayerHandlerProcessor_1_0_0;\n"]} \ No newline at end of file diff --git a/docker/types-cosmos/package.json b/docker/types-cosmos/package.json new file mode 100644 index 000000000..0b2c4d7b7 --- /dev/null +++ b/docker/types-cosmos/package.json @@ -0,0 +1,26 @@ +{ + "name": "@subql/types-cosmos", + "version": "0.1.2-0", + "description": "", + "homepage": "https://github.com/subquery/subql", + "repository": "github:subquery/subql", + "scripts": { + "test": "echo \"Error: no test specified\" && exit 1", + "build": "rm -rf dist && tsc -b" + }, + "author": "Naveen Veluswamy", + "main": "dist/index.js", + "license": "Apache-2.0", + "files": [ + "/dist" + ], + "dependencies": { + "@cosmjs/cosmwasm-stargate": "^0.28.9", + "@cosmjs/proto-signing": "^0.28.9", + "@cosmjs/stargate": "^0.28.9" + }, + "devDependencies": { + "@types/app-module-path": "^2.2.0" + }, + "stableVersion": "0.1.1" +} \ No newline at end of file diff --git a/migrations/committed/000010.sql b/migrations/committed/000010.sql new file mode 100644 index 000000000..ba2efed9d --- /dev/null +++ b/migrations/committed/000010.sql @@ -0,0 +1,98 @@ +--! Previous: sha1:914d20d8e81f79b1e98e114302e6e48534463c27 +--! Hash: sha1:12fcbbff828973e1619ec9fee35008f99e747cf2 + +CREATE SCHEMA IF NOT EXISTS app; +SET SCHEMA 'app'; + +ALTER TABLE IF EXISTS ONLY app.almanac_resolutions DROP CONSTRAINT IF EXISTS almanac_resolutions_record_id_fkey; +ALTER TABLE IF EXISTS ONLY app.almanac_resolutions DROP CONSTRAINT IF EXISTS almanac_resolutions_contract_id_fkey; +ALTER TABLE IF EXISTS ONLY app.almanac_resolutions DROP CONSTRAINT IF EXISTS almanac_resolutions_agent_id_fkey; +DROP INDEX IF EXISTS app.almanac_resolutions_record_id; +DROP INDEX IF EXISTS app.almanac_resolutions_contract_id; +DROP INDEX IF EXISTS app.almanac_resolutions_agent_id; +ALTER TABLE IF EXISTS ONLY app.almanac_resolutions DROP CONSTRAINT IF EXISTS almanac_resolutions_pkey; +DROP TABLE IF EXISTS app.almanac_resolutions; +SET default_tablespace = ''; + +SET default_table_access_method = heap; + +-- +-- Name: almanac_resolutions; Type: TABLE; Schema: app; Owner: subquery +-- + +CREATE TABLE app.almanac_resolutions ( + id text NOT NULL, + agent_id text NOT NULL, + contract_id text NOT NULL, + record_id text NOT NULL +); + + +ALTER TABLE app.almanac_resolutions OWNER TO subquery; + +-- +-- Name: almanac_resolutions almanac_resolutions_pkey; Type: CONSTRAINT; Schema: app; Owner: subquery +-- + +ALTER TABLE ONLY app.almanac_resolutions + ADD CONSTRAINT almanac_resolutions_pkey PRIMARY KEY (id); + + +-- +-- Name: almanac_resolutions_agent_id; Type: INDEX; Schema: app; Owner: subquery +-- + +CREATE INDEX almanac_resolutions_agent_id ON app.almanac_resolutions USING hash (agent_id); + + +-- +-- Name: almanac_resolutions_contract_id; Type: INDEX; Schema: app; Owner: subquery +-- + +CREATE INDEX almanac_resolutions_contract_id ON app.almanac_resolutions USING hash (contract_id); + + +-- +-- Name: almanac_resolutions_record_id; Type: INDEX; Schema: app; Owner: subquery +-- + +CREATE INDEX almanac_resolutions_record_id ON app.almanac_resolutions USING hash (record_id); + + +-- +-- Name: almanac_resolutions almanac_resolutions_agent_id_fkey; Type: FK CONSTRAINT; Schema: app; Owner: subquery +-- + +ALTER TABLE ONLY app.almanac_resolutions + ADD CONSTRAINT almanac_resolutions_agent_id_fkey FOREIGN KEY (agent_id) REFERENCES app.agents(id) ON UPDATE CASCADE; + + +-- +-- Name: almanac_resolutions almanac_resolutions_contract_id_fkey; Type: FK CONSTRAINT; Schema: app; Owner: subquery +-- + +ALTER TABLE ONLY app.almanac_resolutions + ADD CONSTRAINT almanac_resolutions_contract_id_fkey FOREIGN KEY (contract_id) REFERENCES app.contracts(id) ON UPDATE CASCADE; + + +-- +-- Name: almanac_resolutions almanac_resolutions_record_id_fkey; Type: FK CONSTRAINT; Schema: app; Owner: subquery +-- + +ALTER TABLE ONLY app.almanac_resolutions + ADD CONSTRAINT almanac_resolutions_record_id_fkey FOREIGN KEY (record_id) REFERENCES app.almanac_records(id) ON UPDATE CASCADE; + + +-- +-- PostgreSQL database dump complete +-- + + +INSERT INTO app.almanac_resolutions (id, agent_id, contract_id, record_id) +SELECT reg.id, reg.agent_id, reg.contract_id, reg.record_id +FROM app.almanac_registrations reg +WHERE reg.expiry_height > ( + SELECT b.height FROM app.blocks b + ORDER BY b.height + LIMIT 1 + ); diff --git a/schema.graphql b/schema.graphql index bf3276f25..3a7bc3622 100644 --- a/schema.graphql +++ b/schema.graphql @@ -192,6 +192,13 @@ type AlmanacRecord @entity { block: Block! } +type AlmanacResolution @entity { + id: ID! + agent: Agent! + contract: Contract! + record: AlmanacRecord! +} + type AlmanacRegistration @entity { id: ID! expiryHeight: BigInt! @index @@ -253,6 +260,7 @@ enum Interface { Uncertain, CW20, LegacyBridgeSwap, + MicroAgentAlmanac, } enum AccessType { diff --git a/src/genesis/helpers/field_enums.py b/src/genesis/helpers/field_enums.py index c4929a735..41b64581d 100644 --- a/src/genesis/helpers/field_enums.py +++ b/src/genesis/helpers/field_enums.py @@ -324,23 +324,35 @@ class AlmanacRegistrations(NamedFields): signature = 2 sequence = 3 agent_id = 4 - record_id = 5 - transaction_id = 6 - block_id = 7 - # event_id = 8 - # record_id = 9 + contract_id = 5 + record_id = 6 + transaction_id = 7 + block_id = 8 + # event_id = 9 + # record_id = 10 @classmethod def get_table(self): return "almanac_registrations" +class AlmanacResolutions(NamedFields): + id = 0 + agent_id = 1 + contract_id = 2 + record_id = 3 + + @classmethod + def get_table(self): + return "almanac_resolutions" + + class AlmanacRecords(NamedFields): id = 0 service = 1 transaction_id = 2 block_id = 3 - # event_id = 4 + # event_id = 4 @classmethod def get_table(self): diff --git a/src/mappings/almanac/registrations.ts b/src/mappings/almanac/registrations.ts index 6cd54db15..78602baa7 100644 --- a/src/mappings/almanac/registrations.ts +++ b/src/mappings/almanac/registrations.ts @@ -7,6 +7,7 @@ import { } from "../utils"; import {CosmosEvent} from "@subql/types-cosmos"; import {Agent, AlmanacRecord, AlmanacRegistration, Contract} from "../../types"; +import {cacheAlmanacResolution} from "./resolutions"; export async function handleAlmanacRegistration(event: CosmosEvent): Promise { await attemptHandling(event, _handleAlmanacRegistration, unprocessedEventHandler); @@ -107,4 +108,5 @@ async function _handleAlmanacRegistration(event: CosmosEvent): Promise { blockId: event.block.block.id, }); await registrationEntity.save(); + await cacheAlmanacResolution(_contract_address, agent_address, recordEntity); } diff --git a/src/mappings/almanac/resolutions.ts b/src/mappings/almanac/resolutions.ts new file mode 100644 index 000000000..05c9067a3 --- /dev/null +++ b/src/mappings/almanac/resolutions.ts @@ -0,0 +1,40 @@ +import {AlmanacRecord, AlmanacResolution, Contract, Interface,} from "../../types"; + +export async function cacheAlmanacResolution(contractId: string, agentId: string, record: AlmanacRecord): Promise { + try { + logger.info(`[cacheAlmanacResolution] (recordId: ${record.id}): caching record`); + const resolutionEntity = AlmanacResolution.create({ + id: record.id, + agentId, + contractId, + recordId: record.id, + }); + await resolutionEntity.save(); + } catch (error) { + logger.error(`[cacheAlmanacResolution] (recordId: ${record.id}): ${error.stack}`); + } +} + +export async function expireAlmanacResolutionsRelativeToHeight(height: bigint): Promise { + // NB: resolution, record, and registration ID are the same across related entities. + const expiringResolutionIdsSql = `SELECT res.id + FROM app.almanac_resolutions res + JOIN app.almanac_registrations reg + ON res.id = reg.id + WHERE reg.expiry_height <= ${height} + `; + const expiringResolutionIds = await store.selectRaw(expiringResolutionIdsSql); + + // NB: will throw an error if any promise rejects. + await Promise.all(expiringResolutionIds.map(r => expireAlmanacResolution(String(r.id)))); +} + +export async function expireAlmanacResolution(id: string): Promise { + try { + logger.info(`[expireAlmanacResolution] (recordId: ${id}): expiring record`); + await AlmanacResolution.remove(id); + } catch (error) { + logger.warn(`[expireAlmanacResolution] (recordId: ${id}): ${error.stack}`); + } +} + diff --git a/src/mappings/primitives.ts b/src/mappings/primitives.ts index df0490369..338f90f1e 100644 --- a/src/mappings/primitives.ts +++ b/src/mappings/primitives.ts @@ -10,6 +10,7 @@ import { } from "./utils"; import {createHash} from "crypto"; import {toBech32} from "@cosmjs/encoding"; +import {expireAlmanacResolutionsRelativeToHeight} from "./almanac/resolutions"; export async function handleBlock(block: CosmosBlock): Promise { await attemptHandling(block, _handleBlock, _handleBlockError); @@ -30,16 +31,18 @@ export async function handleEvent(event: CosmosEvent): Promise { async function _handleBlock(block: CosmosBlock): Promise { logger.info(`[handleBlock] (block.header.height): indexing block ${block.block.header.height}`); - const {id, header: {chainId, height, time}} = block.block; + const {id, header: {chainId, height: _height, time}} = block.block; const timestamp = new Date(time); + const height = BigInt(_height); const blockEntity = Block.create({ id, chainId, - height: BigInt(height), + height, timestamp }); await blockEntity.save(); + await expireAlmanacResolutionsRelativeToHeight(height); } async function _handleTransaction(tx: CosmosTransaction): Promise { diff --git a/src/mappings/utils.ts b/src/mappings/utils.ts index 8ab593713..0344f4106 100644 --- a/src/mappings/utils.ts +++ b/src/mappings/utils.ts @@ -2,6 +2,10 @@ import {CosmosBlock, CosmosEvent, CosmosMessage, CosmosTransaction} from "@subql import {Account, Interface, UnprocessedEntity} from "../types"; import {createHash} from "crypto"; import {Attribute} from "@cosmjs/stargate/build/logs"; +import {LegacyBridgeSwapStructure} from "./wasm/contracts/bridge"; +import {CW20Structure} from "./wasm/contracts/cw20"; +import {BaseStructure} from "./wasm/contracts/base"; +import {MicroAgentAlmanacStructure} from "./wasm/contracts/almanac"; export type Primitive = CosmosEvent | CosmosMessage | CosmosTransaction | CosmosBlock; @@ -27,9 +31,10 @@ export async function checkBalancesAccount(address: string, chainId: string) { } export function getJaccardResult(payload: object): Interface { - let prediction = Structure, prediction_coefficient = 0.5; // prediction coefficient can be set as a minimum threshold for the certainty of an output + let prediction = BaseStructure, prediction_coefficient = 0.5; // prediction coefficient can be set as a minimum threshold for the certainty of an output let diff = 0, match = 0, coefficient = 0; // where coefficient of 1 is a perfect property key match, 2 is a perfect match of property and type - const structs = [CW20Structure, LegacyBridgeSwapStructure]; + // TODO: refactor + const structs = [CW20Structure, LegacyBridgeSwapStructure, MicroAgentAlmanacStructure]; structs.forEach((struct) => { Object.keys(payload).forEach((payload_key) => { if (struct.listProperties().some((prop) => prop === payload_key)) { // If payload property exists as a property within current structure @@ -116,60 +121,6 @@ export async function trackUnprocessed(error: Error, primitives: Primitives): Pr } } -class Structure { - static getInterface() { - return Interface.Uncertain; - } -} - -class CW20Structure extends Structure { - private name = ""; - private symbol = ""; - private decimals = 0; - private initial_balances: [{ amount: bigint, address: string }] = [{amount: BigInt(0), address: ""}]; - private mint: { minter: string } = {minter: ""}; - - static listProperties() { - const a = new CW20Structure(); - return Object.getOwnPropertyNames(a); - } - - static getPropertyType(prop: string) { - const a = new CW20Structure(); - return typeof (a[prop]); - } - - static getInterface() { - return Interface.CW20; - } -} - -class LegacyBridgeSwapStructure extends Structure { - private cap = BigInt(0); - private reverse_aggregated_allowance = BigInt(0); - private reverse_aggregated_allowance_approver_cap = BigInt(0); - private lower_swap_limit = BigInt(0); - private upper_swap_limit = BigInt(0); - private swap_fee = BigInt(0); - private paused_since_block = BigInt(0); - private denom = ""; - private next_swap_id = ""; - - static listProperties() { - const a = new LegacyBridgeSwapStructure(); - return Object.getOwnPropertyNames(a); - } - - static getPropertyType(prop: string) { - const a = new LegacyBridgeSwapStructure(); - return typeof (a[prop]); - } - - static getInterface() { - return Interface.LegacyBridgeSwap; - } -} - export interface BaseEventAttributesI { action: string; } diff --git a/src/mappings/wasm/contracts/almanac.ts b/src/mappings/wasm/contracts/almanac.ts new file mode 100644 index 000000000..b9c6c2277 --- /dev/null +++ b/src/mappings/wasm/contracts/almanac.ts @@ -0,0 +1,21 @@ +import {BaseStructure} from "./base"; +import {Interface} from "../../../types"; + +export class MicroAgentAlmanacStructure extends BaseStructure { + private stake_denom = ""; + private expiry_height = 0; + private register_stake_amount = "0"; + private admin = ""; + + static listProperties() { + return Object.getOwnPropertyNames(new MicroAgentAlmanacStructure()); + } + + static getPropertyType(prop: string) { + return typeof (new MicroAgentAlmanacStructure()[prop]); + } + + static getInterface() { + return Interface.MicroAgentAlmanac; + } +} diff --git a/src/mappings/wasm/contracts/base.ts b/src/mappings/wasm/contracts/base.ts new file mode 100644 index 000000000..5d6f1f680 --- /dev/null +++ b/src/mappings/wasm/contracts/base.ts @@ -0,0 +1,7 @@ +import {Interface} from "../../../types"; + +export class BaseStructure { + static getInterface() { + return Interface.Uncertain; + } +} diff --git a/src/mappings/wasm/contracts/bridge.ts b/src/mappings/wasm/contracts/bridge.ts new file mode 100644 index 000000000..7ce42e844 --- /dev/null +++ b/src/mappings/wasm/contracts/bridge.ts @@ -0,0 +1,28 @@ +import {Interface} from "../../../types"; +import {BaseStructure} from "./base"; + +export class LegacyBridgeSwapStructure extends BaseStructure { + private cap = BigInt(0); + private reverse_aggregated_allowance = BigInt(0); + private reverse_aggregated_allowance_approver_cap = BigInt(0); + private lower_swap_limit = BigInt(0); + private upper_swap_limit = BigInt(0); + private swap_fee = BigInt(0); + private paused_since_block = BigInt(0); + private denom = ""; + private next_swap_id = ""; + + static listProperties() { + const a = new LegacyBridgeSwapStructure(); + return Object.getOwnPropertyNames(a); + } + + static getPropertyType(prop: string) { + const a = new LegacyBridgeSwapStructure(); + return typeof (a[prop]); + } + + static getInterface() { + return Interface.LegacyBridgeSwap; + } +} diff --git a/src/mappings/wasm/contracts/cw20.ts b/src/mappings/wasm/contracts/cw20.ts new file mode 100644 index 000000000..012c137c9 --- /dev/null +++ b/src/mappings/wasm/contracts/cw20.ts @@ -0,0 +1,24 @@ +import {Interface} from "../../../types"; +import {BaseStructure} from "./base"; + +export class CW20Structure extends BaseStructure { + private name = ""; + private symbol = ""; + private decimals = 0; + private initial_balances: [{ amount: bigint, address: string }] = [{amount: BigInt(0), address: ""}]; + private mint: { minter: string } = {minter: ""}; + + static listProperties() { + const a = new CW20Structure(); + return Object.getOwnPropertyNames(a); + } + + static getPropertyType(prop: string) { + const a = new CW20Structure(); + return typeof (a[prop]); + } + + static getInterface() { + return Interface.CW20; + } +} diff --git a/src/mappings/wasm/contracts/index.ts b/src/mappings/wasm/contracts/index.ts new file mode 100644 index 000000000..9e9b34e30 --- /dev/null +++ b/src/mappings/wasm/contracts/index.ts @@ -0,0 +1,4 @@ +export * from "./almanac"; +export * from "./base"; +export * from "./bridge"; +export * from "./cw20"; diff --git a/tests/e2e/entities/test_almanac.py b/tests/e2e/entities/test_almanac.py index 99ba3569d..f9425e656 100644 --- a/tests/e2e/entities/test_almanac.py +++ b/tests/e2e/entities/test_almanac.py @@ -7,7 +7,12 @@ from cosmpy.aerial.tx_helpers import SubmittedTx from gql import gql -from src.genesis.helpers.field_enums import Agents, AlmanacRecords, AlmanacRegistrations +from src.genesis.helpers.field_enums import ( + Agents, + AlmanacRecords, + AlmanacRegistrations, + AlmanacResolutions, +) from tests.helpers.contracts import AlmanacContract, DefaultAlmanacContractConfig from tests.helpers.entity_test import EntityTest from tests.helpers.graphql import filtered_test_query @@ -15,6 +20,10 @@ from uagents.src.nexus.crypto import Identity +def gql_by_endpoint_port(resolution_node: Dict) -> int: + return int(resolution_node["record"]["service"]["endpoints"][0]["url"][-4:]) + + def gql_by_expiry_height(registration_node: Dict) -> int: return int(registration_node["expiryHeight"]) @@ -32,13 +41,14 @@ class Scenario: class TestAlmanac(EntityTest): test_registrations_endpoints = [ - "127.0.0.1:9999", - "127.0.0.1:8888", - "127.0.0.1:7777", "127.0.0.1:6666", + "127.0.0.1:7777", + "127.0.0.1:8888", + "127.0.0.1:9999", ] submitted_txs: List[SubmittedTx] = [] expected_registrations: List[Dict] = [] + expected_resolutions: List[Dict] = [] expected_records: List[Dict] = [ { "service": { @@ -92,6 +102,7 @@ def setUpClass(cls): cls.expected_registrations.append( { "agentId": agent_address, + "contractId": str(cls._contract.address), "expiryHeight": tx.response.height + DefaultAlmanacContractConfig.expiry_height, "sequence": sequence, @@ -99,9 +110,104 @@ def setUpClass(cls): "record": expected_record, } ) + cls.expected_resolutions.append( + { + "agentId": agent_address, + "contractId": str(cls._contract.address), + "record": expected_record, + } + ) # NB: wait for the indexer time.sleep(7) + # NB: test resolutions first as it's sensitive to the current height + def test_resolutions_sql(self): + resolutions = self.db_cursor.execute( + AlmanacResolutions.select_query() + ).fetchall() + actual_resolution_count = len(resolutions) + + current_height = int( + self.db_cursor.execute( + """SELECT b.height FROM app.blocks b + ORDER BY b.height + LIMIT 1""" + ).fetchone()[0] + ) + + last_expired_height = ( + current_height - DefaultAlmanacContractConfig.expiry_height + ) + first_unexpired = next( + tx for tx in self.submitted_txs if tx.response.height >= last_expired_height + ) + last_expired_index = self.submitted_txs.index(first_unexpired) - 1 + expected_resolutions = resolutions[last_expired_index + 1 :] + expected_resolutions_count = len(expected_resolutions) + + self.assertEqual(expected_resolutions_count, actual_resolution_count) + # TODO: more assertions + + def test_resolutions_gql(self): + resolutions_query = gql( + """ + query { + almanacResolutions { + nodes { + id + agentId + contractId + record { + id + service + # registrationId + # eventId + transactionId + blockId + } + } + } + } + """ + ) + + current_height = int( + self.db_cursor.execute( + """SELECT b.height FROM app.blocks b + ORDER BY b.height DESC + LIMIT 1""" + ).fetchone()[0] + ) + last_expired_height = ( + current_height - DefaultAlmanacContractConfig.expiry_height + ) + first_unexpired = next( + r for r in self.submitted_txs if r.response.height > last_expired_height + ) + first_unexpired_index = self.submitted_txs.index(first_unexpired) + expected_resolutions = self.expected_resolutions[first_unexpired_index:] + + gql_result = self.gql_client.execute(resolutions_query) + resolutions = gql_result["almanacResolutions"]["nodes"] + self.assertEqual(len(expected_resolutions), len(resolutions)) + + # NB: sort by expiry height so that indexes match + # their respective expected_resolutions index + list.sort(resolutions, key=gql_by_endpoint_port) + self.assertEqual(len(expected_resolutions), len(resolutions)) + + for (i, resolution) in enumerate(resolutions): + self.assertRegex(resolution["id"], msg_id_regex) + self.assertEqual(expected_resolutions[i]["agentId"], resolution["agentId"]) + self.assertEqual(str(self._contract.address), resolution["contractId"]) + record = resolution["record"] + self.assertEqual( + record["service"], + resolution["record"]["service"], + ) + self.assertRegex(record["transactionId"], tx_id_regex) + self.assertRegex(record["blockId"], block_id_regex) + def test_registrations_sql(self): registrations = self.db_cursor.execute( AlmanacRegistrations.select_query() @@ -232,7 +338,6 @@ def test_registrations_gql(self): registrations = gql_result["almanacRegistrations"]["nodes"] self.assertEqual(len(scenario.expected), len(registrations)) - # TODO: use respective gql order by when available # NB: sort by expiry height so that indexes match # their respective scenario.expected index list.sort(registrations, key=gql_by_expiry_height) @@ -252,7 +357,51 @@ def test_registrations_gql(self): ) self.assertRegex(registration["transactionId"], tx_id_regex) self.assertRegex(registration["blockId"], block_id_regex) - # TODO: assert record equality + + record = registration["record"] + self.assertEqual( + record["service"], + registration["record"]["service"], + ) + self.assertRegex(record["transactionId"], tx_id_regex) + self.assertRegex(record["blockId"], block_id_regex) + + def test_contract_interface_sql(self): + contract = self.db_cursor.execute( + """SELECT c.id + FROM app.contracts c + WHERE c.interface = 'MicroAgentAlmanac'""" + ).fetchone() + self.assertIsNotNone(contract) + self.assertEqual(str(self._contract.address), contract[0]) + + def test_contract_interface_gql(self): + expected_interface = "MicroAgentAlmanac" + results = self.gql_client.execute( + gql( + """ + query { + contracts (filter: {interface: {equalTo: """ + + expected_interface + + """}}) { + nodes { + id + interface + storeMessageId + instantiateMessageId + } + } + } + """ + ) + ) + + contract = results["contracts"]["nodes"][0] + self.assertIsNotNone(contract) + self.assertEqual(str(self._contract.address), contract["id"]) + self.assertEqual(expected_interface, contract["interface"]) + self.assertRegex(contract["storeMessageId"], msg_id_regex) + self.assertRegex(contract["instantiateMessageId"], msg_id_regex) if __name__ == "__main__": diff --git a/tracing-compose.yml b/tracing-compose.yml index fa95f04d9..bb12c9f8c 100644 --- a/tracing-compose.yml +++ b/tracing-compose.yml @@ -40,6 +40,7 @@ services: - ./:/app - ./docker/node-cosmos/package.json:/usr/local/lib/node_modules/@subql/node-cosmos/package.json - ./docker/node-cosmos:/usr/local/lib/node_modules/@subql/node-cosmos + - ./docker/types-cosmos:/usr/local/lib/node_modules/@subql/node-cosmos/node_modules/@subql/types-cosmos - ./subql/packages/common:/usr/local/lib/node_modules/@subql/node-cosmos/node_modules/@subql/common command: - -f=/app