diff --git a/legacy/.travis.yml b/legacy/.travis.yml deleted file mode 100644 index b19e88a..0000000 --- a/legacy/.travis.yml +++ /dev/null @@ -1,12 +0,0 @@ -language: node_js -node_js: - - "14" -notifications: - email: false -branches: - only: - - master -matrix: - include: - - env: TARGET=packages/contracts -script: if .travis/build-condition.sh $TRAVIS_COMMIT_RANGE $TARGET; then echo "$TARGET is being built" && yarn install && yarn contracts-coverage; else echo "$TARGET is NOT being built"; fi diff --git a/legacy/.travis/build-condition.sh b/legacy/.travis/build-condition.sh deleted file mode 100755 index 63a5e7e..0000000 --- a/legacy/.travis/build-condition.sh +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/bash - -if [[ -z $1 ]]; then - echo "Commit range cannot be empty" - exit 1 -fi - -if [[ -z $2 ]]; then - echo "Change path cannot be empty" - exit 1 -fi - -git diff --name-only $1 | sort -u | uniq | grep $2 > /dev/null \ No newline at end of file diff --git a/legacy/LICENSE-APACHE b/legacy/LICENSE-APACHE deleted file mode 100644 index 2ad0ad1..0000000 --- a/legacy/LICENSE-APACHE +++ /dev/null @@ -1,201 +0,0 @@ - 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 [2020] [astralDAO] - - 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/legacy/README.md b/legacy/README.md deleted file mode 100644 index c4bc7e9..0000000 --- a/legacy/README.md +++ /dev/null @@ -1,38 +0,0 @@ -![astralDAO](https://github.com/astralDAO/overview/blob/master/brand-identity/Transparent-Logo-Only-Astral.png?raw=true) -[![Twitter](https://img.shields.io/twitter/follow/astralprotocol?style=social)](https://twitter.com/astralprotocol) - -# Research - -Monorepo containing early research into Web3-native geospatial technologies. - -!!! Note that this is NOT the current implementation of the Astral Protocol, and all references to the protocol in this directory are deprecated. - -## Project Status - `Ropsten testnet / Hosted Powergate` | [![Build Status](https://www.travis-ci.com/AstralProtocol/astralprotocol.svg?branch=master)](https://www.travis-ci.com/AstralProtocol/astralprotocol) - -## Project Structure - -This monorepo is made up of several different packages. - -| Package | Current Version | Coverage | Description | -| ------------------------------------ | ------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------- | -| @astralprotocol/core | ![npm](https://img.shields.io/npm/v/@astralprotocol/core) | -- | Core Astral Protocol Implementation | -| @astralprotocol/contracts | ![npm](https://img.shields.io/npm/v/@astralprotocol/contracts) | [![Coverage Status](https://coveralls.io/repos/github/AstralProtocol/astralprotocol/badge.svg?branch=master)](https://coveralls.io/github/AstralProtocol/astralprotocol?branch=master) | Astral Smart Contracts - GeoDID Registry | -| @astralprotocol/subgraph | ![npm](https://img.shields.io/npm/v/@astralprotocol/subgraph) | -- | Subgraph for astral-protocol-contracts | -| @astralprotocol/stac-validator-js | ![npm](https://img.shields.io/npm/v/@astralprotocol/stac-validator-js) | -- | Node validator for stac item files | -| @astralprotocol/ipld-encoded-geotiff | ![npm](https://img.shields.io/npm/v/@astralprotocol/ipld-encoded-geotiff) | -- | IPLD Encoded GeoTIFFs | - -## Development - -### Project setup - -This project uses yarn and lerna to manage packages and dependencies. To install dependencies for all packages in this repo, go to root dir and run: - -``` -$ yarn install -``` - -Then build all packages: - -``` -$ yarn run build -``` diff --git a/legacy/lerna.json b/legacy/lerna.json deleted file mode 100644 index 642edcf..0000000 --- a/legacy/lerna.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "packages": ["packages/*"], - "version": "independent", - "npmClient": "yarn", - "useWorkspaces": true, - "command": { - "publish": { - "conventionalCommits": true, - "message": "chore(release): publish", - "registry": "https://registry.npmjs.org", - "allowBranch": "master" - } - } -} diff --git a/legacy/package.json b/legacy/package.json deleted file mode 100644 index ad1b36c..0000000 --- a/legacy/package.json +++ /dev/null @@ -1,33 +0,0 @@ -{ - "name": "astralprotocol", - "private": true, - "workspaces": { - "packages": [ - "packages/*" - ], - "nohoist": [ - "packages/subgraph/@graphprotocol/graph-ts", - "packages/subgraph/@graphprotocol/graph-ts/**" - ] - }, - "scripts": { - "contracts-coverage": "yarn workspace @astralprotocol/contracts coverage && cat coverage/lcov.info | coveralls", - "test": "lerna run test", - "build": "lerna run build", - "publish:force": "lerna publish --force-publish", - "publish:simple": "lerna publish", - "publish": "lerna run tsc && lerna publish", - "publish:from": "lerna publish from-package --conventional-commits", - "publish:next": "lerna run tsc && lerna publish --no-push --conventional-prerelease --dist-tag next", - "publish:latest": "lerna run tsc && lerna publish --allow-branch master --conventional-graduate --create-release github", - "lint": "lerna run lint", - "clean": "rm -rf ./lib", - "lerna-add": "lerna add @astralprotocol/core --scope=@astralprotocol/contracts" - }, - "dependencies": { - "lerna": "^3.20.2", - "ts-node": "^9.0.0", - "typedoc": "^0.19.2", - "typescript": "^3.8.3" - } -} diff --git a/legacy/packages/contracts/.solcover.js b/legacy/packages/contracts/.solcover.js deleted file mode 100644 index f52860b..0000000 --- a/legacy/packages/contracts/.solcover.js +++ /dev/null @@ -1,3 +0,0 @@ -module.exports = { - istanbulFolder: '../../coverage' - }; \ No newline at end of file diff --git a/legacy/packages/contracts/CHANGELOG.md b/legacy/packages/contracts/CHANGELOG.md deleted file mode 100644 index 249305b..0000000 --- a/legacy/packages/contracts/CHANGELOG.md +++ /dev/null @@ -1,368 +0,0 @@ -# Change Log - -All notable changes to this project will be documented in this file. -See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. - -## [1.0.12](https://github.com/AstralProtocol/astralprotocol/compare/@astralprotocol/contracts@1.0.11...@astralprotocol/contracts@1.0.12) (2021-03-29) - -**Note:** Version bump only for package @astralprotocol/contracts - - - - - -## [1.0.11](https://github.com/AstralProtocol/astralprotocol/compare/@astralprotocol/contracts@1.0.10...@astralprotocol/contracts@1.0.11) (2021-03-28) - -**Note:** Version bump only for package @astralprotocol/contracts - - - - - -## [1.0.10](https://github.com/AstralProtocol/astralprotocol/compare/@astralprotocol/contracts@1.0.9...@astralprotocol/contracts@1.0.10) (2021-03-28) - -**Note:** Version bump only for package @astralprotocol/contracts - - - - - -## [1.0.9](https://github.com/AstralProtocol/astralprotocol/compare/@astralprotocol/contracts@1.0.8...@astralprotocol/contracts@1.0.9) (2021-03-17) - -**Note:** Version bump only for package @astralprotocol/contracts - - - - - -## [1.0.8](https://github.com/AstralProtocol/astralprotocol/compare/@astralprotocol/contracts@1.0.7...@astralprotocol/contracts@1.0.8) (2021-03-16) - -**Note:** Version bump only for package @astralprotocol/contracts - - - - - -## [1.0.7](https://github.com/AstralProtocol/astralprotocol/compare/@astralprotocol/contracts@1.0.6...@astralprotocol/contracts@1.0.7) (2021-03-15) - -**Note:** Version bump only for package @astralprotocol/contracts - - - - - -## [1.0.6](https://github.com/AstralProtocol/astralprotocol/compare/@astralprotocol/contracts@1.0.5...@astralprotocol/contracts@1.0.6) (2021-03-15) - -**Note:** Version bump only for package @astralprotocol/contracts - - - - - -## [1.0.5](https://github.com/AstralProtocol/astralprotocol/compare/@astralprotocol/contracts@1.0.4...@astralprotocol/contracts@1.0.5) (2021-02-25) - -**Note:** Version bump only for package @astralprotocol/contracts - - - - - -## [1.0.4](https://github.com/AstralProtocol/astralprotocol/compare/@astralprotocol/contracts@1.0.3...@astralprotocol/contracts@1.0.4) (2021-02-24) - -**Note:** Version bump only for package @astralprotocol/contracts - - - - - -## [1.0.3](https://github.com/AstralProtocol/astralprotocol/compare/@astralprotocol/contracts@1.0.2...@astralprotocol/contracts@1.0.3) (2021-02-24) - -**Note:** Version bump only for package @astralprotocol/contracts - - - - - -## [1.0.2](https://github.com/AstralProtocol/astralprotocol/compare/@astralprotocol/contracts@1.0.1...@astralprotocol/contracts@1.0.2) (2021-02-24) - -**Note:** Version bump only for package @astralprotocol/contracts - - - - - -## [1.0.1](https://github.com/AstralProtocol/astralprotocol/compare/@astralprotocol/contracts@0.1.14...@astralprotocol/contracts@1.0.1) (2021-02-24) - -**Note:** Version bump only for package @astralprotocol/contracts - - - - - -## [0.1.14](https://github.com/AstralProtocol/astralprotocol/compare/@astralprotocol/contracts@0.1.13...@astralprotocol/contracts@0.1.14) (2021-02-23) - -**Note:** Version bump only for package @astralprotocol/contracts - - - - - -## [0.1.13](https://github.com/AstralProtocol/astralprotocol/compare/@astralprotocol/contracts@0.1.12...@astralprotocol/contracts@0.1.13) (2021-02-19) - -**Note:** Version bump only for package @astralprotocol/contracts - - - - - -## [0.1.12](https://github.com/AstralProtocol/astralprotocol/compare/@astralprotocol/contracts@0.1.11...@astralprotocol/contracts@0.1.12) (2021-02-18) - -**Note:** Version bump only for package @astralprotocol/contracts - - - - - -## [0.1.11](https://github.com/AstralProtocol/astralprotocol/compare/@astralprotocol/contracts@0.1.10...@astralprotocol/contracts@0.1.11) (2021-02-18) - -**Note:** Version bump only for package @astralprotocol/contracts - - - - - -## [0.1.10](https://github.com/AstralProtocol/astralprotocol/compare/@astralprotocol/contracts@0.1.9...@astralprotocol/contracts@0.1.10) (2021-02-18) - -**Note:** Version bump only for package @astralprotocol/contracts - - - - - -## [0.1.9](https://github.com/AstralProtocol/astralprotocol/compare/@astralprotocol/contracts@0.1.8...@astralprotocol/contracts@0.1.9) (2021-02-18) - -**Note:** Version bump only for package @astralprotocol/contracts - - - - - -## [0.1.8](https://github.com/AstralProtocol/astralprotocol/compare/@astralprotocol/contracts@0.1.7...@astralprotocol/contracts@0.1.8) (2021-02-18) - -**Note:** Version bump only for package @astralprotocol/contracts - - - - - -## [0.1.7](https://github.com/AstralProtocol/astralprotocol/compare/@astralprotocol/contracts@0.1.6...@astralprotocol/contracts@0.1.7) (2021-02-18) - -**Note:** Version bump only for package @astralprotocol/contracts - - - - - -## [0.1.6](https://github.com/AstralProtocol/astralprotocol/compare/@astralprotocol/contracts@0.1.5...@astralprotocol/contracts@0.1.6) (2021-02-18) - -**Note:** Version bump only for package @astralprotocol/contracts - - - - - -## [0.1.5](https://github.com/AstralProtocol/astralprotocol/compare/@astralprotocol/contracts@0.1.4...@astralprotocol/contracts@0.1.5) (2021-02-18) - -**Note:** Version bump only for package @astralprotocol/contracts - - - - - -## [0.1.4](https://github.com/AstralProtocol/astralprotocol/compare/@astralprotocol/contracts@0.1.3...@astralprotocol/contracts@0.1.4) (2021-02-18) - -**Note:** Version bump only for package @astralprotocol/contracts - - - - - -## [0.1.3](https://github.com/AstralProtocol/astralprotocol/compare/@astralprotocol/contracts@0.1.1...@astralprotocol/contracts@0.1.3) (2021-02-18) - -**Note:** Version bump only for package @astralprotocol/contracts - - - - - -## [0.1.1](https://github.com/AstralProtocol/astralprotocol/compare/@astralprotocol/contracts@0.0.3...@astralprotocol/contracts@0.1.1) (2021-02-18) - -**Note:** Version bump only for package @astralprotocol/contracts - - - - - -## [0.0.3](https://github.com/AstralProtocol/astralprotocol/compare/@astralprotocol/contracts@0.0.2...@astralprotocol/contracts@0.0.3) (2021-02-18) - -**Note:** Version bump only for package @astralprotocol/contracts - - - - - -## [0.0.2](https://github.com/AstralProtocol/astralprotocol/compare/@astralprotocol/contracts@0.0.1...@astralprotocol/contracts@0.0.2) (2021-02-09) - -**Note:** Version bump only for package @astralprotocol/contracts - - - - - -## 0.0.1 (2021-01-05) - -**Note:** Version bump only for package @astralprotocol/contracts - - - - - -## [0.0.37](https://github.com/astralDAO/astralprotocol/compare/@astraldao/astral-protocol-contracts@0.0.36...@astraldao/astral-protocol-contracts@0.0.37) (2020-12-17) - -**Note:** Version bump only for package @astraldao/astral-protocol-contracts - - - - - -## [0.0.36](https://github.com/astralDAO/astralprotocol/compare/@astraldao/astral-protocol-contracts@0.0.35...@astraldao/astral-protocol-contracts@0.0.36) (2020-12-01) - -**Note:** Version bump only for package @astraldao/astral-protocol-contracts - - - - - -## [0.0.35](https://github.com/astralDAO/astralprotocol/compare/@astraldao/astral-protocol-contracts@0.0.34...@astraldao/astral-protocol-contracts@0.0.35) (2020-11-24) - -**Note:** Version bump only for package @astraldao/astral-protocol-contracts - - - - - -## [0.0.34](https://github.com/astralDAO/astralprotocol/compare/@astraldao/astral-protocol-contracts@0.0.33...@astraldao/astral-protocol-contracts@0.0.34) (2020-11-24) - -**Note:** Version bump only for package @astraldao/astral-protocol-contracts - - - - - -## [0.0.33](https://github.com/astralDAO/astralprotocol/compare/@astraldao/astral-protocol-contracts@0.0.32...@astraldao/astral-protocol-contracts@0.0.33) (2020-11-24) - -**Note:** Version bump only for package @astraldao/astral-protocol-contracts - - - - - -## [0.0.32](https://github.com/astralDAO/astralprotocol/compare/@astraldao/astral-protocol-contracts@0.0.31...@astraldao/astral-protocol-contracts@0.0.32) (2020-11-21) - -**Note:** Version bump only for package @astraldao/astral-protocol-contracts - - - - - -## [0.0.31](https://github.com/astralDAO/astralprotocol/compare/@astraldao/astral-protocol-contracts@0.0.30...@astraldao/astral-protocol-contracts@0.0.31) (2020-11-21) - -**Note:** Version bump only for package @astraldao/astral-protocol-contracts - - - - - -## [0.0.30](https://github.com/astralDAO/astralprotocol/compare/@astraldao/astral-protocol-contracts@0.0.29...@astraldao/astral-protocol-contracts@0.0.30) (2020-10-22) - -**Note:** Version bump only for package @astraldao/astral-protocol-contracts - - - - - -## [0.0.29](https://github.com/astralDAO/astralprotocol/compare/@astraldao/astral-protocol-contracts@0.0.28...@astraldao/astral-protocol-contracts@0.0.29) (2020-10-22) - -**Note:** Version bump only for package @astraldao/astral-protocol-contracts - - - - - -## [0.0.28](https://github.com/astralDAO/astralprotocol/compare/@astraldao/astral-protocol-contracts@0.0.27...@astraldao/astral-protocol-contracts@0.0.28) (2020-10-22) - -**Note:** Version bump only for package @astraldao/astral-protocol-contracts - - - - - -## [0.0.27](https://github.com/astralDAO/astralprotocol/compare/@astraldao/astral-protocol-contracts@0.0.26...@astraldao/astral-protocol-contracts@0.0.27) (2020-10-22) - -**Note:** Version bump only for package @astraldao/astral-protocol-contracts - - - - - -## [0.0.26](https://github.com/astralDAO/astralprotocol/compare/@astraldao/astral-protocol-contracts@0.0.25...@astraldao/astral-protocol-contracts@0.0.26) (2020-10-19) - -**Note:** Version bump only for package @astraldao/astral-protocol-contracts - - - - - -## [0.0.25](https://github.com/astralDAO/astralprotocol/compare/@astraldao/astral-protocol-contracts@0.0.24...@astraldao/astral-protocol-contracts@0.0.25) (2020-10-19) - -**Note:** Version bump only for package @astraldao/astral-protocol-contracts - - - - - -## [0.0.24](https://github.com/astralDAO/astralprotocol/compare/@astraldao/astral-protocol-contracts@0.0.23...@astraldao/astral-protocol-contracts@0.0.24) (2020-10-19) - -**Note:** Version bump only for package @astraldao/astral-protocol-contracts - - - - - -## [0.0.23](https://github.com/astralDAO/astralprotocol/compare/@astraldao/astral-protocol-contracts@0.0.22...@astraldao/astral-protocol-contracts@0.0.23) (2020-10-19) - -**Note:** Version bump only for package @astraldao/astral-protocol-contracts - - - - - -## [0.0.22](https://github.com/astralDAO/astralprotocol/compare/@astraldao/astral-protocol-contracts@0.0.21...@astraldao/astral-protocol-contracts@0.0.22) (2020-10-16) - -**Note:** Version bump only for package @astraldao/astral-protocol-contracts - - - - - -## [0.0.21](https://github.com/astralDAO/astralprotocol/compare/@astraldao/astral-protocol-contracts@0.0.20...@astraldao/astral-protocol-contracts@0.0.21) (2020-10-16) - -**Note:** Version bump only for package @astraldao/astral-protocol-contracts - - - - - -## [0.0.20](https://github.com/astralDAO/astralprotocol/compare/@astraldao/astral-protocol-contracts@0.0.19...@astraldao/astral-protocol-contracts@0.0.20) (2020-10-16) - -**Note:** Version bump only for package @astraldao/astral-protocol-contracts diff --git a/legacy/packages/contracts/LICENSE-APACHE b/legacy/packages/contracts/LICENSE-APACHE deleted file mode 100644 index 2ad0ad1..0000000 --- a/legacy/packages/contracts/LICENSE-APACHE +++ /dev/null @@ -1,201 +0,0 @@ - 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 [2020] [astralDAO] - - 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/legacy/packages/contracts/LICENSE-MIT b/legacy/packages/contracts/LICENSE-MIT deleted file mode 100644 index 1874419..0000000 --- a/legacy/packages/contracts/LICENSE-MIT +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) 2020 astralDAO - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/legacy/packages/contracts/README.md b/legacy/packages/contracts/README.md deleted file mode 100644 index b6b3f2b..0000000 --- a/legacy/packages/contracts/README.md +++ /dev/null @@ -1,40 +0,0 @@ -# `@astralprotocol/contracts` - -[![Build Status](https://www.travis-ci.com/AstralProtocol/astralprotocol.svg?branch=master)](https://www.travis-ci.com/AstralProtocol/astralprotocol) [![Coverage Status](https://coveralls.io/repos/github/AstralProtocol/astralprotocol/badge.svg?branch=master)](https://coveralls.io/github/AstralProtocol/astralprotocol?branch=master) - -## Description - -These contracts serve as the Registry for the Astral Protocol GeoDIDs. It allows binding of a GeoDID to an ethereum address and CID name resolving. - -By registering a spatial asset Smart Contract events are triggered, which are picked up by the subgraph indexer to build the tree of relationships for easy querying. - -## To add Astral Protocol Contracts to your application - -``` -yarn add @astralprotocol/contracts -``` - -## To develop or try the Astral Protocol Contracts locally - -- Clone the astralprotocol repository and go to packages/contracts: - -``` -git clone git@github.com:AstralProtocol/astralprotocol.git -cd astralprotocol/packages/contracts -``` - -- Run ganache `yarn ganache` -- Deploy contracts with `yarn truffle` -- Run tests with `yarn truffle-test` or do coverage check up `yarn coverage` -- You can deploy an instance by running `yarn new-instance`. It builds a tree with some GeoDIDs with fake ids and cids. -- You can test the removal of some links by running `yarn remove-links`. -- Watch the changes in a locally deployed subgraph. - -## To deploy your own contracts in the Ropsten testnet - -- Create a .env file in /packages/contracts with a `MNEMONIC` and `ROPSTEN_API_KEY`: - -``` -MNEMONIC="mnemonic phrase goes here with testnet ether in address[0] on ropsten cool" -ROPSTEN_API_KEY=https://ropsten.infura.io/v3/ -``` diff --git a/legacy/packages/contracts/contracts/Migrations.sol b/legacy/packages/contracts/contracts/Migrations.sol deleted file mode 100644 index 5a671e5..0000000 --- a/legacy/packages/contracts/contracts/Migrations.sol +++ /dev/null @@ -1,26 +0,0 @@ -pragma solidity ^0.6.0; - -// SPDX-License-Identifier: UNLICENSED - - -contract Migrations { - address public owner; - uint public last_completed_migration; - - constructor() public { - owner = msg.sender; - } - - modifier restricted() { - if (msg.sender == owner) _; - } - - function setCompleted(uint completed) public restricted { - last_completed_migration = completed; - } - - function upgrade(address new_address) public restricted { - Migrations upgraded = Migrations(new_address); - upgraded.setCompleted(last_completed_migration); - } -} diff --git a/legacy/packages/contracts/contracts/SpatialAssets.sol b/legacy/packages/contracts/contracts/SpatialAssets.sol deleted file mode 100644 index ab48aed..0000000 --- a/legacy/packages/contracts/contracts/SpatialAssets.sol +++ /dev/null @@ -1,329 +0,0 @@ -// SPDX-License-Identifier: APACHE OR MIT -pragma solidity ^0.6.0; - -import "@openzeppelin/contracts/access/AccessControl.sol"; -import "@openzeppelin/contracts/GSN/Context.sol"; - -/** - * @dev {SpatialAssets} registry - * This contract uses {AccessControl} to lock permissioned functions using the - * different roles - head to its documentation for details. - * - * The account that deploys the contract will be granted the 'DATA_SUPPLIER' as well as the default admin role, which will let it grant - * 'DATA_SUPPLIER' roles to other accounts - */ -contract SpatialAssets is Context, AccessControl { - /** - * @dev Emitted when Spatial Assets of id `id` are transferred to `to``. - */ - event SpatialAssetRegistered(address indexed to, bytes32 indexed geoDIDId, bytes32 indexed cid, bytes32 offChainStorage, bytes32 root, bool canBeParent); - - /** - * @dev Emitted when Spatial Assets of id `id` are deactivated. - */ - event SpatialAssetDeactivated(bytes32 indexed geoDIDId); - - /** - * @dev Emitted when a parent geodid is added to a node - */ - event ParentAdded(bytes32 indexed geoDIDId, bytes32 indexed parentGeoDIDId); - - /** - * @dev Emitted when a children geodid is added to a node - */ - event ChildrenAdded(bytes32 indexed geoDIDId, bytes32 indexed childrenGeoDIDId); - - /** - * @dev Emitted when a parent geodid is removed from a node - */ - event ParentRemoved(bytes32 indexed geoDIDId, bytes32 indexed parentGeoDIDId); - - /** - * @dev Emitted when a children geodid is removed from a node - */ - event ChildrenRemoved(bytes32 indexed geoDIDId, bytes32 indexed childrenGeoDIDId); - - - /** - * @dev Emitted when a children geodid does not have a parent when trying to remove it from a parent - */ - event ChildrenErrorNoParent(bytes32 indexed geoDIDId, bytes32 indexed childrenGeoDIDId); - - - /** - * @dev Emitted when a children geodid does not exist - */ - event ChildrenErrorNoExistence(bytes32 indexed geoDIDId, bytes32 indexed childrenGeoDIDId); - - - /** - * @dev Emitted when a children geodid already has a parent but shouldn't have - */ - event ChildrenErrorHasParent(bytes32 indexed geoDIDId, bytes32 indexed childrenGeoDIDId); - - - bytes32 public constant DATA_SUPPLIER = keccak256("DATA_SUPPLIER"); - - string private _uri; - - // Mapping from GeodidID to registrant - mapping (bytes32 => address) private _owners; - - // Mapping from GeodidID to Cid - mapping (bytes32 => bytes32) private _cids; - - // Mapping from GeodidID to parenthood status - mapping (bytes32 => bool) private _hasParent; - - // Mapping from GeodidID to parenthood type - mapping (bytes32 => bool) private _canBeParent; - - // Mapping from GeodidID to root GeoDID - mapping (bytes32 => bytes32) private _root; - - // Mapping from id to spatial asset external storage - mapping (bytes32 => bytes32) private _externalStorage; - - // Allowed external storages signatures - mapping (bytes32 => bool) private _allowedStorages; - - - /** - * @dev Grants `DEFAULT_ADMIN_ROLE`, `DATA_SUPPLIER` to the account that - * deploys the contract. - */ - constructor(string memory uri) public { - _setURI(uri); - _setupRole(DEFAULT_ADMIN_ROLE, _msgSender()); - _setupRole(DATA_SUPPLIER, _msgSender()); - - } - - /** - * @dev Registers a new user with the ability to register a spatial asset. - */ - function registerRole() public { - require(!hasRole(DATA_SUPPLIER, _msgSender()), "SpatialAssets: must not have a DATA_SUPPLIER role yet"); - _setupRole(DATA_SUPPLIER, _msgSender()); - } - - /** - * @dev Registers a new storage that can accept GeoDID document creation - */ - function enableStorage(bytes32 offChainStorage) public { - require(hasRole(DEFAULT_ADMIN_ROLE, _msgSender()), "SpatialAssets: must have admin role to edit allowed offchain storages"); - require(_allowedStorages[offChainStorage]== false, "SpatialAssets: storage must not be active yet"); - _allowedStorages[offChainStorage] = true; - } - - /** - * @dev Disables an existing storage - */ - function disableStorage(bytes32 offChainStorage) public { - require(hasRole(DEFAULT_ADMIN_ROLE, _msgSender()), "SpatialAssets: must have admin role to edit allowed offchain storages"); - _allowedStorages[offChainStorage] = false; - } - - - /** - * @dev Registers one spatial asset with external storage 'data' and assigns them to `account`. - * - * Emits a {SpatialAssetRegistered} event. - */ - function registerSpatialAsset(address owner, bytes32 geoDIDId, bytes32 parentGeoDIDId , bytes32[] memory childrenGeoDIDIds, bytes32 cid, bytes32 offChainStorage, uint256 geoDIDtype) public { - require(hasRole(DATA_SUPPLIER, _msgSender()), "SpatialAssets: must have data supplier role to register"); - require(allowedStorages(offChainStorage), "SpatialAssets: storage must be allowed"); - require(_owners[geoDIDId] == address(0), "SpatialAssets: id must not have an owner yet"); - require(geoDIDtype == 0 || geoDIDtype == 1, "Spatial Assets: wrong geodidtype"); - - _cids[geoDIDId] =cid; - _owners[geoDIDId] = owner; - _externalStorage[geoDIDId] = offChainStorage; - - if (geoDIDtype == 0) { - _canBeParent[geoDIDId] = true; - } else if (geoDIDtype == 1) { - _canBeParent[geoDIDId] = false; - } - - if (parentGeoDIDId == bytes32(0)) { - _hasParent[geoDIDId] = false; - _root[geoDIDId] = geoDIDId; - emit SpatialAssetRegistered(owner, geoDIDId, cid, offChainStorage, geoDIDId, _canBeParent[geoDIDId]); - } else { - _hasParent[geoDIDId] = true; - emit SpatialAssetRegistered(owner, geoDIDId, cid, offChainStorage, _root[parentGeoDIDId], _canBeParent[geoDIDId]); - emit ParentAdded(geoDIDId, parentGeoDIDId); - } - - uint256 childrensLen = childrenGeoDIDIds.length; - - if (childrensLen > 0 && _canBeParent[geoDIDId]){ - for(uint256 j=0; j < childrensLen; j++) { - bytes32 childrenGeoDID = childrenGeoDIDIds[j]; - _hasParent[childrenGeoDID] = true; - emit ChildrenAdded(geoDIDId, childrenGeoDID); - } - } - } - - - /** - * @dev Adds children GeoDIDs to an already existent geoDID - * - * Emits a {ChildrenAdded} event. - */ - function addChildrenGeoDIDs(bytes32 geoDIDId, bytes32[] memory childrenGeoDIDIds) public { - require(hasRole(DATA_SUPPLIER, _msgSender()), "SpatialAssets: must have data supplier role to register"); - require(_owners[geoDIDId] == _msgSender(), "SpatialAssets: geoDIDId must be owned by its creator"); - require(_canBeParent[geoDIDId], "SpatialAssets: geoDIDId must be able to be parent (a Collection)"); - - uint256 childrensLen = childrenGeoDIDIds.length; - - if (childrensLen > 0){ - for(uint256 j=0; j < childrensLen; j++) { - bytes32 childrenGeoDID = childrenGeoDIDIds[j]; - if (_owners[childrenGeoDID] != address(0) && !_hasParent[childrenGeoDID]) { - _hasParent[childrenGeoDID] = true; - _root[childrenGeoDID] = _root[geoDIDId]; - emit ChildrenAdded(geoDIDId, childrenGeoDID); - } else if (_owners[childrenGeoDID] != address(0) && _hasParent[childrenGeoDID]){ - emit ChildrenErrorHasParent(geoDIDId, childrenGeoDID); - } else { - emit ChildrenErrorNoExistence(geoDIDId, childrenGeoDID); - } - } - } - } - - /** - * @dev Adds a parent GeoDID to an already existent geoDID - * - * Emits a {ParentAdded} event. - */ - function addParentGeoDID(bytes32 geoDIDId, bytes32 parentGeoDIDId) public { - require(hasRole(DATA_SUPPLIER, _msgSender()), "SpatialAssets: must have data supplier role to register"); - require(_owners[geoDIDId] == _msgSender(), "SpatialAssets: geoDIDId must be owned by its creator"); - require(_owners[parentGeoDIDId] != address(0), "SpatialAssets: parentGeoDIDId does not exist"); - require(!_hasParent[geoDIDId], "SpatialAssets: geoDIDId already has a parent"); - require(_canBeParent[parentGeoDIDId], "SpatialAssets: parentGeoDIDId must be able to be parent (a Collection)"); - - _hasParent[geoDIDId] = true; - _root[geoDIDId] = _root[parentGeoDIDId]; - emit ParentAdded(geoDIDId, parentGeoDIDId); - } - - - /** - * @dev Removes childrenGeoDIDs from a geoDID - * - * Emits a {ChildrenRemoved} event. - */ - function removeChildrenGeoDIDs(bytes32 geoDIDId, bytes32[] memory childrenGeoDIDIds) public { - require(hasRole(DATA_SUPPLIER, _msgSender()), "SpatialAssets: must have data supplier role to register"); - require(_owners[geoDIDId] == _msgSender(), "SpatialAssets: id must not have an owner yet"); - - uint256 childrensLen = childrenGeoDIDIds.length; - - if (childrensLen > 0){ - for(uint256 j=0; j < childrensLen; j++) { - bytes32 childrenGeoDID = childrenGeoDIDIds[j]; - if (_owners[childrenGeoDID] != address(0) && _hasParent[childrenGeoDID]) { - _hasParent[childrenGeoDID] = false; - _root[childrenGeoDID] = childrenGeoDID; - emit ChildrenRemoved(geoDIDId, childrenGeoDID); - } else if (_owners[childrenGeoDID] != address(0) && !_hasParent[childrenGeoDID]){ - emit ChildrenErrorNoParent(geoDIDId, childrenGeoDID); - } else { - emit ChildrenErrorNoExistence(geoDIDId, childrenGeoDID); - } - } - } - } - - - /** - * @dev Removes a parent GeoDID from an already existent geoDID - * - * Emits a {ParentAdded} event. - */ - function removeParentGeoDID(bytes32 geoDIDId, bytes32 parentGeoDIDId) public { - require(hasRole(DATA_SUPPLIER, _msgSender()), "SpatialAssets: must have data supplier role to register"); - require(_owners[geoDIDId] == _msgSender(), "SpatialAssets: id must not have an owner yet"); - require(_owners[parentGeoDIDId] != address(0), "SpatialAssets: GeoDID to be removed as parent does not exist"); - require(_hasParent[geoDIDId], "SpatialAssets: GeoDID does not have a parent to remove"); - - _hasParent[geoDIDId] = false; - _root[geoDIDId] = geoDIDId; - - emit ParentRemoved(geoDIDId, parentGeoDIDId); - } - - /** - * @dev De-registers a spatial asset - */ - function deactivateSpatialAsset(bytes32 geoDIDId, bytes32[] memory childrenToRemove) public { - require( - _owners[geoDIDId] == _msgSender(),"SpatialAssets: caller is not owner of the Spatial Asset" - ); - _owners[geoDIDId] = address(0); - _externalStorage[geoDIDId] = ""; - _cids[geoDIDId] = ""; - _hasParent[geoDIDId] = false; - _root[geoDIDId] = ""; - - uint256 childrensLen = childrenToRemove.length; - - if (childrensLen > 0){ - for(uint256 j=0; j < childrensLen; j++) { - bytes32 childrenGeoDID = childrenToRemove[j]; - if (_owners[childrenGeoDID] != address(0) && _hasParent[childrenGeoDID]) { - _hasParent[childrenGeoDID] = false; - _root[childrenGeoDID] = childrenGeoDID; - emit ChildrenRemoved(geoDIDId, childrenGeoDID); - } else if (_owners[childrenGeoDID] != address(0) && !_hasParent[childrenGeoDID]){ - emit ChildrenErrorNoParent(geoDIDId, childrenGeoDID); - } else { - emit ChildrenErrorNoExistence(geoDIDId, childrenGeoDID); - } - } - } - - emit SpatialAssetDeactivated(geoDIDId); - } - - /** - * @dev Sets a new URI for all the spatial asset types - */ - function _setURI(string memory newuri) internal { - _uri = newuri; - } - - function idToOwner(bytes32 id) public view returns (address) { - return _owners[id]; - } - - function idToCid(bytes32 id) public view returns (bytes32) { - return _cids[id]; - } - - function idToCanBeParent(bytes32 id) public view returns (bool) { - return _canBeParent[id]; - } - - function idToHasParent(bytes32 id) public view returns (bool) { - return _hasParent[id]; - } - - function idToExternalStorage(bytes32 id) public view returns (bytes32) { - return _externalStorage[id]; - } - - function allowedStorages(bytes32 offChainStorage) public view returns (bool) { - return _allowedStorages[offChainStorage]; - } - - function uri() public view returns (string memory) { - return _uri; - } -} diff --git a/legacy/packages/contracts/coverage.json b/legacy/packages/contracts/coverage.json deleted file mode 100644 index 53f0d4e..0000000 --- a/legacy/packages/contracts/coverage.json +++ /dev/null @@ -1 +0,0 @@ -{"contracts/SpatialAssets.sol":{"l":{"96":3,"97":3,"98":3,"106":3,"107":1,"114":6,"115":4,"116":2,"123":3,"124":1,"134":24,"135":22,"136":20,"137":18,"139":16,"140":16,"141":16,"143":16,"144":9,"146":7,"149":16,"150":12,"151":12,"152":12,"154":4,"155":4,"156":4,"159":16,"161":16,"162":2,"163":2,"164":2,"165":2,"177":7,"178":5,"179":3,"181":1,"183":1,"184":1,"185":1,"186":1,"187":1,"188":1,"189":1,"191":0,"193":0,"205":11,"206":9,"207":7,"208":5,"209":3,"211":1,"212":1,"213":1,"223":5,"224":3,"226":1,"228":1,"229":1,"230":1,"231":1,"232":1,"233":1,"234":1,"236":0,"238":0,"251":9,"252":7,"253":5,"254":3,"256":1,"257":1,"259":1,"266":4,"269":2,"270":2,"271":2,"272":2,"273":2,"275":2,"277":2,"278":1,"279":1,"280":1,"281":1,"282":1,"283":1,"285":0,"287":0,"292":2,"299":3,"303":8,"307":2,"311":6,"315":12,"319":8,"323":24,"327":1},"path":"/home/j-mars/astralprotocol/astralprotocol/packages/contracts/contracts/SpatialAssets.sol","s":{"1":3,"2":3,"3":3,"4":3,"5":1,"6":6,"7":4,"8":2,"9":3,"10":1,"11":24,"12":22,"13":20,"14":18,"15":16,"16":16,"17":16,"18":16,"19":9,"20":7,"21":7,"22":16,"23":12,"24":12,"25":12,"26":4,"27":4,"28":4,"29":16,"30":16,"31":2,"32":2,"33":2,"34":2,"35":7,"36":5,"37":3,"38":1,"39":1,"40":1,"41":1,"42":1,"43":1,"44":1,"45":1,"46":0,"47":0,"48":0,"49":11,"50":9,"51":7,"52":5,"53":3,"54":1,"55":1,"56":1,"57":5,"58":3,"59":1,"60":1,"61":1,"62":1,"63":1,"64":1,"65":1,"66":1,"67":0,"68":0,"69":0,"70":9,"71":7,"72":5,"73":3,"74":1,"75":1,"76":1,"77":4,"78":2,"79":2,"80":2,"81":2,"82":2,"83":2,"84":2,"85":1,"86":1,"87":1,"88":1,"89":1,"90":1,"91":0,"92":0,"93":0,"94":2,"95":3,"96":8,"97":2,"98":6,"99":12,"100":8,"101":24,"102":1},"b":{"1":[1,2],"2":[4,2],"3":[2,2],"4":[1,2],"5":[22,2],"6":[20,2],"7":[18,2],"8":[16,2],"9":[9,7],"10":[7,0],"11":[12,4],"12":[2,14],"13":[5,2],"14":[3,2],"15":[1,2],"16":[1,0],"17":[1,0],"18":[0,0],"19":[9,2],"20":[7,2],"21":[5,2],"22":[3,2],"23":[1,2],"24":[3,2],"25":[1,2],"26":[1,0],"27":[1,0],"28":[0,0],"29":[7,2],"30":[5,2],"31":[3,2],"32":[1,2],"33":[2,2],"34":[1,1],"35":[1,0],"36":[0,0]},"f":{"1":3,"2":3,"3":6,"4":3,"5":24,"6":7,"7":11,"8":5,"9":9,"10":4,"11":3,"12":8,"13":2,"14":6,"15":12,"16":8,"17":24,"18":1},"fnMap":{"1":{"name":"constructor","line":95,"loc":{"start":{"line":95,"column":4},"end":{"line":100,"column":4}}},"2":{"name":"registerRole","line":105,"loc":{"start":{"line":105,"column":4},"end":{"line":108,"column":4}}},"3":{"name":"enableStorage","line":113,"loc":{"start":{"line":113,"column":4},"end":{"line":117,"column":4}}},"4":{"name":"disableStorage","line":122,"loc":{"start":{"line":122,"column":4},"end":{"line":125,"column":4}}},"5":{"name":"registerSpatialAsset","line":133,"loc":{"start":{"line":133,"column":4},"end":{"line":168,"column":4}}},"6":{"name":"addChildrenGeoDIDs","line":176,"loc":{"start":{"line":176,"column":4},"end":{"line":197,"column":4}}},"7":{"name":"addParentGeoDID","line":204,"loc":{"start":{"line":204,"column":4},"end":{"line":214,"column":4}}},"8":{"name":"removeChildrenGeoDIDs","line":222,"loc":{"start":{"line":222,"column":4},"end":{"line":242,"column":4}}},"9":{"name":"removeParentGeoDID","line":250,"loc":{"start":{"line":250,"column":4},"end":{"line":260,"column":4}}},"10":{"name":"deactivateSpatialAsset","line":265,"loc":{"start":{"line":265,"column":5},"end":{"line":293,"column":4}}},"11":{"name":"_setURI","line":298,"loc":{"start":{"line":298,"column":4},"end":{"line":300,"column":4}}},"12":{"name":"idToOwner","line":302,"loc":{"start":{"line":302,"column":4},"end":{"line":304,"column":4}}},"13":{"name":"idToCid","line":306,"loc":{"start":{"line":306,"column":4},"end":{"line":308,"column":4}}},"14":{"name":"idToCanBeParent","line":310,"loc":{"start":{"line":310,"column":4},"end":{"line":312,"column":4}}},"15":{"name":"idToHasParent","line":314,"loc":{"start":{"line":314,"column":4},"end":{"line":316,"column":4}}},"16":{"name":"idToExternalStorage","line":318,"loc":{"start":{"line":318,"column":4},"end":{"line":320,"column":4}}},"17":{"name":"allowedStorages","line":322,"loc":{"start":{"line":322,"column":4},"end":{"line":324,"column":4}}},"18":{"name":"uri","line":326,"loc":{"start":{"line":326,"column":4},"end":{"line":328,"column":4}}}},"statementMap":{"1":{"start":{"line":96,"column":8},"end":{"line":96,"column":19}},"2":{"start":{"line":97,"column":8},"end":{"line":97,"column":51}},"3":{"start":{"line":98,"column":8},"end":{"line":98,"column":46}},"4":{"start":{"line":106,"column":8},"end":{"line":106,"column":110}},"5":{"start":{"line":107,"column":8},"end":{"line":107,"column":46}},"6":{"start":{"line":114,"column":8},"end":{"line":114,"column":130}},"7":{"start":{"line":115,"column":8},"end":{"line":115,"column":106}},"8":{"start":{"line":116,"column":8},"end":{"line":116,"column":47}},"9":{"start":{"line":123,"column":8},"end":{"line":123,"column":130}},"10":{"start":{"line":124,"column":8},"end":{"line":124,"column":48}},"11":{"start":{"line":134,"column":8},"end":{"line":134,"column":111}},"12":{"start":{"line":135,"column":8},"end":{"line":135,"column":90}},"13":{"start":{"line":136,"column":8},"end":{"line":136,"column":95}},"14":{"start":{"line":137,"column":8},"end":{"line":137,"column":87}},"15":{"start":{"line":139,"column":8},"end":{"line":139,"column":27}},"16":{"start":{"line":140,"column":8},"end":{"line":140,"column":32}},"17":{"start":{"line":141,"column":8},"end":{"line":141,"column":51}},"18":{"start":{"line":143,"column":8},"end":{"line":143,"column":5254}},"19":{"start":{"line":144,"column":12},"end":{"line":144,"column":40}},"20":{"start":{"line":145,"column":15},"end":{"line":145,"column":5335}},"21":{"start":{"line":146,"column":12},"end":{"line":146,"column":41}},"22":{"start":{"line":149,"column":8},"end":{"line":149,"column":5421}},"23":{"start":{"line":150,"column":12},"end":{"line":150,"column":39}},"24":{"start":{"line":151,"column":12},"end":{"line":151,"column":37}},"25":{"start":{"line":152,"column":8},"end":{"line":152,"column":108}},"26":{"start":{"line":154,"column":12},"end":{"line":154,"column":38}},"27":{"start":{"line":155,"column":12},"end":{"line":155,"column":125}},"28":{"start":{"line":156,"column":12},"end":{"line":156,"column":54}},"29":{"start":{"line":159,"column":8},"end":{"line":159,"column":55}},"30":{"start":{"line":161,"column":8},"end":{"line":161,"column":5967}},"31":{"start":{"line":162,"column":12},"end":{"line":162,"column":6032}},"32":{"start":{"line":163,"column":16},"end":{"line":163,"column":61}},"33":{"start":{"line":164,"column":16},"end":{"line":164,"column":48}},"34":{"start":{"line":165,"column":16},"end":{"line":165,"column":60}},"35":{"start":{"line":177,"column":8},"end":{"line":177,"column":111}},"36":{"start":{"line":178,"column":8},"end":{"line":178,"column":105}},"37":{"start":{"line":179,"column":8},"end":{"line":179,"column":106}},"38":{"start":{"line":181,"column":8},"end":{"line":181,"column":55}},"39":{"start":{"line":183,"column":8},"end":{"line":183,"column":6896}},"40":{"start":{"line":184,"column":12},"end":{"line":184,"column":6935}},"41":{"start":{"line":185,"column":16},"end":{"line":185,"column":61}},"42":{"start":{"line":186,"column":16},"end":{"line":186,"column":7060}},"43":{"start":{"line":187,"column":20},"end":{"line":187,"column":52}},"44":{"start":{"line":188,"column":20},"end":{"line":188,"column":58}},"45":{"start":{"line":189,"column":20},"end":{"line":189,"column":64}},"46":{"start":{"line":190,"column":23},"end":{"line":190,"column":7341}},"47":{"start":{"line":191,"column":20},"end":{"line":191,"column":72}},"48":{"start":{"line":193,"column":20},"end":{"line":193,"column":75}},"49":{"start":{"line":205,"column":8},"end":{"line":205,"column":111}},"50":{"start":{"line":206,"column":8},"end":{"line":206,"column":105}},"51":{"start":{"line":207,"column":8},"end":{"line":207,"column":101}},"52":{"start":{"line":208,"column":8},"end":{"line":208,"column":85}},"53":{"start":{"line":209,"column":8},"end":{"line":209,"column":118}},"54":{"start":{"line":211,"column":8},"end":{"line":211,"column":34}},"55":{"start":{"line":212,"column":8},"end":{"line":212,"column":46}},"56":{"start":{"line":213,"column":8},"end":{"line":213,"column":50}},"57":{"start":{"line":223,"column":8},"end":{"line":223,"column":111}},"58":{"start":{"line":224,"column":8},"end":{"line":224,"column":97}},"59":{"start":{"line":226,"column":8},"end":{"line":226,"column":55}},"60":{"start":{"line":228,"column":8},"end":{"line":228,"column":9012}},"61":{"start":{"line":229,"column":12},"end":{"line":229,"column":9051}},"62":{"start":{"line":230,"column":16},"end":{"line":230,"column":61}},"63":{"start":{"line":231,"column":16},"end":{"line":231,"column":9176}},"64":{"start":{"line":232,"column":20},"end":{"line":232,"column":53}},"65":{"start":{"line":233,"column":20},"end":{"line":233,"column":57}},"66":{"start":{"line":234,"column":20},"end":{"line":234,"column":66}},"67":{"start":{"line":235,"column":23},"end":{"line":235,"column":9458}},"68":{"start":{"line":236,"column":20},"end":{"line":236,"column":73}},"69":{"start":{"line":238,"column":20},"end":{"line":238,"column":75}},"70":{"start":{"line":251,"column":8},"end":{"line":251,"column":111}},"71":{"start":{"line":252,"column":8},"end":{"line":252,"column":97}},"72":{"start":{"line":253,"column":8},"end":{"line":253,"column":117}},"73":{"start":{"line":254,"column":8},"end":{"line":254,"column":94}},"74":{"start":{"line":256,"column":8},"end":{"line":256,"column":35}},"75":{"start":{"line":257,"column":8},"end":{"line":257,"column":33}},"76":{"start":{"line":259,"column":8},"end":{"line":259,"column":52}},"77":{"start":{"line":266,"column":8},"end":{"line":266,"column":10703}},"78":{"start":{"line":269,"column":8},"end":{"line":269,"column":37}},"79":{"start":{"line":270,"column":8},"end":{"line":270,"column":38}},"80":{"start":{"line":271,"column":8},"end":{"line":271,"column":27}},"81":{"start":{"line":272,"column":8},"end":{"line":272,"column":35}},"82":{"start":{"line":273,"column":8},"end":{"line":273,"column":27}},"83":{"start":{"line":275,"column":8},"end":{"line":275,"column":54}},"84":{"start":{"line":277,"column":8},"end":{"line":277,"column":11072}},"85":{"start":{"line":278,"column":12},"end":{"line":278,"column":11111}},"86":{"start":{"line":279,"column":16},"end":{"line":279,"column":60}},"87":{"start":{"line":280,"column":16},"end":{"line":280,"column":11235}},"88":{"start":{"line":281,"column":20},"end":{"line":281,"column":53}},"89":{"start":{"line":282,"column":20},"end":{"line":282,"column":57}},"90":{"start":{"line":283,"column":20},"end":{"line":283,"column":66}},"91":{"start":{"line":284,"column":24},"end":{"line":284,"column":11518}},"92":{"start":{"line":285,"column":20},"end":{"line":285,"column":73}},"93":{"start":{"line":287,"column":20},"end":{"line":287,"column":75}},"94":{"start":{"line":292,"column":8},"end":{"line":292,"column":46}},"95":{"start":{"line":299,"column":8},"end":{"line":299,"column":20}},"96":{"start":{"line":303,"column":8},"end":{"line":303,"column":26}},"97":{"start":{"line":307,"column":8},"end":{"line":307,"column":24}},"98":{"start":{"line":311,"column":8},"end":{"line":311,"column":31}},"99":{"start":{"line":315,"column":8},"end":{"line":315,"column":29}},"100":{"start":{"line":319,"column":8},"end":{"line":319,"column":35}},"101":{"start":{"line":323,"column":8},"end":{"line":323,"column":48}},"102":{"start":{"line":327,"column":8},"end":{"line":327,"column":19}}},"branchMap":{"1":{"line":106,"type":"if","locations":[{"start":{"line":106,"column":8},"end":{"line":106,"column":8}},{"start":{"line":106,"column":8},"end":{"line":106,"column":8}}]},"2":{"line":114,"type":"if","locations":[{"start":{"line":114,"column":8},"end":{"line":114,"column":8}},{"start":{"line":114,"column":8},"end":{"line":114,"column":8}}]},"3":{"line":115,"type":"if","locations":[{"start":{"line":115,"column":8},"end":{"line":115,"column":8}},{"start":{"line":115,"column":8},"end":{"line":115,"column":8}}]},"4":{"line":123,"type":"if","locations":[{"start":{"line":123,"column":8},"end":{"line":123,"column":8}},{"start":{"line":123,"column":8},"end":{"line":123,"column":8}}]},"5":{"line":134,"type":"if","locations":[{"start":{"line":134,"column":8},"end":{"line":134,"column":8}},{"start":{"line":134,"column":8},"end":{"line":134,"column":8}}]},"6":{"line":135,"type":"if","locations":[{"start":{"line":135,"column":8},"end":{"line":135,"column":8}},{"start":{"line":135,"column":8},"end":{"line":135,"column":8}}]},"7":{"line":136,"type":"if","locations":[{"start":{"line":136,"column":8},"end":{"line":136,"column":8}},{"start":{"line":136,"column":8},"end":{"line":136,"column":8}}]},"8":{"line":137,"type":"if","locations":[{"start":{"line":137,"column":8},"end":{"line":137,"column":8}},{"start":{"line":137,"column":8},"end":{"line":137,"column":8}}]},"9":{"line":143,"type":"if","locations":[{"start":{"line":143,"column":8},"end":{"line":143,"column":8}},{"start":{"line":143,"column":8},"end":{"line":143,"column":8}}]},"10":{"line":145,"type":"if","locations":[{"start":{"line":145,"column":15},"end":{"line":145,"column":15}},{"start":{"line":145,"column":15},"end":{"line":145,"column":15}}]},"11":{"line":149,"type":"if","locations":[{"start":{"line":149,"column":8},"end":{"line":149,"column":8}},{"start":{"line":149,"column":8},"end":{"line":149,"column":8}}]},"12":{"line":161,"type":"if","locations":[{"start":{"line":161,"column":8},"end":{"line":161,"column":8}},{"start":{"line":161,"column":8},"end":{"line":161,"column":8}}]},"13":{"line":177,"type":"if","locations":[{"start":{"line":177,"column":8},"end":{"line":177,"column":8}},{"start":{"line":177,"column":8},"end":{"line":177,"column":8}}]},"14":{"line":178,"type":"if","locations":[{"start":{"line":178,"column":8},"end":{"line":178,"column":8}},{"start":{"line":178,"column":8},"end":{"line":178,"column":8}}]},"15":{"line":179,"type":"if","locations":[{"start":{"line":179,"column":8},"end":{"line":179,"column":8}},{"start":{"line":179,"column":8},"end":{"line":179,"column":8}}]},"16":{"line":183,"type":"if","locations":[{"start":{"line":183,"column":8},"end":{"line":183,"column":8}},{"start":{"line":183,"column":8},"end":{"line":183,"column":8}}]},"17":{"line":186,"type":"if","locations":[{"start":{"line":186,"column":16},"end":{"line":186,"column":16}},{"start":{"line":186,"column":16},"end":{"line":186,"column":16}}]},"18":{"line":190,"type":"if","locations":[{"start":{"line":190,"column":23},"end":{"line":190,"column":23}},{"start":{"line":190,"column":23},"end":{"line":190,"column":23}}]},"19":{"line":205,"type":"if","locations":[{"start":{"line":205,"column":8},"end":{"line":205,"column":8}},{"start":{"line":205,"column":8},"end":{"line":205,"column":8}}]},"20":{"line":206,"type":"if","locations":[{"start":{"line":206,"column":8},"end":{"line":206,"column":8}},{"start":{"line":206,"column":8},"end":{"line":206,"column":8}}]},"21":{"line":207,"type":"if","locations":[{"start":{"line":207,"column":8},"end":{"line":207,"column":8}},{"start":{"line":207,"column":8},"end":{"line":207,"column":8}}]},"22":{"line":208,"type":"if","locations":[{"start":{"line":208,"column":8},"end":{"line":208,"column":8}},{"start":{"line":208,"column":8},"end":{"line":208,"column":8}}]},"23":{"line":209,"type":"if","locations":[{"start":{"line":209,"column":8},"end":{"line":209,"column":8}},{"start":{"line":209,"column":8},"end":{"line":209,"column":8}}]},"24":{"line":223,"type":"if","locations":[{"start":{"line":223,"column":8},"end":{"line":223,"column":8}},{"start":{"line":223,"column":8},"end":{"line":223,"column":8}}]},"25":{"line":224,"type":"if","locations":[{"start":{"line":224,"column":8},"end":{"line":224,"column":8}},{"start":{"line":224,"column":8},"end":{"line":224,"column":8}}]},"26":{"line":228,"type":"if","locations":[{"start":{"line":228,"column":8},"end":{"line":228,"column":8}},{"start":{"line":228,"column":8},"end":{"line":228,"column":8}}]},"27":{"line":231,"type":"if","locations":[{"start":{"line":231,"column":16},"end":{"line":231,"column":16}},{"start":{"line":231,"column":16},"end":{"line":231,"column":16}}]},"28":{"line":235,"type":"if","locations":[{"start":{"line":235,"column":23},"end":{"line":235,"column":23}},{"start":{"line":235,"column":23},"end":{"line":235,"column":23}}]},"29":{"line":251,"type":"if","locations":[{"start":{"line":251,"column":8},"end":{"line":251,"column":8}},{"start":{"line":251,"column":8},"end":{"line":251,"column":8}}]},"30":{"line":252,"type":"if","locations":[{"start":{"line":252,"column":8},"end":{"line":252,"column":8}},{"start":{"line":252,"column":8},"end":{"line":252,"column":8}}]},"31":{"line":253,"type":"if","locations":[{"start":{"line":253,"column":8},"end":{"line":253,"column":8}},{"start":{"line":253,"column":8},"end":{"line":253,"column":8}}]},"32":{"line":254,"type":"if","locations":[{"start":{"line":254,"column":8},"end":{"line":254,"column":8}},{"start":{"line":254,"column":8},"end":{"line":254,"column":8}}]},"33":{"line":266,"type":"if","locations":[{"start":{"line":266,"column":8},"end":{"line":266,"column":8}},{"start":{"line":266,"column":8},"end":{"line":266,"column":8}}]},"34":{"line":277,"type":"if","locations":[{"start":{"line":277,"column":8},"end":{"line":277,"column":8}},{"start":{"line":277,"column":8},"end":{"line":277,"column":8}}]},"35":{"line":280,"type":"if","locations":[{"start":{"line":280,"column":16},"end":{"line":280,"column":16}},{"start":{"line":280,"column":16},"end":{"line":280,"column":16}}]},"36":{"line":284,"type":"if","locations":[{"start":{"line":284,"column":24},"end":{"line":284,"column":24}},{"start":{"line":284,"column":24},"end":{"line":284,"column":24}}]}}}} \ No newline at end of file diff --git a/legacy/packages/contracts/migrations/1_initial_migration.js b/legacy/packages/contracts/migrations/1_initial_migration.js deleted file mode 100644 index 1eb6f9d..0000000 --- a/legacy/packages/contracts/migrations/1_initial_migration.js +++ /dev/null @@ -1,5 +0,0 @@ -var Migrations = artifacts.require('./Migrations.sol') - -module.exports = function(deployer) { - deployer.deploy(Migrations) -} diff --git a/legacy/packages/contracts/migrations/2_deploy_contract.js b/legacy/packages/contracts/migrations/2_deploy_contract.js deleted file mode 100644 index a621f81..0000000 --- a/legacy/packages/contracts/migrations/2_deploy_contract.js +++ /dev/null @@ -1,13 +0,0 @@ -const SpatialAssets = artifacts.require("./SpatialAssets.sol"); - -module.exports = async function (deployer) { - await deployer.deploy(SpatialAssets, "did:geo:{id}"); - - const SpatialAssetsContract = await SpatialAssets.deployed(); - - console.log( - "Spatial Asset Registrar deployed at:", - SpatialAssetsContract.address - ); - -}; diff --git a/legacy/packages/contracts/package.json b/legacy/packages/contracts/package.json deleted file mode 100644 index 7808850..0000000 --- a/legacy/packages/contracts/package.json +++ /dev/null @@ -1,55 +0,0 @@ -{ - "name": "@astralprotocol/contracts", - "version": "1.0.12", - "description": "These contracts serve as the Registry for the Astral Protocol GeoDIDs. It allows binding of a GeoDID to an ethereum address and CID name resolving. ", - "author": "Astral ", - "homepage": "https://github.com/AstralProtocol/astralprotocol#readme", - "license": "MIT OR Apache-2.0", - "main": "truffle-config.js", - "directories": { - "build": "build", - "contracts": "contracts", - "migrations": "migrations" - }, - "files": [ - "build" - ], - "repository": { - "type": "git", - "url": "git+https://github.com/AstralProtocol/astralprotocol.git", - "directory": "packages/contracts" - }, - "publishConfig": { - "registry": "https://registry.npmjs.org" - }, - "scripts": { - "tsc": "tsc", - "test": "echo \"Error: run tests from root\" && exit 1", - "console": "truffle console --network development", - "ganache": "ganache-cli -h 0.0.0.0 -p 8545 -d -i 333", - "deployGeoDIDs": "truffle exec scripts/deployGeoDIDs.js --network ropsten", - "testg": "truffle exec scripts/test.js --network development", - "new-instance": "truffle exec scripts/newInstance.js --network development", - "remove-links": "truffle exec scripts/newInstance-remove.js --network development", - "truffle-build": "truffle compile -all", - "truffle": "truffle compile --all && truffle migrate --network development --reset && cp -vr ./build/contracts/SpatialAssets.json ../subgraph/abis/SpatialAssets.json", - "truffle-ropsten": "truffle compile --all && truffle migrate --network ropsten --reset && cp -vr ./build/contracts/SpatialAssets.json ../subgraph/abis/SpatialAssets.json", - "mythx": "truffle run verify", - "truffle-test": "truffle test", - "coverage": "truffle run coverage --solcoverjs ./.solcover.js --network development" - }, - "bugs": { - "url": "https://github.com/AstralProtocol/astralprotocol/issues", - "access": "public" - }, - "dependencies": { - "@astralprotocol/core": "^0.1.10", - "@openzeppelin/contracts": "^3.2.0", - "@truffle/hdwallet-provider": "^1.1.1", - "bs58": "^4.0.1", - "coveralls": "^3.1.0", - "dotenv": "^8.2.0", - "solidity-coverage": "^0.7.13", - "truffle": "^5.1.49" - } -} diff --git a/legacy/packages/contracts/scripts/deployGeoDIDs.js b/legacy/packages/contracts/scripts/deployGeoDIDs.js deleted file mode 100644 index 4c796f3..0000000 --- a/legacy/packages/contracts/scripts/deployGeoDIDs.js +++ /dev/null @@ -1,100 +0,0 @@ -const { AstralClient } = require('@astralprotocol/core'); -const SpatialAssets = require("../build/contracts/SpatialAssets.json") -const bs58 = require('bs58') - -module.exports = async function (callback) { - const stringToBytes = (string) => web3.utils.asciiToHex(string) - - // based on https://ethereum.stackexchange.com/questions/17094/how-to-store-ipfs-hash-using-bytes32 - // Return bytes32 hex string from base58 encoded ipfs hash, - // stripping leading 2 bytes from 34 byte IPFS hash - // Assume IPFS defaults: function:0x12=sha2, size:0x20=256 bits - // E.g. "QmNSUYVKDSvPUnRLKmuxk9diJ6yS96r1TrAXzjTiBcCLAL" --> - // "0x017dfd85d4f6cb4dcd715a88101f7b1f06cd1e009b2327a0809d01eb9c91f231" - function getBytes32FromIpfsHash(ipfsListing) { - return "0x"+bs58.decode(ipfsListing).slice(2).toString('hex') - } - - try { - - const accounts = await web3.eth.getAccounts() - const userAccount = accounts[0] - - // find contract in network 3 (Ropsten) - const SpatialAssetsContract = new web3.eth.Contract(SpatialAssets.abi, SpatialAssets.networks['3'].address, { - from: userAccount, - data: SpatialAssets.deployedBytecode, - }); - - const astral = new AstralClient(userAccount); - - const storage = stringToBytes('FILECOIN'); - // Enable a storage first - - try { - await SpatialAssetsContract.methods.enableStorage(storage).send() - .on('receipt', function(receipt){ - // receipt example - console.log(receipt); - - }) - .on('error', function() { // If the transaction was rejected by the network with a receipt, the second parameter will be the receipt. - console.log('Already enabled storage: ' + storage); - }); - } - catch (err) { - // Will throw an error if storage is already active - console.log(err) - } - - - // Creates a Genesis GeoDID - - const genDocRes = await astral.createGenesisGeoDID('collection') - console.log(genDocRes); - - // With the returned IDocumentInfo from the last function, we can pin it. - // Since no token was specified the client will assign a new auth Token to the user. - - const results = await astral.pinDocument(genDocRes); - console.log(results); - - const token = results.token; - - // register the geodid id and cid obtained. Type 0 because it is a collection - - console.log(results.geodidid) - console.log(results.cid) - - const bytes32GeoDID= getBytes32FromIpfsHash(results.geodidid.substring(8)); - const bytes32Cid = getBytes32FromIpfsHash(results.cid); - - try { - await SpatialAssetsContract.methods.registerSpatialAsset(userAccount, bytes32GeoDID, stringToBytes(''),[], bytes32Cid, storage,0).send() - .on('receipt', function(receipt){ - // receipt example - console.log(receipt); - - }) - .on('error', function(error) { // If the transaction was rejected by the network with a receipt, the second parameter will be the receipt. - console.log(error); - }); - } - catch (err) { - // Will throw an error if tx reverts - console.log(err) - } - - - // With the Auth Token and the GeoDID ID we can load the document with the loadDocument function - - const loadResults = await astral.loadDocument(results.geodidid, token); - console.log(loadResults); - - } - catch(error) { - console.log(error) - } - - callback() -}; diff --git a/legacy/packages/contracts/scripts/newInstance-remove.js b/legacy/packages/contracts/scripts/newInstance-remove.js deleted file mode 100644 index 9eae4f8..0000000 --- a/legacy/packages/contracts/scripts/newInstance-remove.js +++ /dev/null @@ -1,107 +0,0 @@ -const SpatialAssets = artifacts.require("./SpatialAssets.sol"); -const bs58 = require('bs58') - -module.exports = async function (callback) { - const stringToBytes = (string) => web3.utils.asciiToHex(string) - - - // based on https://ethereum.stackexchange.com/questions/17094/how-to-store-ipfs-hash-using-bytes32 - // Return bytes32 hex string from base58 encoded ipfs hash, - // stripping leading 2 bytes from 34 byte IPFS hash - // Assume IPFS defaults: function:0x12=sha2, size:0x20=256 bits - // E.g. "QmNSUYVKDSvPUnRLKmuxk9diJ6yS96r1TrAXzjTiBcCLAL" --> - // "0x017dfd85d4f6cb4dcd715a88101f7b1f06cd1e009b2327a0809d01eb9c91f231" - function getBytes32FromIpfsHash(ipfsListing) { - return "0x"+bs58.decode(ipfsListing).slice(2).toString('hex') - } - - const geoDID1 = 'did:geo:QmQ747r7eLfsVtBFBSRwfXsPK6tADJpQzJxz4uFdoZb9XJ'; - - const geoDID2 = 'did:geo:QmNSUYVKDSvPUnRLKmuxk9diJ6yS96r1TrAXzjTiBcCLAL'; - - const geoDID3 = 'did:geo:QmTtDqWzo179ujTXU7pf2PodLNjpcpQQCXhkiQXi6wZvKd'; - - const geoDID4 = 'did:geo:QmYA2fn8cMbVWo4v95RwcwJVyQsNtnEwHerfWR8UNtEwoE'; - - const geoDID5 = 'did:geo:QmV9tSDx9UiPeWExXEeH6aoDvmihvx6jD5eLb4jbTaKGps'; - - const geoDID6 = 'did:geo:QmSrPmbaUKA3ZodhzPWZnpFgcPMFWF4QsxXbkWfEptTBJd'; - - const geoDID7 = 'did:geo:QmdiA1atSBgU178s5rsWont8cYns3fmwHxELTpiP9uFfLW'; - - const geoDIDError = 'did:geo:QmYS4JAwG45SvDEC5AM9Hzv1dfzPoXoBq1N9aTbT3bEs86'; - - const bytes32GeoDID1= getBytes32FromIpfsHash(geoDID1.substring(8)); - const bytes32GeoDID2= getBytes32FromIpfsHash(geoDID2.substring(8)); - const bytes32GeoDID3= getBytes32FromIpfsHash(geoDID3.substring(8)); - const bytes32GeoDID4= getBytes32FromIpfsHash(geoDID4.substring(8)); - const bytes32GeoDID5= getBytes32FromIpfsHash(geoDID5.substring(8)); - const bytes32GeoDID6= getBytes32FromIpfsHash(geoDID6.substring(8)); - const bytes32GeoDID7= getBytes32FromIpfsHash(geoDID7.substring(8)); - const bytes32GeoDIDError= getBytes32FromIpfsHash(geoDIDError.substring(8)); - - - try { - - const SpatialAssetsContract = await SpatialAssets.deployed(); - let tx - - // geodid id 4 remove parent 3 - tx = await SpatialAssetsContract.removeParentGeoDID(bytes32GeoDID4,bytes32GeoDID3) - - console.log( - " geodid id 4 remove parent 3 ", - tx.tx ) - - - // geodid id 6 remove children 1 and 5 - tx = await SpatialAssetsContract.removeChildrenGeoDIDs(bytes32GeoDID6,[bytes32GeoDID1,bytes32GeoDID5]) - - console.log( - " geodid id 6 remove children 1 and 5", - tx.tx - ); - - - - tx = await SpatialAssetsContract.deactivateSpatialAsset(bytes32GeoDID2,[bytes32GeoDID7]) - - console.log( - " geodid id 2 delete", - tx.tx - ); - - // should emit an error that children to be added does not exist - tx = await SpatialAssetsContract.removeChildrenGeoDIDs(bytes32GeoDID1,[bytes32GeoDIDError]) - - console.log( - " geodid id 1 remove error child does not exist", - tx.tx - ); - - // should emit an error in 6 that children already has a parent - tx = await SpatialAssetsContract.addChildrenGeoDIDs(bytes32GeoDID6,[bytes32GeoDID3]) - - console.log( - " geodid id 6 remove error 3 already has a parent", - tx.tx - ); - - // should emit an error that children to be removed does not have a parent - tx = await SpatialAssetsContract.removeChildrenGeoDIDs(bytes32GeoDID1,[bytes32GeoDID4]) - - console.log( - " geodid id 1 remove error 4 does not have a parent", - tx.tx - ); - - - - - } - catch(error) { - console.log(error) - } - - callback() -}; diff --git a/legacy/packages/contracts/scripts/newInstance.js b/legacy/packages/contracts/scripts/newInstance.js deleted file mode 100644 index f04e154..0000000 --- a/legacy/packages/contracts/scripts/newInstance.js +++ /dev/null @@ -1,148 +0,0 @@ -const SpatialAssets = artifacts.require("./SpatialAssets.sol"); -const bs58 = require('bs58') - -module.exports = async function (callback) { - - const stringToBytes = (string) => web3.utils.asciiToHex(string) - - - // based on https://ethereum.stackexchange.com/questions/17094/how-to-store-ipfs-hash-using-bytes32 - // Return bytes32 hex string from base58 encoded ipfs hash, - // stripping leading 2 bytes from 34 byte IPFS hash - // Assume IPFS defaults: function:0x12=sha2, size:0x20=256 bits - // E.g. "QmNSUYVKDSvPUnRLKmuxk9diJ6yS96r1TrAXzjTiBcCLAL" --> - // "0x017dfd85d4f6cb4dcd715a88101f7b1f06cd1e009b2327a0809d01eb9c91f231" - function getBytes32FromIpfsHash(ipfsListing) { - return "0x"+bs58.decode(ipfsListing).slice(2).toString('hex') - } - - const geoDID1 = 'did:geo:QmQ747r7eLfsVtBFBSRwfXsPK6tADJpQzJxz4uFdoZb9XJ'; - const cid1 = 'QmQ747r7eLfsVtBFBSRwfXsPK6tADJpQzJxz4uFdoZb9XJ'; - - const geoDID2 = 'did:geo:QmNSUYVKDSvPUnRLKmuxk9diJ6yS96r1TrAXzjTiBcCLAL'; - const cid2 = 'QmNSUYVKDSvPUnRLKmuxk9diJ6yS96r1TrAXzjTiBcCLAL'; - - const geoDID3 = 'did:geo:QmTtDqWzo179ujTXU7pf2PodLNjpcpQQCXhkiQXi6wZvKd'; - const cid3 = 'QmTtDqWzo179ujTXU7pf2PodLNjpcpQQCXhkiQXi6wZvKd'; - - const geoDID4 = 'did:geo:QmYA2fn8cMbVWo4v95RwcwJVyQsNtnEwHerfWR8UNtEwoE'; - const cid4 = 'QmYA2fn8cMbVWo4v95RwcwJVyQsNtnEwHerfWR8UNtEwoE'; - - const geoDID5 = 'did:geo:QmV9tSDx9UiPeWExXEeH6aoDvmihvx6jD5eLb4jbTaKGps'; - const cid5 = 'QmV9tSDx9UiPeWExXEeH6aoDvmihvx6jD5eLb4jbTaKGps'; - - const geoDID6 = 'did:geo:QmSrPmbaUKA3ZodhzPWZnpFgcPMFWF4QsxXbkWfEptTBJd'; - const cid6 = 'QmSrPmbaUKA3ZodhzPWZnpFgcPMFWF4QsxXbkWfEptTBJd'; - - const geoDID7 = 'did:geo:QmdiA1atSBgU178s5rsWont8cYns3fmwHxELTpiP9uFfLW'; - const cid7 = 'QmdiA1atSBgU178s5rsWont8cYns3fmwHxELTpiP9uFfLW'; - - - const bytes32GeoDID1= getBytes32FromIpfsHash(geoDID1.substring(8)); - const bytes32Cid1 = getBytes32FromIpfsHash(cid1); - - const bytes32GeoDID2= getBytes32FromIpfsHash(geoDID2.substring(8)); - const bytes32Cid2 = getBytes32FromIpfsHash(cid2); - - const bytes32GeoDID3= getBytes32FromIpfsHash(geoDID3.substring(8)); - const bytes32Cid3 = getBytes32FromIpfsHash(cid3); - - const bytes32GeoDID4= getBytes32FromIpfsHash(geoDID4.substring(8)); - const bytes32Cid4 = getBytes32FromIpfsHash(cid4); - - const bytes32GeoDID5= getBytes32FromIpfsHash(geoDID5.substring(8)); - const bytes32Cid5 = getBytes32FromIpfsHash(cid5); - - const bytes32GeoDID6= getBytes32FromIpfsHash(geoDID6.substring(8)); - const bytes32Cid6 = getBytes32FromIpfsHash(cid6); - - const bytes32GeoDID7= getBytes32FromIpfsHash(geoDID7.substring(8)); - const bytes32Cid7 = getBytes32FromIpfsHash(cid7); - - - - try { - - const accounts = await web3.eth.getAccounts() - - const SpatialAssetsContract = await SpatialAssets.deployed(); - - let tx = await SpatialAssetsContract.enableStorage(stringToBytes('FILECOIN')); - - console.log( - "Storage enabled. Tx: ", - tx.tx - ); - - tx = await SpatialAssetsContract.registerSpatialAsset(accounts[0], bytes32GeoDID1, stringToBytes(''),[], bytes32Cid1,stringToBytes('FILECOIN'),0); - - - console.log( - "geodid ", - tx.tx - ); - - tx = await SpatialAssetsContract.registerSpatialAsset(accounts[0],bytes32GeoDID2,bytes32GeoDID1,[],bytes32Cid2, stringToBytes("FILECOIN"),0) - - - console.log( - "geodid ", - tx.tx - ); - - tx = await SpatialAssetsContract.registerSpatialAsset(accounts[0],bytes32GeoDID3,bytes32GeoDID1,[],bytes32Cid3, stringToBytes("FILECOIN"),0) - - console.log( - "geodid ", - tx.tx - ); - - tx = await SpatialAssetsContract.registerSpatialAsset(accounts[0],bytes32GeoDID4,bytes32GeoDID3,[],bytes32Cid4, stringToBytes("FILECOIN"),1) - - console.log( - "geodid ", - tx.tx - ); - - tx = await SpatialAssetsContract.registerSpatialAsset(accounts[0],bytes32GeoDID5,stringToBytes(''),[],bytes32Cid5, stringToBytes("FILECOIN"),1) - - console.log( - "geodid 1", - tx.tx - ); - - tx = await SpatialAssetsContract.registerSpatialAsset(accounts[0],bytes32GeoDID6,stringToBytes(''),[],bytes32Cid6, stringToBytes("FILECOIN"),0) - - console.log( - "geodid ", - tx.tx - ); - tx = await SpatialAssetsContract.addChildrenGeoDIDs(bytes32GeoDID6,[bytes32GeoDID1,bytes32GeoDID5]) - - console.log( - "geodid ", - tx.tx - ); - - tx = await SpatialAssetsContract.registerSpatialAsset(accounts[0],bytes32GeoDID7,stringToBytes(''),[],bytes32Cid7, stringToBytes("FILECOIN"),1) - - console.log( - "geodid ", - tx.tx - ); - - - tx = await SpatialAssetsContract.addParentGeoDID(bytes32GeoDID7,bytes32GeoDID2) - - console.log( - " geodid ", - tx.tx - ); - - } - catch(error) { - console.log(error) - } - - callback() -}; diff --git a/legacy/packages/contracts/scripts/test.js b/legacy/packages/contracts/scripts/test.js deleted file mode 100644 index 60aae33..0000000 --- a/legacy/packages/contracts/scripts/test.js +++ /dev/null @@ -1,82 +0,0 @@ -const SpatialAssets = artifacts.require("./SpatialAssets.sol"); -const bs58 = require('bs58') - -module.exports = async function (callback) { - - const stringToBytes = (string) => web3.utils.asciiToHex(string) - - - // based on https://ethereum.stackexchange.com/questions/17094/how-to-store-ipfs-hash-using-bytes32 - // Return bytes32 hex string from base58 encoded ipfs hash, - // stripping leading 2 bytes from 34 byte IPFS hash - // Assume IPFS defaults: function:0x12=sha2, size:0x20=256 bits - // E.g. "QmNSUYVKDSvPUnRLKmuxk9diJ6yS96r1TrAXzjTiBcCLAL" --> - // "0x017dfd85d4f6cb4dcd715a88101f7b1f06cd1e009b2327a0809d01eb9c91f231" - function getBytes32FromIpfsHash(ipfsListing) { - return "0x"+bs58.decode(ipfsListing).slice(2).toString('hex') - } - - // Return base58 encoded ipfs hash from bytes32 hex string, - // E.g. "0x017dfd85d4f6cb4dcd715a88101f7b1f06cd1e009b2327a0809d01eb9c91f231" - // --> "QmNSUYVKDSvPUnRLKmuxk9diJ6yS96r1TrAXzjTiBcCLAL" - - function getIpfsHashFromBytes32(bytes32Hex) { - // Add our default ipfs values for first 2 bytes: - // function:0x12=sha2, size:0x20=256 bits - // and cut off leading "0x" - const hashHex = "1220" + bytes32Hex.slice(2) - const hashBytes = Buffer.from(hashHex, 'hex'); - const hashStr = bs58.encode(hashBytes) - return hashStr - } - - const geoDID1 = 'did:geo:QmUZ4e5quBeXG5t38hGBgXweob5rat9mcix6qn9AsAMrsC'; - - const geoDID2 = 'did:geo:QmZ9Mc8sPk6oASJz4g1cvgh5bvps6bp7s6B2seK9NyL5qj'; - - const geoDID3 = 'did:geo:QmYgxdsHwArsZdActpg5APsTuYuFAYJY4gZxZkxAcCuDNN'; - - - const bytes32GeoDID1= getBytes32FromIpfsHash(geoDID1.substring(8)); - - const bytes32GeoDID2= getBytes32FromIpfsHash(geoDID2.substring(8)); - - const bytes32GeoDID3= getBytes32FromIpfsHash(geoDID3.substring(8)); - - - - try { - - - console.log("GeoDID1: ", geoDID1) - - console.log("Bytes32 GeoDID1: ", bytes32GeoDID1) - - console.log("Calculated GeoDID1: ", getIpfsHashFromBytes32(bytes32GeoDID1)) - console.log("Calculated GeoDID from subgraph: ", getIpfsHashFromBytes32("0x5c5426554833fdbd64d4041b07a49363a9275520839c88cb9d7d4b5957acbe73")) - - console.log(" ") - - console.log("GeoDID2: ", geoDID2) - - console.log("Bytes32 GeoDID2: ", bytes32GeoDID2) - - console.log("Calculated GeoDID2: ", getIpfsHashFromBytes32(bytes32GeoDID2)) - console.log("Calculated GeoDID from subgraph: ", getIpfsHashFromBytes32("0xa08bd4357eb3a3dbc6b8634c90ab033e51c7027c10468cb90550ad53429f1e32")) - - console.log(" ") - - console.log("GeoDI3: ", geoDID3) - - console.log("Bytes32 GeoDID3: ", bytes32GeoDID3) - - console.log("Calculated GeoDID3: ", getIpfsHashFromBytes32(bytes32GeoDID3)) - console.log("Calculated GeoDID3 from subgraph: ", getIpfsHashFromBytes32("0x99c8c166e8986ffd28f5f5b6438791fb030c406e6fb717cdf3e6a84888be47f7")) - - } - catch(error) { - console.log(error) - } - - callback() -}; diff --git a/legacy/packages/contracts/test/SpatialAssets.js b/legacy/packages/contracts/test/SpatialAssets.js deleted file mode 100644 index 4a118d3..0000000 --- a/legacy/packages/contracts/test/SpatialAssets.js +++ /dev/null @@ -1,773 +0,0 @@ -const SpatialAssets = artifacts.require("SpatialAssets"); -const bs58 = require('bs58') - -contract("SpatialAssets", async accounts => { - let spatialAssets; - const testUri = "did:geo:{id}"; - const testRole = "DATA_SUPPLIER"; - const testStorage = "FILECOIN"; - - const stringToBytes = (string) => web3.utils.asciiToHex(string) - - - // based on https://ethereum.stackexchange.com/questions/17094/how-to-store-ipfs-hash-using-bytes32 - // Return bytes32 hex string from base58 encoded ipfs hash, - // stripping leading 2 bytes from 34 byte IPFS hash - // Assume IPFS defaults: function:0x12=sha2, size:0x20=256 bits - // E.g. "QmNSUYVKDSvPUnRLKmuxk9diJ6yS96r1TrAXzjTiBcCLAL" --> - // "0x017dfd85d4f6cb4dcd715a88101f7b1f06cd1e009b2327a0809d01eb9c91f231" - function getBytes32FromIpfsHash(ipfsListing) { - return "0x"+bs58.decode(ipfsListing).slice(2).toString('hex') - } - - - // Return base58 encoded ipfs hash from bytes32 hex string, - // E.g. "0x017dfd85d4f6cb4dcd715a88101f7b1f06cd1e009b2327a0809d01eb9c91f231" - // --> "QmNSUYVKDSvPUnRLKmuxk9diJ6yS96r1TrAXzjTiBcCLAL" - - function getIpfsHashFromBytes32(bytes32Hex) { - // Add our default ipfs values for first 2 bytes: - // function:0x12=sha2, size:0x20=256 bits - // and cut off leading "0x" - const hashHex = "1220" + bytes32Hex.slice(2) - const hashBytes = Buffer.from(hashHex, 'hex'); - const hashStr = bs58.encode(hashBytes) - return hashStr - } - - before(async () => { - spatialAssets = await SpatialAssets.deployed(); - }); - - it('Should deploy smart contract properly', async() => { - const spatialAssets = await SpatialAssets.deployed(); - assert(spatialAssets.address !== ''); - }); - - it("Should assign the uri correctly", async () => { - const uri = await spatialAssets.uri(); - assert.equal(testUri, uri, "The uri was incorrectly assigned"); - }); - - it("Should enable a storage correctly", async () => { - await spatialAssets.enableStorage(stringToBytes(testStorage), {from: accounts[0]}); - const storageAllowed = await spatialAssets.allowedStorages(stringToBytes(testStorage)); - assert(storageAllowed, "The storage was created"); - }); - - it("Shouldn't let a non admin user register a storage", async () => { - try { - await spatialAssets.enableStorage(stringToBytes('SKYDB'), {from: accounts[1]}); - assert(false); - } catch (err) { - assert(err.message.includes("SpatialAssets: must have admin role to edit allowed offchain storages")); - } - }); - - it("Shouldn't let the same storage be registerd twice", async () => { - try { - await spatialAssets.enableStorage(stringToBytes(testStorage), {from: accounts[0]}); - assert(false); - } catch (err) { - assert(err.message.includes("SpatialAssets: storage must not be active yet")); - } - }); - - it("Should disable a storage correctly", async () => { - await spatialAssets.enableStorage(stringToBytes('SKYDB'), {from: accounts[0]}); - await spatialAssets.disableStorage(stringToBytes('SKYDB'), {from: accounts[0]}); - const storageAllowed = await spatialAssets.allowedStorages(stringToBytes('SKYDB')); - assert(!storageAllowed, "The storage was disabled"); - }); - - - it("Shouldn't let a non admin user disable a storage", async () => { - try { - await spatialAssets.disableStorage(stringToBytes(testStorage), {from: accounts[1]}); - assert(false); - } catch (err) { - assert(err.message.includes("SpatialAssets: must have admin role to edit allowed offchain storages")); - } - }); - - it("Should register a role correctly", async () => { - await spatialAssets.registerRole({from: accounts[1]}); - - assert(spatialAssets.hasRole(stringToBytes(testRole), accounts[1]), "The role was created"); - }); - - - it("Shouldn't let a user register with the same role twice", async () => { - try { - await spatialAssets.registerRole({from: accounts[1]}); - assert(false); - } catch (err) { - assert(err.message.includes("SpatialAssets: must not have a DATA_SUPPLIER role yet")); - } - }); - - it("Should register a spatial asset correctly without a parent", async () => { - const geodidid = 'did:geo:QmNSUYVKDSvPUnRLKmuxk9diJ6yS96r1TrAXzjTiBcCLAL'; - const bytes32GeoDID = getBytes32FromIpfsHash(geodidid.substring(8)); - const cid = 'QmNSUYVKDSvPUnRLKmuxk9diJ6yS96r1TrAXzjTiBcCLAL'; - const bytes32Cid = getBytes32FromIpfsHash(cid); - - await spatialAssets.registerSpatialAsset(accounts[1], bytes32GeoDID, stringToBytes(''), [], bytes32Cid, stringToBytes(testStorage), 0, {from: accounts[1]}); - - const owner = await spatialAssets.idToOwner(bytes32GeoDID); - const externalStorage = await spatialAssets.idToExternalStorage(bytes32GeoDID); - const canBeParent = await spatialAssets.idToCanBeParent(bytes32GeoDID); - const hasParent = await spatialAssets.idToHasParent(bytes32GeoDID); - - assert.equal(owner, accounts[1], "Ownership not correctly assigned"); - assert.equal(web3.utils.hexToAscii(externalStorage).replace(/\u0000/g, ''), testStorage, "External storage was not correctly assigned"); - assert(canBeParent, "Can be parent"); - assert(!hasParent, "Does not have parent"); - - }); - - it("Should register a spatial asset correctly with a parent", async () => { - const geodididParent = 'did:geo:QmRAQB6YaCyidP37UdDnjFY5vQuiBrcqdyoW1CuDgwxkD4'; - const cidParent = 'QmRAQB6YaCyidP37UdDnjFY5vQuiBrcqdyoW1CuDgwxkD4'; - - const geodididChild = 'did:geo:QmTtDqWzo179ujTXU7pf2PodLNjpcpQQCXhkiQXi6wZvKd'; - const cidChild = 'QmTtDqWzo179ujTXU7pf2PodLNjpcpQQCXhkiQXi6wZvKd'; - - const bytes32GeoDIDParent = getBytes32FromIpfsHash(geodididParent.substring(8)); - const bytes32CidParent = getBytes32FromIpfsHash(cidParent); - - const bytes32GeoDIDChild = getBytes32FromIpfsHash(geodididChild.substring(8)); - const bytes32CidChild = getBytes32FromIpfsHash(cidChild); - - await spatialAssets.registerSpatialAsset(accounts[1], bytes32GeoDIDParent, stringToBytes(''), [], bytes32CidParent, stringToBytes(testStorage), 0, {from: accounts[1]}); - await spatialAssets.registerSpatialAsset(accounts[1], bytes32GeoDIDChild, bytes32GeoDIDParent, [], bytes32CidChild, stringToBytes(testStorage), 0, {from: accounts[1]}); - - const owner = await spatialAssets.idToOwner(bytes32GeoDIDChild); - const externalStorage = await spatialAssets.idToExternalStorage(bytes32GeoDIDChild); - const canBeParent = await spatialAssets.idToCanBeParent(bytes32GeoDIDChild); - const hasParent = await spatialAssets.idToHasParent(bytes32GeoDIDChild); - - assert.equal(owner, accounts[1], "Ownership not correctly assigned"); - assert.equal(web3.utils.hexToAscii(externalStorage).replace(/\u0000/g, ''), testStorage, "External storage was not correctly assigned"); - assert(canBeParent, "Can be parent"); - assert(hasParent, "Does have parent"); - -}); - - it("Should register a spatial asset correctly of type 1 without parent", async () => { - const geodidid = 'did:geo:QmYA2fn8cMbVWo4v95RwcwJVyQsNtnEwHerfWR8UNtEwoE'; - const bytes32GeoDID = getBytes32FromIpfsHash(geodidid.substring(8)); - const cid = 'QmYA2fn8cMbVWo4v95RwcwJVyQsNtnEwHerfWR8UNtEwoE'; - const bytes32Cid = getBytes32FromIpfsHash(cid); - - await spatialAssets.registerSpatialAsset(accounts[1], bytes32GeoDID, stringToBytes(''), [], bytes32Cid, stringToBytes(testStorage), 1, {from: accounts[1]}); - - const owner = await spatialAssets.idToOwner(bytes32GeoDID); - const externalStorage = await spatialAssets.idToExternalStorage(bytes32GeoDID); - const canBeParent = await spatialAssets.idToCanBeParent(bytes32GeoDID); - const hasParent = await spatialAssets.idToHasParent(bytes32GeoDID); - - assert.equal(owner, accounts[1], "Ownership not correctly assigned"); - assert.equal(web3.utils.hexToAscii(externalStorage).replace(/\u0000/g, ''), testStorage, "External storage was not correctly assigned"); - assert(!canBeParent, "Cannot be parent"); - assert(!hasParent, "Does not have parent"); - -}); - -it("Should register a spatial asset correctly of type 1 with a parent", async () => { - const geodididParent = 'did:geo:QmV9tSDx9UiPeWExXEeH6aoDvmihvx6jD5eLb4jbTaKGps'; - const cidParent = 'QmV9tSDx9UiPeWExXEeH6aoDvmihvx6jD5eLb4jbTaKGps'; - - const geodididChild = 'did:geo:QmSrPmbaUKA3ZodhzPWZnpFgcPMFWF4QsxXbkWfEptTBJd'; - const cidChild = 'QmSrPmbaUKA3ZodhzPWZnpFgcPMFWF4QsxXbkWfEptTBJd'; - - const bytes32GeoDIDParent = getBytes32FromIpfsHash(geodididParent.substring(8)); - const bytes32CidParent = getBytes32FromIpfsHash(cidParent); - - const bytes32GeoDIDChild = getBytes32FromIpfsHash(geodididChild.substring(8)); - const bytes32CidChild = getBytes32FromIpfsHash(cidChild); - - await spatialAssets.registerSpatialAsset(accounts[1], bytes32GeoDIDParent, stringToBytes(''), [], bytes32CidParent, stringToBytes(testStorage), 0, {from: accounts[1]}); - - await spatialAssets.registerSpatialAsset(accounts[1], bytes32GeoDIDChild, bytes32GeoDIDParent, [], bytes32CidChild, stringToBytes(testStorage), 1, {from: accounts[1]}); - - const owner = await spatialAssets.idToOwner(bytes32GeoDIDChild); - const externalStorage = await spatialAssets.idToExternalStorage(bytes32GeoDIDChild); - const canBeParent = await spatialAssets.idToCanBeParent(bytes32GeoDIDChild); - const hasParent = await spatialAssets.idToHasParent(bytes32GeoDIDChild); - - assert.equal(owner, accounts[1], "Ownership not correctly assigned"); - assert.equal(web3.utils.hexToAscii(externalStorage).replace(/\u0000/g, ''), testStorage, "External storage was not correctly assigned"); - assert(!canBeParent, "Cannot be parent"); - assert(hasParent, "Does not have parent"); - -}); - - - -it("Should register a spatial asset correctly of type 0 without parent with a chidren", async () => { - - const geodididParent = 'did:geo:QmdiA1atSBgU178s5rsWont8cYns3fmwHxELTpiP9uFfLW'; - const cidParent = 'QmdiA1atSBgU178s5rsWont8cYns3fmwHxELTpiP9uFfLW'; - - const geodididChild = 'did:geo:QmXExS4BMc1YrH6iWERyryFcDWkvobxryXSwECLrcd7Y1H'; - const cidChild = 'QmXExS4BMc1YrH6iWERyryFcDWkvobxryXSwECLrcd7Y1H'; - - const bytes32GeoDIDParent = getBytes32FromIpfsHash(geodididParent.substring(8)); - const bytes32CidParent = getBytes32FromIpfsHash(cidParent); - - const bytes32GeoDIDChild = getBytes32FromIpfsHash(geodididChild.substring(8)); - const bytes32CidChild = getBytes32FromIpfsHash(cidChild); - - await spatialAssets.registerSpatialAsset(accounts[1], bytes32GeoDIDChild, stringToBytes(''), [], bytes32CidChild, stringToBytes(testStorage), 1, {from: accounts[1]}); - - await spatialAssets.registerSpatialAsset(accounts[1], bytes32GeoDIDParent, stringToBytes(''), [bytes32GeoDIDChild], bytes32CidParent, stringToBytes(testStorage), 0, {from: accounts[1]}); - - const owner = await spatialAssets.idToOwner(bytes32GeoDIDParent); - const externalStorage = await spatialAssets.idToExternalStorage(bytes32GeoDIDParent); - const canBeParent = await spatialAssets.idToCanBeParent(bytes32GeoDIDParent); - const hasParent = await spatialAssets.idToHasParent(bytes32GeoDIDParent); - - assert.equal(owner, accounts[1], "Ownership not correctly assigned"); - assert.equal(web3.utils.hexToAscii(externalStorage).replace(/\u0000/g, ''), testStorage, "External storage was not correctly assigned"); - assert(canBeParent, "Is a parent"); - assert(!hasParent, "Does not have parent"); - -}); - - it("Should register a spatial asset correctly of type 0 with a parent and with a children", async () => { - - const geodididParent = 'did:geo:QmR29wrbNv3WrMuodwuLiDwvskuZKKeTtcYDw7SwNffzCH'; - const cidParent = 'QmR29wrbNv3WrMuodwuLiDwvskuZKKeTtcYDw7SwNffzCH'; - - const geodidid = 'did:geo:Qmc2ot2NQadXmbvPbsidyjYDvPfPwKZmovzNpfRPKxXUrL'; - const cid = 'Qmc2ot2NQadXmbvPbsidyjYDvPfPwKZmovzNpfRPKxXUrL'; - - const geodididChild = 'did:geo:QmdsCAZ3KEVPNTkUtru1wtFRUoYnGsfjQnAMPyiEdFZdM9'; - const cidChild = 'QmdsCAZ3KEVPNTkUtru1wtFRUoYnGsfjQnAMPyiEdFZdM9'; - - const bytes32GeoDIDParent = getBytes32FromIpfsHash(geodididParent.substring(8)); - const bytes32CidParent = getBytes32FromIpfsHash(cidParent); - - const bytes32GeoDID = getBytes32FromIpfsHash(geodidid.substring(8)); - const bytes32Cid = getBytes32FromIpfsHash(cid); - - - const bytes32GeoDIDChild = getBytes32FromIpfsHash(geodididChild.substring(8)); - const bytes32CidChild = getBytes32FromIpfsHash(cidChild); - - - await spatialAssets.registerSpatialAsset(accounts[1], bytes32GeoDIDParent, stringToBytes(''), [], bytes32CidParent, stringToBytes(testStorage), 0, {from: accounts[1]}); - - await spatialAssets.registerSpatialAsset(accounts[1], bytes32GeoDIDChild, stringToBytes(''), [], bytes32CidChild, stringToBytes(testStorage), 1, {from: accounts[1]}); - - await spatialAssets.registerSpatialAsset(accounts[1], bytes32GeoDID, bytes32GeoDIDParent, [bytes32GeoDIDChild], bytes32Cid, stringToBytes(testStorage), 0, {from: accounts[1]}); - - - const owner = await spatialAssets.idToOwner(bytes32GeoDID); - const externalStorage = await spatialAssets.idToExternalStorage(bytes32GeoDID); - const canBeParent = await spatialAssets.idToCanBeParent(bytes32GeoDID); - const hasParent = await spatialAssets.idToHasParent(bytes32GeoDID); - - assert.equal(owner, accounts[1], "Ownership not correctly assigned"); - assert.equal(web3.utils.hexToAscii(externalStorage).replace(/\u0000/g, ''), testStorage, "External storage was not correctly assigned"); - assert(canBeParent, "Is a parent"); - assert(hasParent, "Has a parent"); - - }); - - - it("Shouldn't register a spatial asset for someone without the proper role", async () => { - const geodididParent = 'did:geo:QmR29wrbNv3WrMuodwuLiDwvskuZKKeTtcYDw7SwNffzCH'; - - const geodidid = 'did:geo:Qmc2ot2NQadXmbvPbsidyjYDvPfPwKZmovzNpfRPKxXUrL'; - const cid = 'Qmc2ot2NQadXmbvPbsidyjYDvPfPwKZmovzNpfRPKxXUrL'; - - const bytes32GeoDIDParent = getBytes32FromIpfsHash(geodididParent.substring(8)); - - const bytes32GeoDID = getBytes32FromIpfsHash(geodidid.substring(8)); - const bytes32Cid = getBytes32FromIpfsHash(cid); - - try { - await spatialAssets.registerSpatialAsset(accounts[2], bytes32GeoDID, bytes32GeoDIDParent, [], bytes32Cid, stringToBytes(testStorage), 0, {from: accounts[2]}); - - assert(false); - } catch (err) { - assert(err.message.includes("SpatialAssets: must have data supplier role to register")); - } - }); - - it("Shouldn't register a spatial asset for a storage not yet allowed", async () => { - const geodididParent = 'did:geo:QmR29wrbNv3WrMuodwuLiDwvskuZKKeTtcYDw7SwNffzCH'; - - const geodidid = 'did:geo:Qmc2ot2NQadXmbvPbsidyjYDvPfPwKZmovzNpfRPKxXUrL'; - const cid = 'Qmc2ot2NQadXmbvPbsidyjYDvPfPwKZmovzNpfRPKxXUrL'; - - const bytes32GeoDIDParent = getBytes32FromIpfsHash(geodididParent.substring(8)); - - const bytes32GeoDID = getBytes32FromIpfsHash(geodidid.substring(8)); - const bytes32Cid = getBytes32FromIpfsHash(cid); - - try { - await spatialAssets.registerSpatialAsset(accounts[1], bytes32GeoDID, bytes32GeoDIDParent, [], bytes32Cid, stringToBytes('SKYDB'), 0, {from: accounts[1]}); - - assert(false); - } catch (err) { - assert(err.message.includes("SpatialAssets: storage must be allowed")); - } - }); - - - it("Shouldn't register a spatial asset with the same id", async () => { - const geodidid = 'did:geo:Qmc2ot2NQadXmbvPbsidyjYDvPfPwKZmovzNpfRPKxXUrL'; - const cid = 'Qmc2ot2NQadXmbvPbsidyjYDvPfPwKZmovzNpfRPKxXUrL'; - - const bytes32GeoDID = getBytes32FromIpfsHash(geodidid.substring(8)); - const bytes32Cid = getBytes32FromIpfsHash(cid); - - - try { - await spatialAssets.registerSpatialAsset(accounts[1], bytes32GeoDID, '0x0', [], bytes32Cid, stringToBytes(testStorage),0,{from: accounts[1]}); - - assert(false); - } catch (err) { - assert(err.message.includes("SpatialAssets: id must not have an owner yet")); - } - }); - - it("Shouldn't register a spatial asset without the proper geodid type", async () => { - const geodidid = 'did:geo:Qmc2ot2NQadXmbvPbsidyjYDvPfPwKZmovzNpfRPKxXUrL'; - - const geodididChild = 'did:geo:QmYMg6WAuvF5i5yFmjT8KkqewZ5Ngh4U9Mp1bGfdjraFVk'; - const cidChild = 'QmYMg6WAuvF5i5yFmjT8KkqewZ5Ngh4U9Mp1bGfdjraFVk'; - - const bytes32GeoDID = getBytes32FromIpfsHash(geodidid.substring(8)); - - const bytes32GeoDIDChild = getBytes32FromIpfsHash(geodididChild.substring(8)); - const bytes32CidChild = getBytes32FromIpfsHash(cidChild); - - try { - await spatialAssets.registerSpatialAsset(accounts[1], bytes32GeoDIDChild, bytes32GeoDID, [], bytes32CidChild, stringToBytes(testStorage), 2,{from: accounts[1]}); - - assert(false); - } catch (err) { - assert(err.message.includes("Spatial Assets: wrong geodidtype")); - } - }); - - - it("Should add children to an already created geodid correctly", async () => { - // already created above - const geodidid = 'did:geo:Qmc2ot2NQadXmbvPbsidyjYDvPfPwKZmovzNpfRPKxXUrL'; - - const geodididChild = 'did:geo:QmdPtC3T7Kcu9iJg6hYzLBWR5XCDcYMY7HV685E3kH3EcS'; - const cidChild = 'QmdPtC3T7Kcu9iJg6hYzLBWR5XCDcYMY7HV685E3kH3EcS'; - - const bytes32GeoDID = getBytes32FromIpfsHash(geodidid.substring(8)); - - const bytes32GeoDIDChild = getBytes32FromIpfsHash(geodididChild.substring(8)); - const bytes32CidChild = getBytes32FromIpfsHash(cidChild); - - - await spatialAssets.registerSpatialAsset(accounts[1], bytes32GeoDIDChild, stringToBytes(''), [], bytes32CidChild, stringToBytes(testStorage), 1, {from: accounts[1]}); - - await spatialAssets.addChildrenGeoDIDs(bytes32GeoDID, [bytes32GeoDIDChild], {from: accounts[1]}); - - const hasParent = await spatialAssets.idToHasParent(bytes32GeoDIDChild); - - assert(hasParent, "Geodid children successfuly added"); - - }); - - it("Shouldn't register a children by someone without the proper role", async () => { - const geodidid = 'did:geo:Qmc2ot2NQadXmbvPbsidyjYDvPfPwKZmovzNpfRPKxXUrL'; - - const geodididChild = 'did:geo:QmdPtC3T7Kcu9iJg6hYzLBWR5XCDcYMY7HV685E3kH3EcS'; - - const bytes32GeoDID = getBytes32FromIpfsHash(geodidid.substring(8)); - - const bytes32GeoDIDChild = getBytes32FromIpfsHash(geodididChild.substring(8)); - - try { - await spatialAssets.addChildrenGeoDIDs(bytes32GeoDID, [bytes32GeoDIDChild], {from: accounts[2]}); - - assert(false); - } catch (err) { - assert(err.message.includes("SpatialAssets: must have data supplier role to register")); - } - }); - - it("Shouldn't register a children to a geodid that does not exist", async () => { - const geodidid = 'did:geo:QmcniBv7UQ4gGPQQW2BwbD4ZZHzN3o3tPuNLZCbBchd1zh'; - - const geodididChild = 'did:geo:QmdPtC3T7Kcu9iJg6hYzLBWR5XCDcYMY7HV685E3kH3EcS'; - - const bytes32GeoDID = getBytes32FromIpfsHash(geodidid.substring(8)); - - const bytes32GeoDIDChild = getBytes32FromIpfsHash(geodididChild.substring(8)); - - try { - await spatialAssets.addChildrenGeoDIDs(bytes32GeoDID, [bytes32GeoDIDChild], {from: accounts[1]}); - - assert(false); - } catch (err) { - assert(err.message.includes("SpatialAssets: geoDIDId must be owned by its creator")); - } - }); - - it("Shouldn't register a children to a geodid that cannot be parent", async () => { - const geodidid = 'did:geo:QmdsCAZ3KEVPNTkUtru1wtFRUoYnGsfjQnAMPyiEdFZdM9'; - - const geodididChild = 'did:geo:QmdPtC3T7Kcu9iJg6hYzLBWR5XCDcYMY7HV685E3kH3EcS'; - - const bytes32GeoDID = getBytes32FromIpfsHash(geodidid.substring(8)); - - const bytes32GeoDIDChild = getBytes32FromIpfsHash(geodididChild.substring(8)); - - try { - await spatialAssets.addChildrenGeoDIDs(bytes32GeoDID, [bytes32GeoDIDChild], {from: accounts[1]}); - - assert(false); - } catch (err) { - assert(err.message.includes("SpatialAssets: geoDIDId must be able to be parent (a Collection)")); - } - }); - - it("Shouldn't register a parent by someone without the proper role", async () => { - const geodidid = 'did:geo:Qmc2ot2NQadXmbvPbsidyjYDvPfPwKZmovzNpfRPKxXUrL'; - - const geodididChild = 'did:geo:QmdPtC3T7Kcu9iJg6hYzLBWR5XCDcYMY7HV685E3kH3EcS'; - - const bytes32GeoDID = getBytes32FromIpfsHash(geodidid.substring(8)); - - const bytes32GeoDIDChild = getBytes32FromIpfsHash(geodididChild.substring(8)); - - try { - await spatialAssets.addParentGeoDID(bytes32GeoDIDChild, bytes32GeoDID, {from: accounts[2]}); - - assert(false); - } catch (err) { - assert(err.message.includes("SpatialAssets: must have data supplier role to register")); - } - }); - - it("Shouldn't register a parent if the child geodid wasn't created by the sender", async () => { - const geodidid = 'did:geo:Qmc2ot2NQadXmbvPbsidyjYDvPfPwKZmovzNpfRPKxXUrL'; - - const geodididChild = 'did:geo:QmdPtC3T7Kcu9iJg6hYzLBWR5XCDcYMY7HV685E3kH3EcS'; - - const bytes32GeoDID = getBytes32FromIpfsHash(geodidid.substring(8)); - - const bytes32GeoDIDChild = getBytes32FromIpfsHash(geodididChild.substring(8)); - - try { - await spatialAssets.addParentGeoDID(bytes32GeoDIDChild, bytes32GeoDID, {from: accounts[0]}); - - assert(false); - } catch (err) { - assert(err.message.includes("SpatialAssets: geoDIDId must be owned by its creator")); - } - }); - - it("Shouldn't register a parent if it does not exist", async () => { - const geodidid = 'did:geo:QmcniBv7UQ4gGPQQW2BwbD4ZZHzN3o3tPuNLZCbBchd1zh'; - - const geodididChild = 'did:geo:QmdPtC3T7Kcu9iJg6hYzLBWR5XCDcYMY7HV685E3kH3EcS'; - - const bytes32GeoDID = getBytes32FromIpfsHash(geodidid.substring(8)); - - const bytes32GeoDIDChild = getBytes32FromIpfsHash(geodididChild.substring(8)); - - try { - await spatialAssets.addParentGeoDID(bytes32GeoDIDChild, bytes32GeoDID, {from: accounts[1]}); - - assert(false); - } catch (err) { - assert(err.message.includes("SpatialAssets: parentGeoDIDId does not exist")); - } - }); - - it("Shouldn't register a parent to a geodid that already has a parent", async () => { - const geodidid = 'did:geo:QmavE42xtK1VovJFVTVkCR5Jdf761QWtxmvak9Zx718TVr'; - const cid = 'QmavE42xtK1VovJFVTVkCR5Jdf761QWtxmvak9Zx718TVr'; - - const bytes32GeoDID = getBytes32FromIpfsHash(geodidid.substring(8)); - const bytes32Cid = getBytes32FromIpfsHash(cid); - - - const geodididChild = 'did:geo:QmdsCAZ3KEVPNTkUtru1wtFRUoYnGsfjQnAMPyiEdFZdM9'; - - const bytes32GeoDIDChild = getBytes32FromIpfsHash(geodididChild.substring(8)); - - await spatialAssets.registerSpatialAsset(accounts[1], bytes32GeoDID, stringToBytes(''), [], bytes32Cid, stringToBytes(testStorage), 0, {from: accounts[1]}); - - try { - await spatialAssets.addParentGeoDID(bytes32GeoDIDChild, bytes32GeoDID, {from: accounts[1]}); - - assert(false); - } catch (err) { - assert(err.message.includes("SpatialAssets: geoDIDId already has a parent")); - } - }); - - - it("Shouldn't register as parent a geodid that cannot be parent", async () => { - const geodidid = 'did:geo:QmavE42xtK1VovJFVTVkCR5Jdf761QWtxmvak9Zx718TVr'; - - const bytes32GeoDID = getBytes32FromIpfsHash(geodidid.substring(8)); - - const geodididChild = 'did:geo:QmdsCAZ3KEVPNTkUtru1wtFRUoYnGsfjQnAMPyiEdFZdM9'; - - const bytes32GeoDIDChild = getBytes32FromIpfsHash(geodididChild.substring(8)); - - try { - await spatialAssets.addParentGeoDID(bytes32GeoDID, bytes32GeoDIDChild, {from: accounts[1]}); - - assert(false); - } catch (err) { - assert(err.message.includes("SpatialAssets: parentGeoDIDId must be able to be parent (a Collection)")); - } - }); - - - - it("Should add a parent to an already created geodid correctly", async () => { - const geodidid = 'did:geo:QmavE42xtK1VovJFVTVkCR5Jdf761QWtxmvak9Zx718TVr'; - const bytes32GeoDID = getBytes32FromIpfsHash(geodidid.substring(8)); - - - const geodididChild = 'did:geo:QmeKZSrzAZ5bhaxH2rvm8HEsiqfKceG1FuLHwwbD3mbnEo'; - const cidChild = 'QmeKZSrzAZ5bhaxH2rvm8HEsiqfKceG1FuLHwwbD3mbnEo'; - - const bytes32GeoDIDChild = getBytes32FromIpfsHash(geodididChild.substring(8)); - const bytes32CidChild = getBytes32FromIpfsHash(cidChild); - - - await spatialAssets.registerSpatialAsset(accounts[1], bytes32GeoDIDChild, stringToBytes(''), [], bytes32CidChild, stringToBytes(testStorage), 1, {from: accounts[1]}); - - - await spatialAssets.addParentGeoDID(bytes32GeoDIDChild, bytes32GeoDID, {from: accounts[1]}); - - const hasParent = await spatialAssets.idToHasParent(bytes32GeoDIDChild); - - assert(hasParent, "Geodid children successfuly added"); - - }); - - - it("Shouldn't remove children by an account without proper roles", async () => { - const geodidid = 'did:geo:QmavE42xtK1VovJFVTVkCR5Jdf761QWtxmvak9Zx718TVr'; - const bytes32GeoDID = getBytes32FromIpfsHash(geodidid.substring(8)); - - const geodididChild = 'did:geo:QmeKZSrzAZ5bhaxH2rvm8HEsiqfKceG1FuLHwwbD3mbnEo'; - - const bytes32GeoDIDChild = getBytes32FromIpfsHash(geodididChild.substring(8)); - - try { - await spatialAssets.removeChildrenGeoDIDs(bytes32GeoDID, [bytes32GeoDIDChild], {from: accounts[3]}); - - assert(false); - } catch (err) { - assert(err.message.includes("SpatialAssets: must have data supplier role to register")); - } - }); - - - it("Shouldn't remove children to a non existent geodid", async () => { - const geodidid = 'did:geo:QmccqhJg5wm5kNjAP4k4HrYxoqaXUGNuotDUqfvYBx8jrR'; - const bytes32GeoDID = getBytes32FromIpfsHash(geodidid.substring(8)); - - const geodididChild = 'did:geo:QmeKZSrzAZ5bhaxH2rvm8HEsiqfKceG1FuLHwwbD3mbnEo'; - - const bytes32GeoDIDChild = getBytes32FromIpfsHash(geodididChild.substring(8)); - - try { - await spatialAssets.removeChildrenGeoDIDs(bytes32GeoDID, [bytes32GeoDIDChild], {from: accounts[1]}); - - assert(false); - } catch (err) { - assert(err.message.includes("SpatialAssets: id must not have an owner yet")); - } - }); - - it("Should remove children correctly", async () => { - const geodidid = 'did:geo:QmavE42xtK1VovJFVTVkCR5Jdf761QWtxmvak9Zx718TVr'; - const bytes32GeoDID = getBytes32FromIpfsHash(geodidid.substring(8)); - - const geodididChild = 'did:geo:QmeKZSrzAZ5bhaxH2rvm8HEsiqfKceG1FuLHwwbD3mbnEo'; - - const bytes32GeoDIDChild = getBytes32FromIpfsHash(geodididChild.substring(8)); - - await spatialAssets.removeChildrenGeoDIDs(bytes32GeoDID, [bytes32GeoDIDChild], {from: accounts[1]}); - - const hasParent = await spatialAssets.idToHasParent(bytes32GeoDIDChild); - - assert(!hasParent, "Parent successfuly removed"); - }); - - - it("Shouldn't remove a parent by a sender without proper roles", async () => { - - const geodidid = 'did:geo:Qmc2ot2NQadXmbvPbsidyjYDvPfPwKZmovzNpfRPKxXUrL'; - - const geodididChild = 'did:geo:QmdsCAZ3KEVPNTkUtru1wtFRUoYnGsfjQnAMPyiEdFZdM9'; - - const bytes32GeoDID = getBytes32FromIpfsHash(geodidid.substring(8)); - - const bytes32GeoDIDChild = getBytes32FromIpfsHash(geodididChild.substring(8)); - - - try { - await spatialAssets.removeParentGeoDID(bytes32GeoDIDChild, bytes32GeoDID, {from: accounts[2]}); - - assert(false); - } catch (err) { - assert(err.message.includes("SpatialAssets: must have data supplier role to register")); - } - }); - - - - it("Shouldn't remove a parent to a geodid that does not exist", async () => { - const geodidid = 'did:geo:Qmc2ot2NQadXmbvPbsidyjYDvPfPwKZmovzNpfRPKxXUrL'; - - const geodididChild = 'did:geo:QmNwEiWPc8EPc9kGEqdi9UeM5RY8jRJSPVdrtKELFZRH85'; - - const bytes32GeoDID = getBytes32FromIpfsHash(geodidid.substring(8)); - - const bytes32GeoDIDChild = getBytes32FromIpfsHash(geodididChild.substring(8)); - - try { - await spatialAssets.removeParentGeoDID(bytes32GeoDIDChild, bytes32GeoDID, {from: accounts[1]}); - - assert(false); - } catch (err) { - assert(err.message.includes("SpatialAssets: id must not have an owner yet")); - } - }); - - it("Shouldn't remove a parent that does not exist", async () => { - const geodidid = 'did:geo:QmNwEiWPc8EPc9kGEqdi9UeM5RY8jRJSPVdrtKELFZRH85'; - - const geodididChild = 'did:geo:Qmc2ot2NQadXmbvPbsidyjYDvPfPwKZmovzNpfRPKxXUrL'; - - const bytes32GeoDID = getBytes32FromIpfsHash(geodidid.substring(8)); - - const bytes32GeoDIDChild = getBytes32FromIpfsHash(geodididChild.substring(8)); - - try { - await spatialAssets.removeParentGeoDID(bytes32GeoDIDChild, bytes32GeoDID, {from: accounts[1]}); - - assert(false); - } catch (err) { - assert(err.message.includes("SpatialAssets: GeoDID to be removed as parent does not exist")); - } - }); - - - it("Shouldn't remove a parent to a geodid that does not have a parent", async () => { - const geodididParent = 'did:geo:QmdiA1atSBgU178s5rsWont8cYns3fmwHxELTpiP9uFfLW'; - - const bytes32GeoDIDParent = getBytes32FromIpfsHash(geodididParent.substring(8)); - - const geodididChild = 'did:geo:Qmc2ot2NQadXmbvPbsidyjYDvPfPwKZmovzNpfRPKxXUrL'; - - const bytes32GeoDIDChild = getBytes32FromIpfsHash(geodididChild.substring(8)); - - try { - await spatialAssets.removeParentGeoDID(bytes32GeoDIDParent, bytes32GeoDIDChild, {from: accounts[1]}); - - assert(false); - } catch (err) { - assert(err.message.includes("SpatialAssets: GeoDID does not have a parent to remove")); - } - }); - - it("Should remove a parent correctly", async () => { - - const geodididParent = 'did:geo:QmR29wrbNv3WrMuodwuLiDwvskuZKKeTtcYDw7SwNffzCH'; - - const geodidid = 'did:geo:Qmc2ot2NQadXmbvPbsidyjYDvPfPwKZmovzNpfRPKxXUrL'; - - const bytes32GeoDIDParent = getBytes32FromIpfsHash(geodididParent.substring(8)); - - const bytes32GeoDID = getBytes32FromIpfsHash(geodidid.substring(8)); - - - await spatialAssets.removeParentGeoDID(bytes32GeoDID, bytes32GeoDIDParent, {from: accounts[1]}); - - const hasParent = await spatialAssets.idToHasParent(bytes32GeoDID); - - assert(!hasParent, "Parent successfuly removed"); -}); - - - - it("Shouldn't deactivate a Spatial Asset if not the right owner", async () => { - const geodididParent = 'did:geo:QmR29wrbNv3WrMuodwuLiDwvskuZKKeTtcYDw7SwNffzCH'; - - const bytes32GeoDIDParent = getBytes32FromIpfsHash(geodididParent.substring(8)); - - try { - await spatialAssets.deactivateSpatialAsset(bytes32GeoDIDParent,[], {from: accounts[2]}); - - assert(false); - } catch (err) { - assert(err.message.includes("SpatialAssets: caller is not owner of the Spatial Asset")); - } - }); - - it("Should deactivate a spatial asset with no children correctly", async () => { - const geodididParent = 'did:geo:QmR29wrbNv3WrMuodwuLiDwvskuZKKeTtcYDw7SwNffzCH'; - - const bytes32GeoDIDParent = getBytes32FromIpfsHash(geodididParent.substring(8)); - - await spatialAssets.deactivateSpatialAsset(bytes32GeoDIDParent, [], {from: accounts[1]}); - - const owner = await spatialAssets.idToOwner(bytes32GeoDIDParent); - const externalStorage = await spatialAssets.idToExternalStorage(bytes32GeoDIDParent); - const cid = await spatialAssets.idToCid(bytes32GeoDIDParent); - const hasParent = await spatialAssets.idToHasParent(bytes32GeoDIDParent); - - assert.equal(owner, '0x0000000000000000000000000000000000000000', "Id not burned"); - assert.equal(web3.utils.hexToAscii(externalStorage).replace(/\u0000/g, ''), '', "External storage not deleted"); - assert.equal(web3.utils.hexToAscii(cid).replace(/\u0000/g, ''), '', "Cid not deleted"); - assert(!hasParent, "Has parent not null"); - - }); - - it("Should deactivate a spatial asset with children correctly", async () => { - - const geodididParent = 'did:geo:QmQ747r7eLfsVtBFBSRwfXsPK6tADJpQzJxz4uFdoZb9XJ'; - const cidParent = 'QmQ747r7eLfsVtBFBSRwfXsPK6tADJpQzJxz4uFdoZb9XJ'; - - const geodidid = 'did:geo:QmcvyefkqQX3PpjpY5L8B2yMd47XrVwAipr6cxUt2zvYU8'; - const cid = 'QmcvyefkqQX3PpjpY5L8B2yMd47XrVwAipr6cxUt2zvYU8'; - - const bytes32GeoDIDParent = getBytes32FromIpfsHash(geodididParent.substring(8)); - const bytes32CidParent = getBytes32FromIpfsHash(cidParent); - - const bytes32GeoDID = getBytes32FromIpfsHash(geodidid.substring(8)); - const bytes32Cid = getBytes32FromIpfsHash(cid); - - - await spatialAssets.registerSpatialAsset(accounts[1], bytes32GeoDIDParent, stringToBytes(''), [], bytes32CidParent, stringToBytes(testStorage), 0, {from: accounts[1]}); - - await spatialAssets.registerSpatialAsset(accounts[1], bytes32GeoDID, bytes32GeoDIDParent, [], bytes32Cid, stringToBytes(testStorage), 1, {from: accounts[1]}); - - - await spatialAssets.deactivateSpatialAsset(bytes32GeoDIDParent, [bytes32GeoDID], {from: accounts[1]}); - - const owner = await spatialAssets.idToOwner(bytes32GeoDIDParent); - const externalStorage = await spatialAssets.idToExternalStorage(bytes32GeoDIDParent); - const cidTest = await spatialAssets.idToCid(bytes32GeoDIDParent); - const hasParent = await spatialAssets.idToHasParent(bytes32GeoDIDParent); - - assert.equal(owner, '0x0000000000000000000000000000000000000000', "Id not burned"); - assert.equal(web3.utils.hexToAscii(externalStorage).replace(/\u0000/g, ''), '', "External storage not deleted"); - assert.equal(web3.utils.hexToAscii(cidTest).replace(/\u0000/g, ''), '', "Cid not deleted"); - assert(!hasParent, "Has parent not null"); - - }); - -}); \ No newline at end of file diff --git a/legacy/packages/contracts/truffle-config.js b/legacy/packages/contracts/truffle-config.js deleted file mode 100644 index bad9fe2..0000000 --- a/legacy/packages/contracts/truffle-config.js +++ /dev/null @@ -1,44 +0,0 @@ -const HDWalletProvider = require("@truffle/hdwallet-provider"); -require('dotenv').config(); - -let mnemonic = process.env.MNEMONIC -let ropstenURL = process.env.ROPSTEN_API_KEY - -let provider - -if(mnemonic && ropstenURL) { - provider = new HDWalletProvider({ - mnemonic: { - phrase: mnemonic, - }, - providerOrUrl: ropstenURL, - }); -} - - -module.exports = { - plugins: ["solidity-coverage"], - networks: { - development: { - host: "127.0.0.1", - port: 8545, - network_id: "*", - }, - ropsten: { - provider: provider, - network_id: "3", - }, - }, - compilers: { - solc: { - version: "0.6.12", - settings: { - optimizer: { - enabled: true, - runs: 200 - }, - } - }, - }, - plugins: ["solidity-coverage"], -}; diff --git a/legacy/packages/contracts/tsconfig.json b/legacy/packages/contracts/tsconfig.json deleted file mode 100644 index fcb0516..0000000 --- a/legacy/packages/contracts/tsconfig.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "extends": "../../tsconfig", - "compilerOptions": { - "outDir": "dist", - "rootDir": ".", - "resolveJsonModule": true - }, - "include": ["./build/**/*"], - "files": ["./build/contracts/SpatialAssets.json"] -} diff --git a/legacy/packages/contracts/tslint.json b/legacy/packages/contracts/tslint.json deleted file mode 100644 index 8690834..0000000 --- a/legacy/packages/contracts/tslint.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "extends": "../../tslint.json", - "linterOptions": { - "exclude": ["artifacts/**/*"] - } -} diff --git a/legacy/packages/core/.eslintrc.js b/legacy/packages/core/.eslintrc.js deleted file mode 100644 index c6b21f9..0000000 --- a/legacy/packages/core/.eslintrc.js +++ /dev/null @@ -1,18 +0,0 @@ -module.exports = { - root: true, - parser: '@typescript-eslint/parser', - plugins: [ - '@typescript-eslint', - 'jest' - ], - rules: { - '@typescript-eslint/no-explicit-any': 'off' - }, - extends: [ - 'eslint:recommended', - 'plugin:@typescript-eslint/eslint-recommended', - 'plugin:@typescript-eslint/recommended', // Uses the recommended rules from the @typescript-eslint/eslint-plugin - 'prettier/@typescript-eslint', // Uses eslint-config-prettier to disable ESLint rules from @typescript-eslint/eslint-plugin that would conflict with prettier - 'plugin:prettier/recommended' // Enables eslint-plugin-prettier and eslint-config-prettier. This will display prettier errors as ESLint errors. Make sure this is always the last configuration in the extends array. - ] -}; \ No newline at end of file diff --git a/legacy/packages/core/.prettierrc.js b/legacy/packages/core/.prettierrc.js deleted file mode 100644 index 4c2c6c7..0000000 --- a/legacy/packages/core/.prettierrc.js +++ /dev/null @@ -1,7 +0,0 @@ -module.exports = { - semi: true, - trailingComma: "all", - singleQuote: true, - printWidth: 120, - tabWidth: 4 - }; \ No newline at end of file diff --git a/legacy/packages/core/CHANGELOG.md b/legacy/packages/core/CHANGELOG.md deleted file mode 100644 index 25e7639..0000000 --- a/legacy/packages/core/CHANGELOG.md +++ /dev/null @@ -1,928 +0,0 @@ -# Change Log - -All notable changes to this project will be documented in this file. -See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. - -## [1.0.66](https://github.com/AstralProtocol/astralprotocol/compare/@astralprotocol/core@1.0.65...@astralprotocol/core@1.0.66) (2021-04-01) - -**Note:** Version bump only for package @astralprotocol/core - - - - - -## [1.0.65](https://github.com/AstralProtocol/astralprotocol/compare/@astralprotocol/core@1.0.64...@astralprotocol/core@1.0.65) (2021-04-01) - -**Note:** Version bump only for package @astralprotocol/core - - - - - -## [1.0.64](https://github.com/AstralProtocol/astralprotocol/compare/@astralprotocol/core@1.0.63...@astralprotocol/core@1.0.64) (2021-04-01) - -**Note:** Version bump only for package @astralprotocol/core - - - - - -## [1.0.63](https://github.com/AstralProtocol/astralprotocol/compare/@astralprotocol/core@1.0.62...@astralprotocol/core@1.0.63) (2021-04-01) - -**Note:** Version bump only for package @astralprotocol/core - - - - - -## [1.0.62](https://github.com/AstralProtocol/astralprotocol/compare/@astralprotocol/core@1.0.61...@astralprotocol/core@1.0.62) (2021-04-01) - -**Note:** Version bump only for package @astralprotocol/core - - - - - -## [1.0.61](https://github.com/AstralProtocol/astralprotocol/compare/@astralprotocol/core@1.0.60...@astralprotocol/core@1.0.61) (2021-03-31) - -**Note:** Version bump only for package @astralprotocol/core - - - - - -## [1.0.60](https://github.com/AstralProtocol/astralprotocol/compare/@astralprotocol/core@1.0.59...@astralprotocol/core@1.0.60) (2021-03-30) - -**Note:** Version bump only for package @astralprotocol/core - - - - - -## [1.0.59](https://github.com/AstralProtocol/astralprotocol/compare/@astralprotocol/core@1.0.58...@astralprotocol/core@1.0.59) (2021-03-30) - -**Note:** Version bump only for package @astralprotocol/core - - - - - -## [1.0.58](https://github.com/AstralProtocol/astralprotocol/compare/@astralprotocol/core@1.0.57...@astralprotocol/core@1.0.58) (2021-03-29) - -**Note:** Version bump only for package @astralprotocol/core - - - - - -## [1.0.57](https://github.com/AstralProtocol/astralprotocol/compare/@astralprotocol/core@1.0.56...@astralprotocol/core@1.0.57) (2021-03-29) - -**Note:** Version bump only for package @astralprotocol/core - - - - - -## [1.0.56](https://github.com/AstralProtocol/astralprotocol/compare/@astralprotocol/core@1.0.55...@astralprotocol/core@1.0.56) (2021-03-28) - -**Note:** Version bump only for package @astralprotocol/core - - - - - -## [1.0.55](https://github.com/AstralProtocol/astralprotocol/compare/@astralprotocol/core@1.0.54...@astralprotocol/core@1.0.55) (2021-03-28) - -**Note:** Version bump only for package @astralprotocol/core - - - - - -## [1.0.54](https://github.com/AstralProtocol/astralprotocol/compare/@astralprotocol/core@1.0.53...@astralprotocol/core@1.0.54) (2021-03-28) - -**Note:** Version bump only for package @astralprotocol/core - - - - - -## [1.0.53](https://github.com/AstralProtocol/astralprotocol/compare/@astralprotocol/core@1.0.52...@astralprotocol/core@1.0.53) (2021-03-28) - -**Note:** Version bump only for package @astralprotocol/core - - - - - -## [1.0.52](https://github.com/AstralProtocol/astralprotocol/compare/@astralprotocol/core@1.0.51...@astralprotocol/core@1.0.52) (2021-03-28) - -**Note:** Version bump only for package @astralprotocol/core - - - - - -## [1.0.51](https://github.com/AstralProtocol/astralprotocol/compare/@astralprotocol/core@1.0.50...@astralprotocol/core@1.0.51) (2021-03-28) - -**Note:** Version bump only for package @astralprotocol/core - - - - - -## [1.0.50](https://github.com/AstralProtocol/astralprotocol/compare/@astralprotocol/core@1.0.49...@astralprotocol/core@1.0.50) (2021-03-28) - -**Note:** Version bump only for package @astralprotocol/core - - - - - -## [1.0.49](https://github.com/AstralProtocol/astralprotocol/compare/@astralprotocol/core@1.0.48...@astralprotocol/core@1.0.49) (2021-03-15) - -**Note:** Version bump only for package @astralprotocol/core - - - - - -## [1.0.48](https://github.com/AstralProtocol/astralprotocol/compare/@astralprotocol/core@1.0.47...@astralprotocol/core@1.0.48) (2021-03-15) - -**Note:** Version bump only for package @astralprotocol/core - - - - - -## [1.0.47](https://github.com/AstralProtocol/astralprotocol/compare/@astralprotocol/core@1.0.46...@astralprotocol/core@1.0.47) (2021-03-13) - -**Note:** Version bump only for package @astralprotocol/core - - - - - -## [1.0.46](https://github.com/AstralProtocol/astralprotocol/compare/@astralprotocol/core@1.0.45...@astralprotocol/core@1.0.46) (2021-03-12) - -**Note:** Version bump only for package @astralprotocol/core - - - - - -## [1.0.45](https://github.com/AstralProtocol/astralprotocol/compare/@astralprotocol/core@1.0.44...@astralprotocol/core@1.0.45) (2021-03-12) - -**Note:** Version bump only for package @astralprotocol/core - - - - - -## [1.0.44](https://github.com/AstralProtocol/astralprotocol/compare/@astralprotocol/core@1.0.43...@astralprotocol/core@1.0.44) (2021-03-12) - -**Note:** Version bump only for package @astralprotocol/core - - - - - -## [1.0.43](https://github.com/AstralProtocol/astralprotocol/compare/@astralprotocol/core@1.0.42...@astralprotocol/core@1.0.43) (2021-03-12) - -**Note:** Version bump only for package @astralprotocol/core - - - - - -## [1.0.42](https://github.com/AstralProtocol/astralprotocol/compare/@astralprotocol/core@1.0.41...@astralprotocol/core@1.0.42) (2021-03-12) - -**Note:** Version bump only for package @astralprotocol/core - - - - - -## [1.0.41](https://github.com/AstralProtocol/astralprotocol/compare/@astralprotocol/core@1.0.40...@astralprotocol/core@1.0.41) (2021-03-12) - -**Note:** Version bump only for package @astralprotocol/core - - - - - -## [1.0.40](https://github.com/AstralProtocol/astralprotocol/compare/@astralprotocol/core@1.0.39...@astralprotocol/core@1.0.40) (2021-03-12) - -**Note:** Version bump only for package @astralprotocol/core - - - - - -## [1.0.39](https://github.com/AstralProtocol/astralprotocol/compare/@astralprotocol/core@1.0.38...@astralprotocol/core@1.0.39) (2021-03-12) - -**Note:** Version bump only for package @astralprotocol/core - - - - - -## [1.0.38](https://github.com/AstralProtocol/astralprotocol/compare/@astralprotocol/core@1.0.37...@astralprotocol/core@1.0.38) (2021-03-12) - -**Note:** Version bump only for package @astralprotocol/core - - - - - -## [1.0.37](https://github.com/AstralProtocol/astralprotocol/compare/@astralprotocol/core@1.0.36...@astralprotocol/core@1.0.37) (2021-03-12) - -**Note:** Version bump only for package @astralprotocol/core - - - - - -## [1.0.36](https://github.com/AstralProtocol/astralprotocol/compare/@astralprotocol/core@1.0.35...@astralprotocol/core@1.0.36) (2021-03-12) - -**Note:** Version bump only for package @astralprotocol/core - - - - - -## [1.0.35](https://github.com/AstralProtocol/astralprotocol/compare/@astralprotocol/core@1.0.34...@astralprotocol/core@1.0.35) (2021-03-12) - -**Note:** Version bump only for package @astralprotocol/core - - - - - -## [1.0.34](https://github.com/AstralProtocol/astralprotocol/compare/@astralprotocol/core@1.0.33...@astralprotocol/core@1.0.34) (2021-03-12) - -**Note:** Version bump only for package @astralprotocol/core - - - - - -## [1.0.33](https://github.com/AstralProtocol/astralprotocol/compare/@astralprotocol/core@1.0.32...@astralprotocol/core@1.0.33) (2021-03-12) - -**Note:** Version bump only for package @astralprotocol/core - - - - - -## [1.0.32](https://github.com/AstralProtocol/astralprotocol/compare/@astralprotocol/core@1.0.31...@astralprotocol/core@1.0.32) (2021-03-12) - -**Note:** Version bump only for package @astralprotocol/core - - - - - -## [1.0.31](https://github.com/AstralProtocol/astralprotocol/compare/@astralprotocol/core@1.0.30...@astralprotocol/core@1.0.31) (2021-03-12) - -**Note:** Version bump only for package @astralprotocol/core - - - - - -## [1.0.30](https://github.com/AstralProtocol/astralprotocol/compare/@astralprotocol/core@1.0.29...@astralprotocol/core@1.0.30) (2021-03-11) - -**Note:** Version bump only for package @astralprotocol/core - - - - - -## [1.0.29](https://github.com/AstralProtocol/astralprotocol/compare/@astralprotocol/core@1.0.28...@astralprotocol/core@1.0.29) (2021-03-11) - -**Note:** Version bump only for package @astralprotocol/core - - - - - -## [1.0.28](https://github.com/AstralProtocol/astralprotocol/compare/@astralprotocol/core@1.0.27...@astralprotocol/core@1.0.28) (2021-03-11) - -**Note:** Version bump only for package @astralprotocol/core - - - - - -## [1.0.27](https://github.com/AstralProtocol/astralprotocol/compare/@astralprotocol/core@1.0.26...@astralprotocol/core@1.0.27) (2021-03-11) - -**Note:** Version bump only for package @astralprotocol/core - - - - - -## [1.0.26](https://github.com/AstralProtocol/astralprotocol/compare/@astralprotocol/core@1.0.25...@astralprotocol/core@1.0.26) (2021-03-04) - -**Note:** Version bump only for package @astralprotocol/core - - - - - -## [1.0.25](https://github.com/AstralProtocol/astralprotocol/compare/@astralprotocol/core@1.0.24...@astralprotocol/core@1.0.25) (2021-03-04) - -**Note:** Version bump only for package @astralprotocol/core - - - - - -## [1.0.24](https://github.com/AstralProtocol/astralprotocol/compare/@astralprotocol/core@1.0.23...@astralprotocol/core@1.0.24) (2021-03-04) - -**Note:** Version bump only for package @astralprotocol/core - - - - - -## [1.0.23](https://github.com/AstralProtocol/astralprotocol/compare/@astralprotocol/core@1.0.22...@astralprotocol/core@1.0.23) (2021-02-24) - -**Note:** Version bump only for package @astralprotocol/core - - - - - -## [1.0.22](https://github.com/AstralProtocol/astralprotocol/compare/@astralprotocol/core@1.0.21...@astralprotocol/core@1.0.22) (2021-02-24) - -**Note:** Version bump only for package @astralprotocol/core - - - - - -## [1.0.21](https://github.com/AstralProtocol/astralprotocol/compare/@astralprotocol/core@1.0.20...@astralprotocol/core@1.0.21) (2021-02-24) - -**Note:** Version bump only for package @astralprotocol/core - - - - - -## [1.0.20](https://github.com/AstralProtocol/astralprotocol/compare/@astralprotocol/core@1.0.19...@astralprotocol/core@1.0.20) (2021-02-24) - -**Note:** Version bump only for package @astralprotocol/core - - - - - -## [1.0.19](https://github.com/AstralProtocol/astralprotocol/compare/@astralprotocol/core@1.0.18...@astralprotocol/core@1.0.19) (2021-02-24) - -**Note:** Version bump only for package @astralprotocol/core - - - - - -## [1.0.18](https://github.com/AstralProtocol/astralprotocol/compare/@astralprotocol/core@1.0.17...@astralprotocol/core@1.0.18) (2021-02-24) - -**Note:** Version bump only for package @astralprotocol/core - - - - - -## [1.0.17](https://github.com/AstralProtocol/astralprotocol/compare/@astralprotocol/core@1.0.16...@astralprotocol/core@1.0.17) (2021-02-24) - -**Note:** Version bump only for package @astralprotocol/core - - - - - -## [1.0.16](https://github.com/AstralProtocol/astralprotocol/compare/@astralprotocol/core@1.0.15...@astralprotocol/core@1.0.16) (2021-02-24) - -**Note:** Version bump only for package @astralprotocol/core - - - - - -## [1.0.15](https://github.com/AstralProtocol/astralprotocol/compare/@astralprotocol/core@1.0.14...@astralprotocol/core@1.0.15) (2021-02-24) - -**Note:** Version bump only for package @astralprotocol/core - - - - - -## [1.0.14](https://github.com/AstralProtocol/astralprotocol/compare/@astralprotocol/core@1.0.13...@astralprotocol/core@1.0.14) (2021-02-24) - -**Note:** Version bump only for package @astralprotocol/core - - - - - -## [1.0.13](https://github.com/AstralProtocol/astralprotocol/compare/@astralprotocol/core@1.0.12...@astralprotocol/core@1.0.13) (2021-02-24) - -**Note:** Version bump only for package @astralprotocol/core - - - - - -## [1.0.12](https://github.com/AstralProtocol/astralprotocol/compare/@astralprotocol/core@1.0.11...@astralprotocol/core@1.0.12) (2021-02-24) - -**Note:** Version bump only for package @astralprotocol/core - - - - - -## [1.0.11](https://github.com/AstralProtocol/astralprotocol/compare/@astralprotocol/core@1.0.10...@astralprotocol/core@1.0.11) (2021-02-24) - -**Note:** Version bump only for package @astralprotocol/core - - - - - -## [1.0.10](https://github.com/AstralProtocol/astralprotocol/compare/@astralprotocol/core@1.0.9...@astralprotocol/core@1.0.10) (2021-02-24) - -**Note:** Version bump only for package @astralprotocol/core - - - - - -## [1.0.9](https://github.com/AstralProtocol/astralprotocol/compare/@astralprotocol/core@1.0.8...@astralprotocol/core@1.0.9) (2021-02-24) - -**Note:** Version bump only for package @astralprotocol/core - - - - - -## [1.0.8](https://github.com/AstralProtocol/astralprotocol/compare/@astralprotocol/core@1.0.7...@astralprotocol/core@1.0.8) (2021-02-24) - -**Note:** Version bump only for package @astralprotocol/core - - - - - -## [1.0.7](https://github.com/AstralProtocol/astralprotocol/compare/@astralprotocol/core@1.0.6...@astralprotocol/core@1.0.7) (2021-02-24) - -**Note:** Version bump only for package @astralprotocol/core - - - - - -## [1.0.6](https://github.com/AstralProtocol/astralprotocol/compare/@astralprotocol/core@1.0.5...@astralprotocol/core@1.0.6) (2021-02-24) - -**Note:** Version bump only for package @astralprotocol/core - - - - - -## [1.0.5](https://github.com/AstralProtocol/astralprotocol/compare/@astralprotocol/core@1.0.4...@astralprotocol/core@1.0.5) (2021-02-24) - -**Note:** Version bump only for package @astralprotocol/core - - - - - -## [1.0.4](https://github.com/AstralProtocol/astralprotocol/compare/@astralprotocol/core@1.0.3...@astralprotocol/core@1.0.4) (2021-02-24) - -**Note:** Version bump only for package @astralprotocol/core - - - - - -## [1.0.3](https://github.com/AstralProtocol/astralprotocol/compare/@astralprotocol/core@1.0.2...@astralprotocol/core@1.0.3) (2021-02-24) - -**Note:** Version bump only for package @astralprotocol/core - - - - - -## [1.0.2](https://github.com/AstralProtocol/astralprotocol/compare/@astralprotocol/core@1.0.1...@astralprotocol/core@1.0.2) (2021-02-24) - -**Note:** Version bump only for package @astralprotocol/core - - - - - -## [1.0.1](https://github.com/AstralProtocol/astralprotocol/compare/@astralprotocol/core@0.1.10...@astralprotocol/core@1.0.1) (2021-02-24) - -**Note:** Version bump only for package @astralprotocol/core - - - - - -## [0.1.10](https://github.com/AstralProtocol/astralprotocol/compare/@astralprotocol/core@0.1.9...@astralprotocol/core@0.1.10) (2021-02-23) - -**Note:** Version bump only for package @astralprotocol/core - - - - - -## [0.1.9](https://github.com/AstralProtocol/astralprotocol/compare/@astralprotocol/core@0.1.8...@astralprotocol/core@0.1.9) (2021-02-19) - -**Note:** Version bump only for package @astralprotocol/core - - - - - -## [0.1.8](https://github.com/AstralProtocol/astralprotocol/compare/@astralprotocol/core@0.1.7...@astralprotocol/core@0.1.8) (2021-02-18) - -**Note:** Version bump only for package @astralprotocol/core - - - - - -## [0.1.7](https://github.com/AstralProtocol/astralprotocol/compare/@astralprotocol/core@0.1.6...@astralprotocol/core@0.1.7) (2021-02-18) - -**Note:** Version bump only for package @astralprotocol/core - - - - - -## [0.1.6](https://github.com/AstralProtocol/astralprotocol/compare/@astralprotocol/core@0.1.5...@astralprotocol/core@0.1.6) (2021-02-18) - -**Note:** Version bump only for package @astralprotocol/core - - - - - -## [0.1.5](https://github.com/AstralProtocol/astralprotocol/compare/@astralprotocol/core@0.1.4...@astralprotocol/core@0.1.5) (2021-02-18) - -**Note:** Version bump only for package @astralprotocol/core - - - - - -## [0.1.4](https://github.com/AstralProtocol/astralprotocol/compare/@astralprotocol/core@0.1.3...@astralprotocol/core@0.1.4) (2021-02-18) - -**Note:** Version bump only for package @astralprotocol/core - - - - - -## [0.1.3](https://github.com/AstralProtocol/astralprotocol/compare/@astralprotocol/core@0.1.1...@astralprotocol/core@0.1.3) (2021-02-18) - -**Note:** Version bump only for package @astralprotocol/core - - - - - -## [0.1.1](https://github.com/AstralProtocol/astralprotocol/compare/@astralprotocol/core@0.0.2...@astralprotocol/core@0.1.1) (2021-02-18) - -**Note:** Version bump only for package @astralprotocol/core - - - - - -## [0.0.2](https://github.com/AstralProtocol/astralprotocol/compare/@astralprotocol/core@0.0.1...@astralprotocol/core@0.0.2) (2021-02-18) - -**Note:** Version bump only for package @astralprotocol/core - - - - - -## 0.0.1 (2021-01-05) - -**Note:** Version bump only for package @astralprotocol/core - - - - - -## [0.0.39](https://github.com/astralDAO/astralprotocol/compare/@astraldao/astral-protocol-core@0.0.38...@astraldao/astral-protocol-core@0.0.39) (2020-11-24) - -**Note:** Version bump only for package @astraldao/astral-protocol-core - - - - - -## [0.0.38](https://github.com/astralDAO/astralprotocol/compare/@astraldao/astral-protocol-core@0.0.37...@astraldao/astral-protocol-core@0.0.38) (2020-11-24) - -**Note:** Version bump only for package @astraldao/astral-protocol-core - - - - - -## [0.0.37](https://github.com/astralDAO/astralprotocol/compare/@astraldao/astral-protocol-core@0.0.36...@astraldao/astral-protocol-core@0.0.37) (2020-11-24) - -**Note:** Version bump only for package @astraldao/astral-protocol-core - - - - - -## [0.0.36](https://github.com/astralDAO/astralprotocol/compare/@astraldao/astral-protocol-core@0.0.35...@astraldao/astral-protocol-core@0.0.36) (2020-11-21) - -**Note:** Version bump only for package @astraldao/astral-protocol-core - - - - - -## [0.0.35](https://github.com/astralDAO/astralprotocol/compare/@astraldao/astral-protocol-core@0.0.34...@astraldao/astral-protocol-core@0.0.35) (2020-11-21) - -**Note:** Version bump only for package @astraldao/astral-protocol-core - - - - - -## [0.0.34](https://github.com/astralDAO/astralprotocol/compare/@astraldao/astral-protocol-core@0.0.33...@astraldao/astral-protocol-core@0.0.34) (2020-10-22) - -**Note:** Version bump only for package @astraldao/astral-protocol-core - - - - - -## [0.0.33](https://github.com/astralDAO/astralprotocol/compare/@astraldao/astral-protocol-core@0.0.32...@astraldao/astral-protocol-core@0.0.33) (2020-10-22) - -**Note:** Version bump only for package @astraldao/astral-protocol-core - - - - - -## [0.0.32](https://github.com/astralDAO/astralprotocol/compare/@astraldao/astral-protocol-core@0.0.31...@astraldao/astral-protocol-core@0.0.32) (2020-10-22) - -**Note:** Version bump only for package @astraldao/astral-protocol-core - - - - - -## [0.0.31](https://github.com/astralDAO/astralprotocol/compare/@astraldao/astral-protocol-core@0.0.30...@astraldao/astral-protocol-core@0.0.31) (2020-10-22) - -**Note:** Version bump only for package @astraldao/astral-protocol-core - - - - - -## [0.0.30](https://github.com/astralDAO/astralprotocol/compare/@astraldao/astral-protocol-core@0.0.29...@astraldao/astral-protocol-core@0.0.30) (2020-10-19) - -**Note:** Version bump only for package @astraldao/astral-protocol-core - - - - - -## [0.0.29](https://github.com/astralDAO/astralprotocol/compare/@astraldao/astral-protocol-core@0.0.28...@astraldao/astral-protocol-core@0.0.29) (2020-10-19) - -**Note:** Version bump only for package @astraldao/astral-protocol-core - - - - - -## [0.0.28](https://github.com/astralDAO/astralprotocol/compare/@astraldao/astral-protocol-core@0.0.27...@astraldao/astral-protocol-core@0.0.28) (2020-10-18) - -**Note:** Version bump only for package @astraldao/astral-protocol-core - - - - - -## [0.0.27](https://github.com/astralDAO/astralprotocol/compare/@astraldao/astral-protocol-core@0.0.26...@astraldao/astral-protocol-core@0.0.27) (2020-10-18) - -**Note:** Version bump only for package @astraldao/astral-protocol-core - - - - - -## [0.0.26](https://github.com/astralDAO/astralprotocol/compare/@astraldao/astral-protocol-core@0.0.25...@astraldao/astral-protocol-core@0.0.26) (2020-10-18) - -**Note:** Version bump only for package @astraldao/astral-protocol-core - - - - - -## [0.0.25](https://github.com/astralDAO/astralprotocol/compare/@astraldao/astral-protocol-core@0.0.24...@astraldao/astral-protocol-core@0.0.25) (2020-10-17) - -**Note:** Version bump only for package @astraldao/astral-protocol-core - - - - - -## [0.0.24](https://github.com/astralDAO/astralprotocol/compare/@astraldao/astral-protocol-core@0.0.23...@astraldao/astral-protocol-core@0.0.24) (2020-10-17) - -**Note:** Version bump only for package @astraldao/astral-protocol-core - - - - - -## [0.0.23](https://github.com/astralDAO/astralprotocol/compare/@astraldao/astral-protocol-core@0.0.22...@astraldao/astral-protocol-core@0.0.23) (2020-10-17) - -**Note:** Version bump only for package @astraldao/astral-protocol-core - - - - - -## [0.0.22](https://github.com/astralDAO/astralprotocol/compare/@astraldao/astral-protocol-core@0.0.21...@astraldao/astral-protocol-core@0.0.22) (2020-10-17) - -**Note:** Version bump only for package @astraldao/astral-protocol-core - - - - - -## [0.0.21](https://github.com/astralDAO/astralprotocol/compare/@astraldao/astral-protocol-core@0.0.20...@astraldao/astral-protocol-core@0.0.21) (2020-10-16) - -**Note:** Version bump only for package @astraldao/astral-protocol-core - - - - - -## [0.0.20](https://github.com/astralDAO/astralprotocol/compare/@astraldao/astral-protocol-core@0.0.19...@astraldao/astral-protocol-core@0.0.20) (2020-10-16) - -**Note:** Version bump only for package @astraldao/astral-protocol-core - - - - - -## [0.0.19](https://github.com/astralDAO/astralprotocol/compare/@astraldao/astral-protocol-core@0.0.18...@astraldao/astral-protocol-core@0.0.19) (2020-10-16) - -**Note:** Version bump only for package @astraldao/astral-protocol-core - - - - - -## [0.0.18](https://github.com/astralDAO/astralprotocol/compare/@astraldao/astral-protocol-core@0.0.17...@astraldao/astral-protocol-core@0.0.18) (2020-10-15) - -**Note:** Version bump only for package @astraldao/astral-protocol-core - - - - - -## [0.0.17](https://github.com/astralDAO/astralprotocol/compare/@astraldao/astral-protocol-core@0.0.16...@astraldao/astral-protocol-core@0.0.17) (2020-10-14) - -**Note:** Version bump only for package @astraldao/astral-protocol-core - - - - - -## [0.0.16](https://github.com/astralDAO/astralprotocol/compare/@astraldao/astral-protocol-core@0.0.15...@astraldao/astral-protocol-core@0.0.16) (2020-10-14) - -**Note:** Version bump only for package @astraldao/astral-protocol-core - - - - - -## [0.0.15](https://github.com/astralDAO/astralprotocol/compare/@astraldao/astral-protocol-core@0.0.14...@astraldao/astral-protocol-core@0.0.15) (2020-10-14) - -**Note:** Version bump only for package @astraldao/astral-protocol-core - - - - - -## [0.0.14](https://github.com/astralDAO/astralprotocol/compare/@astraldao/astral-protocol-core@0.0.13...@astraldao/astral-protocol-core@0.0.14) (2020-10-14) - -**Note:** Version bump only for package @astraldao/astral-protocol-core - - - - - -## [0.0.13](https://github.com/astralDAO/astralprotocol/compare/@astraldao/astral-protocol-core@0.0.12...@astraldao/astral-protocol-core@0.0.13) (2020-10-14) - -**Note:** Version bump only for package @astraldao/astral-protocol-core - - - - - -## [0.0.12](https://github.com/astralDAO/astralprotocol/compare/@astraldao/astral-protocol-core@0.0.11...@astraldao/astral-protocol-core@0.0.12) (2020-10-14) - -**Note:** Version bump only for package @astraldao/astral-protocol-core - - - - - -## [0.0.11](https://github.com/astralDAO/astralprotocol/compare/@astraldao/astral-protocol-core@0.0.10...@astraldao/astral-protocol-core@0.0.11) (2020-10-14) - -**Note:** Version bump only for package @astraldao/astral-protocol-core - - - - - -## [0.0.10](https://github.com/astralDAO/astralprotocol/compare/@astraldao/astral-protocol-core@0.0.9...@astraldao/astral-protocol-core@0.0.10) (2020-10-14) - -**Note:** Version bump only for package @astraldao/astral-protocol-core - - - - - -## [0.0.9](https://github.com/astralDAO/astralprotocol/compare/@astraldao/astral-protocol-core@0.0.8...@astraldao/astral-protocol-core@0.0.9) (2020-10-14) - -**Note:** Version bump only for package @astraldao/astral-protocol-core - - - - - -## [0.0.8](https://github.com/astralDAO/astralprotocol/compare/@astraldao/astral-protocol-core@0.0.7...@astraldao/astral-protocol-core@0.0.8) (2020-10-14) - -**Note:** Version bump only for package @astraldao/astral-protocol-core - - - - - -## [0.0.7](https://github.com/astralDAO/astralprotocol/compare/@astraldao/astral-protocol-core@0.0.6...@astraldao/astral-protocol-core@0.0.7) (2020-10-13) - -**Note:** Version bump only for package @astraldao/astral-protocol-core - - - - - -## [0.0.6](https://github.com/astralDAO/astralprotocol/compare/@astraldao/astral-protocol-core@0.0.5...@astraldao/astral-protocol-core@0.0.6) (2020-10-13) - -**Note:** Version bump only for package @astraldao/astral-protocol-core - - - - - -## [0.0.5](https://github.com/astralDAO/astralprotocol/compare/@astraldao/astral-protocol-core@0.0.4...@astraldao/astral-protocol-core@0.0.5) (2020-10-13) - -**Note:** Version bump only for package @astraldao/astral-protocol-core - - - - - -## [0.0.4](https://github.com/astralDAO/astralprotocol/compare/@astraldao/astral-protocol-core@0.0.3...@astraldao/astral-protocol-core@0.0.4) (2020-10-13) - -**Note:** Version bump only for package @astraldao/astral-protocol-core - - - - - -## [0.0.3](https://github.com/astralDAO/astralprotocol/compare/@astraldao/astral-protocol-core@0.0.2...@astraldao/astral-protocol-core@0.0.3) (2020-10-13) - -**Note:** Version bump only for package @astraldao/astral-protocol-core - - - - - -## [0.0.2](https://github.com/astralDAO/astralprotocol/compare/@astraldao/astral-protocol-core@0.0.1...@astraldao/astral-protocol-core@0.0.2) (2020-09-28) - -**Note:** Version bump only for package @astraldao/astral-protocol-core - - - - - -## 0.0.1 (2020-09-11) - -**Note:** Version bump only for package @astraldao/astral-protocol-core diff --git a/legacy/packages/core/LICENSE-APACHE b/legacy/packages/core/LICENSE-APACHE deleted file mode 100644 index 2ad0ad1..0000000 --- a/legacy/packages/core/LICENSE-APACHE +++ /dev/null @@ -1,201 +0,0 @@ - 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 [2020] [astralDAO] - - 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/legacy/packages/core/LICENSE-MIT b/legacy/packages/core/LICENSE-MIT deleted file mode 100644 index 1874419..0000000 --- a/legacy/packages/core/LICENSE-MIT +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) 2020 astralDAO - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/legacy/packages/core/README.md b/legacy/packages/core/README.md deleted file mode 100644 index e572705..0000000 --- a/legacy/packages/core/README.md +++ /dev/null @@ -1,96 +0,0 @@ -# `@astralprotocol/core` - -## Description - -The @astralprotocol/core package is a Typescript NPM package that is responsible for any CRUD operations performed on the DID Documents. This includes the creation of DID Documents, loading the DID Documents, as well as updating them. The package also has utilities that enable the creation of the collision resistant GeoDID IDs, a custom did-resolver that enables DID Resolution, as well as pinning features for storing the Documents on IPFS or FFS. This package is meant to be used in conjunction with the @astralprotocol/contracts and @astralprotocol/subgraph packages. However, the package can also be used independently if the user does not want to rely on the Ethereum network. - -## Setting up Powergate Locally with Localnet Mode - -In order to store the GeoDIDs created by the core package, you will need to start up a local Powergate client or connect to an existing hosted client. Below will be a brief overview on how to setup a local Powergate client on your system. Further information is available at: https://github.com/textileio/powergate. - -In order to setup the Powergate Client locally on your system you must have [Docker](https://docs.docker.com/engine/install/), [Docker-Compose](https://docs.docker.com/compose/install/), and [Go 1.16](https://golang.org/dl/) installed. - - -In your terminal, create a new directory and clone the Powergate repo into it: - -```git clone https://github.com/textileio/powergate.git``` - - -After you clone the repo, enter the following commands: - -```cd powergate/docker``` - -```make localnet``` - - -More information regarding Powergate's Localnet mode, please refer to their documentation: https://github.com/textileio/powergate#localnet-mode - -## To add Astral Protocol Core to your application - -```yarn add -D @astralprotocol/core ``` -OR -```npm install -D @astralprotocol/core``` - -```import AstralClient from '@astralprotocol/core';``` -OR -```const AstralClient = require('@astralprotocol/core');``` - -## To develop or try the Astral Protocol Core locally - -``` -import AstralClient from '@astralprotocol/core'; - -async function run(){ - - // Create a new Astral Client Instance with the user's ethAddress - let astral = new AstralClient('0xa3e1c2602f628112E591A18004bbD59BDC3cb512'); - - try{ - - // Creates a Genesis GeoDID - const genDocRes = await astral.createGenesisGeoDID('collection') - console.log(genDocRes); - - // With the returned IDocumentInfo from the last function, we can pin it. - // Since no token was specified the client will assign a new auth Token to the user. - const results = await astral.pinDocument(genDocRes); - console.log(results); - - const token = results.token; - - // With the Auth Token and the GeoDID ID we can load the document with the loadDocument function - const loadResults = await astral.loadDocument(results.geodidid, token); - console.log(loadResults); - - console.log('\n'); - console.log('\n'); - - // Creates a Child GeoDID Item of the priviously created Genesis GeoDID - const itemres = await astral.createChildGeoDID('item', results.geodidid, 'item1'); - console.log(itemres) - - console.log('\n'); - - // With the returned IDocumentInfo from the last function, we can pin it. - // This time we reuse the same token that was created earlier to pin the child document to the same instance. - const itemresults = await astral.pinDocument(itemres, token); - console.log(itemresults); - - console.log('\n'); - - // With the Auth Token and the GeoDID ID we can load the document with the loadDocument function - const loadItemResults = await astral.loadDocument(itemresults.geodidid, token); - console.log(loadItemResults); - - console.log('\n'); - - // Here we can display the string representation of the DID Document - console.log(JSON.stringify(loadItemResults.documentInfo.documentVal)); - - }catch(e){ - console.log(e); - } - -} - -``` diff --git a/legacy/packages/core/__tests__/astral-protocol-core.test.js b/legacy/packages/core/__tests__/astral-protocol-core.test.js deleted file mode 100644 index 77047f0..0000000 --- a/legacy/packages/core/__tests__/astral-protocol-core.test.js +++ /dev/null @@ -1,47 +0,0 @@ -import AstralClient from '../lib/astral-client'; - -describe('astral-client', () => { - - describe('creates documents', () => { - - beforeEach(() => { - const astral = new AstralClient('0xa3e1c2602f628112E591A18004bbD59BDC3cb512'); - }); - - describe('root', () => { - it('creates collection', async() => { - await expect(astral.createGenesisGeoDID('collection')).resolves.toHaveReturned(); - }); - - it('creates item', async() => { - await expect(astral.createGenesisGeoDID('item')).resolves.toHaveReturned(); - }); - - it('fails to create document', async() => { - expect.assertions(1); - try { - await expect(astral.createGenesisGeoDID('document')); - }catch(e) { - expect(e).toEqual({ error: 'Invalid Option, please select Item or Collection' }); - } - }); - }); - - describe('children', () => { - beforeEach( async() => { - const res = await astral.createGenesisGeoDID('collection'); - const results = await astral.pinDocument(res); - }); - - it('creates child collection w/ collection parent', async() => { - await expect(astral.createChildGeoDID('collection', results.geodidid, 'collection')).resolves.toHaveReturned(); - }); - - it('creates child item w/ collection parent', async() => { - await expect(astral.createChildGeoDID('item', results.geodidid, 'item1')).resolves.toHaveReturned(); - }); - }) - }) -}); - - diff --git a/legacy/packages/core/babel.config.js b/legacy/packages/core/babel.config.js deleted file mode 100644 index 10ce1d6..0000000 --- a/legacy/packages/core/babel.config.js +++ /dev/null @@ -1,20 +0,0 @@ -// babel.config.js -module.exports = { - presets: [ - ["@babel/preset-env", { - targets: { - node: 'current', - }, - modules: 'commonjs', - useBuiltIns: false, - debug: false, - }], - '@babel/preset-typescript', - ], - "plugins": [ - ["@babel/plugin-transform-modules-commonjs", { - "allowTopLevelThis": true - }], - ["@babel/plugin-proposal-decorators", {"legacy": true}], - ] -} \ No newline at end of file diff --git a/legacy/packages/core/package.json b/legacy/packages/core/package.json deleted file mode 100644 index f08dfaa..0000000 --- a/legacy/packages/core/package.json +++ /dev/null @@ -1,93 +0,0 @@ -{ - "name": "@astralprotocol/core", - "version": "1.0.66", - "description": "The @astralprotocol/core package is a Typescript NPM package that is responsible for any CRUD operations performed on the DID Documents. This includes the creation of DID Documents, loading the DID Documents, as well as updating them. The package also has utilities that enable the creation of the collision resistant GeoDID IDs, a custom did-resolver that enables DID Resolution, as well as pinning features for storing the Documents on IPFS or FFS. This package is meant to be used in conjunction with the @astralprotocol/contracts and @astralprotocol/subgraph packages. However, the package can also be used independently if the user does not want to rely on the Ethereum network", - "author": "Astral ", - "homepage": "https://github.com/AstralProtocol/astralprotocol#readme", - "license": "MIT OR Apache-2.0", - "main": "lib/astral-client.js", - "typings": "lib/astral-client.d.ts", - "directories": { - "lib": "lib", - "test": "__tests__" - }, - "files": [ - "lib" - ], - "repository": { - "type": "git", - "url": "git+https://github.com/AstralProtocol/astralprotocol.git", - "directory": "packages/core" - }, - "publishConfig": { - "registry": "https://registry.npmjs.org", - "access": "public" - }, - "scripts": { - "tsc": "tsc", - "test": "jest --coverage --runInBand", - "build": "../../node_modules/.bin/tsc -p tsconfig.json", - "prepublishOnly": "yarn run build", - "prebuild": "yarn run clean", - "lint": "eslint ./src '*/**/*.{js,ts,tsx}' --quiet --fix", - "clean": "rm -rf ./lib ./tsconfig.tsbuildinfo" - }, - "bugs": { - "url": "https://github.com/AstralProtocol/astralprotocol/issues" - }, - "dependencies": { - "@textile/powergate-client": "^4.0.0", - "@types/ora": "^3.2.0", - "@types/set-interval-async": "^1.0.0", - "ajv": "^6.12.5", - "apollo-fetch": "^0.7.0", - "async": "^3.2.0", - "axios": "^0.21.1", - "blob": "^0.1.0", - "chalk": "^4.1.0", - "cids": "^1.0.0", - "class-transformer": "^0.3.1", - "cli-progress": "^3.8.2", - "cli-spinners": "^2.5.0", - "cross-fetch": "^3.0.6", - "did-jwt": "^4.5.1", - "did-resolver": "^2.1.1", - "dids": "^0.5.1", - "events": "^3.2.0", - "fetch-json": "^2.2.7", - "fs": "^0.0.1-security", - "graphql": "^15.5.0", - "graphql-request": "^3.4.0", - "lodash.clonedeep": "^4.5.0", - "multihashing-async": "^2.0.1", - "ora": "^5.3.0", - "reflect-metadata": "^0.1.13", - "set-interval-async": "1.0.34" - }, - "devDependencies": { - "@babel/core": "^7.12.0", - "@babel/plugin-proposal-decorators": "^7.10.5", - "@babel/plugin-transform-modules-commonjs": "^7.10.4", - "@babel/preset-env": "^7.12.0", - "@babel/preset-typescript": "^7.12.0", - "@types/blob-to-buffer": "^1.2.0", - "@types/bs58": "^4.0.1", - "@types/cli-progress": "^3.8.0", - "@types/events": "^3.0.0", - "@types/express": "^4.17.2", - "@types/jest": "^26.0.20", - "@types/lodash.clonedeep": "^4.5.6", - "@types/web3": "^1.2.2", - "@typescript-eslint/eslint-plugin": "^4.1.0", - "@typescript-eslint/parser": "^4.1.0", - "babel-cli": "^6.26.0", - "babel-jest": "^26.3.0", - "eslint": "^7.8.1", - "eslint-config-prettier": "^6.11.0", - "eslint-plugin-jest": "^24.1.0", - "eslint-plugin-prettier": "^3.1.4", - "jest": "^26.4.2", - "prettier": "^2.1.1" - }, - "gitHead": "068ff4783a483d401435cf45c521a068af0a0bad" -} diff --git a/legacy/packages/core/src/astral-client.ts b/legacy/packages/core/src/astral-client.ts deleted file mode 100644 index 6b89252..0000000 --- a/legacy/packages/core/src/astral-client.ts +++ /dev/null @@ -1,168 +0,0 @@ -import { Powergate } from './pin/powergate'; -import { Document } from './docu/document'; -import GeoDIDResolver from './resolver/geo-did-resolver'; -import { DIDDocument, Resolver, ServiceEndpoint } from 'did-resolver'; -import { - GeoDidType, - IDocumentInfo, - IPinInfo, - IAsset, - ILoadInfo, - IAssetInfo, -} from './geo-did/interfaces/global-geo-did-interfaces'; - -export { GeoDidType, IDocumentInfo, IPinInfo, IAsset, ILoadInfo } from './geo-did/interfaces/global-geo-did-interfaces'; - -export class AstralClient { - document: Document; - - constructor(public _ethereumAddress: string, public _thegraphEndpoint: string, public _host: string, public _token: string) { - this.document = new Document(_ethereumAddress); - } - - static async build( - _ethereumAddress: string, - _thegraphEndpoint = 'https://api.thegraph.com/subgraphs/name/astralprotocol/spatialassetsfinalv1', - _host = 'http://52.168.51.215:6002', - _token?: string, - ): Promise { - try { - const powergate = await Powergate.build(_host, _token); - let token = ''; - if (_token) token = _token; - else token = await powergate.getToken(); - - return new AstralClient(_ethereumAddress, _thegraphEndpoint, _host, token); - }catch(e){ - throw e; - } - } - - getInstanceToken(): string { - return this._token; - } - - async createGenesisGeoDID(_typeOfGeoDID: string, assets?: IAsset[]): Promise { - try { - const response: IDocumentInfo = await this.document.addGenesisDocument(_typeOfGeoDID, this._host, this._token, assets); - return response; - } catch (e) { - console.log('Unable to initialize'); - throw e; - } - } - - async createChildGeoDID( - _typeOfGeoDID: string, - _parentID: string, - _path: string, - assets?: IAsset[], - ): Promise { - try { - const response: IDocumentInfo = await this.document.addChildDocument(_typeOfGeoDID, _parentID, _path, this._host, this._token, assets); - return response; - } catch (e) { - console.log('Unable to initialize'); - throw e; - } - } - - async pinDocument(documentInfo: IDocumentInfo): Promise { - try { - const pinDate: Date = new Date(); - const powergate = await Powergate.build(this._host, this._token); - const stringdoc = JSON.stringify(documentInfo.documentVal); - const uint8array = new TextEncoder().encode(stringdoc); - const cid: string = await powergate.getAssetCid(uint8array); - await powergate.pin(cid); - - return { geodidid: documentInfo.geodidid, cid: cid, pinDate: pinDate, token: this._token }; - } catch (e) { - console.log(e); - throw e; - } - } - - async pinAsset(docId: string, powergate: Powergate, asset: IAsset): Promise { - try { - const uint8array = new TextEncoder().encode(asset.data); - const seCID: string = await powergate.getAssetCid(uint8array); - await powergate.pin(seCID); - - return { - id: docId.concat(`#${asset.tag}`), - type: asset.type, - serviceEndpoint: seCID, - }; - } catch (e) { - console.log(e); - throw e; - } - } - - // Add Assets to an item. Validation happens - async addAssetsToItem(docId: string, assets: IAsset[]): Promise { - let response: ILoadInfo; - let service: ServiceEndpoint; - - try { - response = await this.loadDocument(docId); - const document_Info: IDocumentInfo = response.documentInfo; - - if (document_Info.documentVal.didmetadata.type.toLowerCase() == GeoDidType.Item) { - for (let i = 0; i < assets.length; i++) { - service = await this.pinAsset(docId, response.powergateInstance, assets[i]); - await document_Info.documentVal.service.push(service); - } - } else { - throw new Error( - 'Unfortunately the Document ID you provided is not of Item type, so you cannot add any Assets to this Document. Please try again with a valid GeoDID Item', - ); - } - return document_Info; - } catch (e) { - console.log(e); - throw e; - } - } - - // TODO: Read/Load a GeoDID Document - async loadDocument(docId: string): Promise { - try { - const powergate = await Powergate.build(this._host, this._token); - const geoDidResolver = GeoDIDResolver.getResolver(this, powergate); - const didResolver = new Resolver(geoDidResolver); - const doc: DIDDocument = await didResolver.resolve(docId); - - return { documentInfo: { geodidid: docId, documentVal: doc }, powergateInstance: powergate }; - } catch (e) { - console.log(e); - throw e; - } - } - - // must have a fragment and token of the - async loadAsset(doc: DIDDocument, docId: string): Promise { - try { - const powergate = await Powergate.build(this._host, this._token); - - const services: Array = doc.service; - - for (let i = 0; i < services.length; i++) { - if (services[i].id == docId) { - const asset_cid = services[i].serviceEndpoint; - var bytes: Uint8Array = await powergate.getFromPowergate(asset_cid); - var uint8array = new TextDecoder().decode(bytes); - var type = services[i].type; - break; - } - } - - return {id: docId, type: type, data: uint8array}; - - } catch (e) { - console.log(e); - throw e; - } - } -} diff --git a/legacy/packages/core/src/docu/document.ts b/legacy/packages/core/src/docu/document.ts deleted file mode 100644 index 132ad71..0000000 --- a/legacy/packages/core/src/docu/document.ts +++ /dev/null @@ -1,72 +0,0 @@ -import { GeoDID, IAbstractGeoDIDDocument } from '../geo-did/interfaces/factory-interfaces'; -import { ConcreteDefaultFactory } from '../geo-did/default/geo-did-default-factory'; -import { ConcreteDefaultGeoDIDCollection } from '../geo-did/default/geo-did-default-collection'; -import { ConcreteDefaultGeoDIDItem } from '../geo-did/default/geo-did-default-item'; -import { Powergate } from '../pin/powergate'; -import { IDocumentInfo, IAsset } from '../geo-did/interfaces/global-geo-did-interfaces'; - -export class Document { - - constructor(public _ethereumAddress: string){} - - // Pin on Powergate - async addGenesisDocument(_typeOfGeoDID: string, _host: string, _token: string, assets?: IAsset[]): Promise { - - let document: ConcreteDefaultGeoDIDCollection | ConcreteDefaultGeoDIDItem; - const factory = new ConcreteDefaultFactory(); - - try{ - if(_typeOfGeoDID.toLowerCase() == 'collection'){ - document = await factory.createGeoDIDDocument(ConcreteDefaultGeoDIDCollection); - await document.prepRootGeoDID(this._ethereumAddress, _host, _token); - } - else if(_typeOfGeoDID.toLowerCase() == 'item'){ - document = await factory.createGeoDIDDocument(ConcreteDefaultGeoDIDItem); - await document.prepRootGeoDID(this._ethereumAddress, _host, _token, assets); - } - else throw new Error('Invalid Option, please select Item or Collection'); - - const geodidid: string = document.getGeoDIDid(); - const documentVal = JSON.parse(document.getDidDocument()); - - return { - geodidid: geodidid, - documentVal: documentVal, - } - } - catch(e){ - throw e; - } - } - - // Pin on Powergate - async addChildDocument(_typeOfGeoDID: string, _parentID: string, _path: string, _host: string, _token: string, assets?: IAsset[]): Promise { - - let document: ConcreteDefaultGeoDIDCollection | ConcreteDefaultGeoDIDItem; - const factory: ConcreteDefaultFactory = new ConcreteDefaultFactory(); - - try{ - if(_typeOfGeoDID.toLowerCase() == 'collection'){ - document = await factory.createGeoDIDDocument(ConcreteDefaultGeoDIDCollection); - await document.prepChildGeoDID(this._ethereumAddress, _parentID, _path, _host, _token); - } - else if(_typeOfGeoDID.toLowerCase() == 'item'){ - document = await factory.createGeoDIDDocument(ConcreteDefaultGeoDIDItem); - await document.prepChildGeoDID(this._ethereumAddress, _parentID, _path, _host, _token, assets); - } - else throw new Error('Invalid Option, please select Item or Collection'); - - const geodidid: string = document.getGeoDIDid(); - const documentVal = JSON.parse(document.getDidDocument()); - - return { - geodidid: geodidid, - documentVal: documentVal, - parentid: _parentID - } - } - catch(e){ - throw e; - } - } -} \ No newline at end of file diff --git a/legacy/packages/core/src/geo-did/default/geo-did-default-collection.ts b/legacy/packages/core/src/geo-did/default/geo-did-default-collection.ts deleted file mode 100644 index 8c383dc..0000000 --- a/legacy/packages/core/src/geo-did/default/geo-did-default-collection.ts +++ /dev/null @@ -1,97 +0,0 @@ -import { ConcreteDefaultGeoDIDDocument } from './geo-did-default-document'; -import { GeoDidType, Relationship } from '../interfaces/global-geo-did-interfaces'; -import { GeoDoctypeUtils } from '../doctype-utils/geo-doctype-utils'; - -export class ConcreteDefaultGeoDIDCollection extends ConcreteDefaultGeoDIDDocument { - - constructor(){super()} - - public getGeoDIDid(): string { - return this.geoDIDid; - } - - public async prepRootGeoDID(_ethAddress: string, _host: string, _token: string): Promise{ - - // create the GeoDID Identifier - try{ - const geoId = await GeoDoctypeUtils.createGeodidIdFromGenesis(_ethAddress); - this.geoDIDid = GeoDoctypeUtils.normalizeDocId(geoId); - - this.publicKey = [ - { - id: this.geoDIDid.concat('#controller'), - type: 'Secp256k1VerificationKey2018', - controller: this.geoDIDid, - ethereumAddress: _ethAddress - } - ]; - - this.didmetadata = { - type: GeoDidType.Collection, - created: new Date() - }; - - this.links = [ - { - id: this.geoDIDid, - type: GeoDidType.Collection, - rel: Relationship.Root - }, - { - id: this.geoDIDid, - type: GeoDidType.Collection, - rel: Relationship.Self - } - ] - - this.serviceEndpoint = [] - - this.buildDocument(); - } - catch(e){ - throw e; - } - } - - public async prepChildGeoDID(_ethAddress: string, _parentid: string, _path: string, _host: string, _token: string): Promise{ - this.geoDIDid = _parentid.concat('/' + _path); - const rootGeoDID = GeoDoctypeUtils.getBaseGeoDidId(_parentid); - - this.publicKey = [ - { - id: this.geoDIDid.concat('#controller'), - type: 'Secp256k1VerificationKey2018', - controller: this.geoDIDid, - ethereumAddress: _ethAddress - } - ]; - - this.didmetadata = { - type: GeoDidType.Collection, - created: new Date() - }; - - this.links = [ - { - id: this.geoDIDid, - type: GeoDidType.Collection, - rel: Relationship.Root - }, - { - id: this.geoDIDid, - type: GeoDidType.Collection, - rel: Relationship.Self - }, - { - id: _parentid, - type: GeoDidType.Collection, - rel: Relationship.Parent - } - ]; - - this.serviceEndpoint = []; - - this.buildDocument(); - } - -} \ No newline at end of file diff --git a/legacy/packages/core/src/geo-did/default/geo-did-default-document.ts b/legacy/packages/core/src/geo-did/default/geo-did-default-document.ts deleted file mode 100644 index f23369f..0000000 --- a/legacy/packages/core/src/geo-did/default/geo-did-default-document.ts +++ /dev/null @@ -1,54 +0,0 @@ -import { IAbstractGeoDIDDocument } from '../interfaces/factory-interfaces'; -import { GeoDIDDocument, IMetadata, ILinks, GeoDidType, Relationship, IAsset } from '../interfaces/global-geo-did-interfaces'; -import { GeoDoctypeUtils } from '../doctype-utils/geo-doctype-utils'; -import { ServiceEndpoint, PublicKey } from 'did-resolver'; - - -export class ConcreteDefaultGeoDIDDocument implements IAbstractGeoDIDDocument{ - - public label: string; - public geoDIDid: string; - public doctype: string; - - protected publicKey: PublicKey[]; - protected didmetadata: IMetadata; - protected links: ILinks[]; - protected serviceEndpoint: ServiceEndpoint[]; - protected geoDID: GeoDIDDocument; - - // Need a specific type later - constructor(){} - - buildDocument(){ - this.geoDID = { - '@context':'https://w3id.org/did/v1', - id: this.geoDIDid, - publicKey: this.publicKey, - didmetadata: this.didmetadata, - links: this.links, - service: this.serviceEndpoint - }; - } - - // not implemented for the Base Class - async prepChildGeoDID(_ethAddress: string, _parentid: string, _path: string, _host: string, _token: string): Promise { - throw new Error('Method not implemented for Default.'); - } - - async prepRootGeoDID(_ethAddress: string, _host: string, _token: string): Promise{ - throw new Error('Method not implemented for Default.'); - } - - public getDocType(): string{ - return this.doctype; - } - - public getDidDocument(): string { - return JSON.stringify(this.geoDID); - } - - public getGeoDIDid(): string { - return this.geoDIDid; - } - -} \ No newline at end of file diff --git a/legacy/packages/core/src/geo-did/default/geo-did-default-factory.ts b/legacy/packages/core/src/geo-did/default/geo-did-default-factory.ts deleted file mode 100644 index 53c4669..0000000 --- a/legacy/packages/core/src/geo-did/default/geo-did-default-factory.ts +++ /dev/null @@ -1,9 +0,0 @@ -import { IAbstractGeoDIDFactory } from '../interfaces/factory-interfaces'; - -export class ConcreteDefaultFactory implements IAbstractGeoDIDFactory{ - // Creates the Document - public async createGeoDIDDocument(document: {new (): T}): Promise{ - return new document(); - } - -} \ No newline at end of file diff --git a/legacy/packages/core/src/geo-did/default/geo-did-default-item.ts b/legacy/packages/core/src/geo-did/default/geo-did-default-item.ts deleted file mode 100644 index f514a02..0000000 --- a/legacy/packages/core/src/geo-did/default/geo-did-default-item.ts +++ /dev/null @@ -1,135 +0,0 @@ -import { ConcreteDefaultGeoDIDDocument } from './geo-did-default-document'; -import { GeoDidType, Relationship, IAsset } from '../interfaces/global-geo-did-interfaces'; -import { GeoDoctypeUtils } from '../doctype-utils/geo-doctype-utils'; -import { Powergate } from '../../pin/powergate'; -import { ServiceEndpoint } from 'did-resolver'; - -export class ConcreteDefaultGeoDIDItem extends ConcreteDefaultGeoDIDDocument{ - - constructor(){ - super(); - } - - public async prepRootGeoDID(_ethAddress: string, _host: string, _token: string, _assets?: IAsset[]): Promise{ - - // create the GeoDID Identifier - try{ - const geoId = await GeoDoctypeUtils.createGeodidIdFromGenesis(_ethAddress); - this.geoDIDid = GeoDoctypeUtils.normalizeDocId(geoId); - - this.publicKey = [ - { - id: this.geoDIDid.concat('#controller'), - type: 'Secp256k1VerificationKey2018', - controller: this.geoDIDid, - ethereumAddress: _ethAddress - } - ]; - - this.didmetadata = { - type: GeoDidType.Item, - created: new Date() - }; - - this.links = [ - { - id: this.geoDIDid, - type: GeoDidType.Item, - rel: Relationship.Root - }, - { - id: this.geoDIDid, - type: GeoDidType.Item, - rel: Relationship.Self - } - ]; - - if(_assets) this.serviceEndpoint = await this.addAssetsToGenesisItem(_assets, _host, _token); - else this.serviceEndpoint = []; - - this.buildDocument(); - } - catch(e){ - throw e; - } - } - - public async prepChildGeoDID(_ethAddress: string, _parentid: string, _path: string, _host: string, _token: string, _assets?: IAsset[]): Promise{ - this.geoDIDid = _parentid.concat('/' + _path); - const rootGeoDID = GeoDoctypeUtils.getBaseGeoDidId(_parentid); - - this.publicKey = [ - { - id: this.geoDIDid.concat('#controller'), - type: 'Secp256k1VerificationKey2018', - controller: this.geoDIDid, - ethereumAddress: _ethAddress - } - ]; - - this.didmetadata = { - type: GeoDidType.Item, - created: new Date() - }; - - this.links = [ - { - id: rootGeoDID, - type: GeoDidType.Collection, - rel: Relationship.Root - }, - { - id: this.geoDIDid, - type: GeoDidType.Item, - rel: Relationship.Self - }, - { - id: _parentid, - type: GeoDidType.Collection, - rel: Relationship.Parent - } - ]; - - if(_assets) try{ this.serviceEndpoint = await this.addAssetsToGenesisItem(_assets, _host, _token); }catch(e){ throw e; } - else this.serviceEndpoint = []; - - this.buildDocument(); - - } - - async pinAsset(_powergate: Powergate, _asset: IAsset): Promise { - try { - const uint8array = new TextEncoder().encode(_asset.data); - const seCID: string = await _powergate.getAssetCid(uint8array); - await _powergate.pin(seCID); - - return { - id: this.geoDIDid.concat(`#${_asset.tag}`), - type: _asset.type, - serviceEndpoint: seCID, - }; - - } catch (e) { - throw e; - } - } - - async addAssetsToGenesisItem(_assets: IAsset[], _host: string, _token: string): Promise { - - // by default creates new instance - const powergate: Powergate = await Powergate.build(_host, _token); - - let services: ServiceEndpoint[] = []; - - try { - for(let i = 0; i < _assets.length; i++){ - const service: ServiceEndpoint = await this.pinAsset(powergate, _assets[i]); - services.push(service); - } - return services; - } catch (e) { - throw e; - } - } - -} \ No newline at end of file diff --git a/legacy/packages/core/src/geo-did/doctype-utils/geo-doctype-utils.ts b/legacy/packages/core/src/geo-did/doctype-utils/geo-doctype-utils.ts deleted file mode 100644 index eb60096..0000000 --- a/legacy/packages/core/src/geo-did/doctype-utils/geo-doctype-utils.ts +++ /dev/null @@ -1,59 +0,0 @@ -import ajv from 'ajv'; -import CID from 'cids'; -// TODO: properly import and declare module multihashing-async -const multihashing = require('multihashing-async'); - -/** - * Doctype related utils - */ -export class GeoDoctypeUtils { - static validator: any = new ajv({ allErrors: true }); - - // get the base geodid id - static getBaseGeoDidId(docId: string): string { - const baseid = docId.split('/'); - return baseid[0]; // returns the base id - } - - // create the GeoDID - static async createGeodidIdFromGenesis(_id: string): Promise { - const genesisCid = await this.createCID(_id); - - const baseDocId = ['geo:/', genesisCid.toString()].join('/'); - - return baseDocId; - } - - static normalizeDocId(docId: string): string { - if (docId.startsWith('geo://')) { - return docId.replace('geo://', 'did:geo:'); - } - return docId; - } - - // still needs to be fixed - static getGenesis(docId: string): string { - const genesis = docId.startsWith('geo://') ? docId.split('//')[1] : docId.split('/')[2]; - const indexOfVersion = genesis.indexOf('?'); - if (indexOfVersion !== -1) { - return genesis.substring(0, indexOfVersion); - } - return genesis; - } - - static async createCID(_id: string): Promise { - - const event = new Date(); - const str_time = event.toString(); - - const bytes = new TextEncoder().encode(_id.concat(str_time)); - const hash = await multihashing(bytes, 'sha2-256'); - - const cid = new CID(0, 'dag-pb', hash, 'base58btc'); - - const cidreturn = cid.toString(); - - return cidreturn; - } -} - diff --git a/legacy/packages/core/src/geo-did/interfaces/factory-interfaces.ts b/legacy/packages/core/src/geo-did/interfaces/factory-interfaces.ts deleted file mode 100644 index 99c7c55..0000000 --- a/legacy/packages/core/src/geo-did/interfaces/factory-interfaces.ts +++ /dev/null @@ -1,20 +0,0 @@ -import { ConcreteDefaultGeoDIDCollection } from '../default/geo-did-default-collection'; -import { ConcreteDefaultGeoDIDItem } from '../default/geo-did-default-item'; -import { ConcreteDefaultGeoDIDDocument } from '../default/geo-did-default-document'; -import { IAsset } from './global-geo-did-interfaces' - -export interface IAbstractGeoDIDFactory { - createGeoDIDDocument(c: {new (): T}): Promise; -} - -// Acts as a Node -export interface IAbstractGeoDIDDocument { - label: string; - geoDIDid: string; - prepRootGeoDID(_ethAddress: string, _host: string, _token: string, _assets?: IAsset[]): void; - prepChildGeoDID(_ethAddress: string, _parentid: string, _path: string, _host: string, _token: string, _assets?: IAsset[]): void; - getGeoDIDid(): string; - getDidDocument(): string; -} - -export type GeoDID = ConcreteDefaultGeoDIDDocument | ConcreteDefaultGeoDIDCollection | ConcreteDefaultGeoDIDItem; diff --git a/legacy/packages/core/src/geo-did/interfaces/global-geo-did-interfaces.ts b/legacy/packages/core/src/geo-did/interfaces/global-geo-did-interfaces.ts deleted file mode 100644 index d0e6d3f..0000000 --- a/legacy/packages/core/src/geo-did/interfaces/global-geo-did-interfaces.ts +++ /dev/null @@ -1,54 +0,0 @@ -import { DIDDocument } from 'did-resolver'; -import { Powergate } from '../../pin/powergate'; - -export const enum GeoDidType{ Default = 'default', Item = 'item', Collection = 'collection' } -export const enum Relationship{ Root = 'root', Self = 'self', Parent = 'parent', Child = 'child' } -export const enum ServiceType{ Collection_Metadata = 'collection-metadata', Item_Metadata = 'item-metadata', GeoJSON = 'geojson', JSON = 'json', GeoTIFF = 'geotiff', Misc = 'misc'} - -export interface ILoadInfo { - documentInfo: IDocumentInfo; - powergateInstance: Powergate -} - -export interface IAsset { - type: string; - tag: string; - data: any; -} - -export interface IPinInfo { - geodidid: string; - cid: string; - pinDate: Date; - token: string -} - -export interface IDocumentInfo { - geodidid: string; - documentVal: any; - token?: string; - parentid?: string; -} - -export interface IAssetInfo { - id: string; - type: string; - data: any; -} - -export interface ILinks { - id: string; - type: GeoDidType; - rel: Relationship; -} - -export interface IMetadata { - type: GeoDidType; - created: Date; - updated?: Date[]; -} - -export interface GeoDIDDocument extends DIDDocument { - didmetadata?: IMetadata; - links: ILinks[]; -} diff --git a/legacy/packages/core/src/pin/powergate.ts b/legacy/packages/core/src/pin/powergate.ts deleted file mode 100644 index 47c57d7..0000000 --- a/legacy/packages/core/src/pin/powergate.ts +++ /dev/null @@ -1,115 +0,0 @@ -import { Pow, createPow, powTypes } from '@textile/powergate-client'; - -const chalk = require('chalk'); -//import chalk from 'chalk'; - -export interface Pinning { - open(): Promise; - close(): Promise; - pin(cid: string): Promise; - //unpin(cid: CID): Promise; -} - -export enum JobStatus { - JOB_STATUS_UNSPECIFIED = 0, - JOB_STATUS_QUEUED = 1, - JOB_STATUS_EXECUTING = 2, - JOB_STATUS_FAILED = 3, - JOB_STATUS_CANCELED = 4, - JOB_STATUS_SUCCESS = 5, -} - -// create powergate instance -export class Powergate implements Pinning { - readonly endpoint?: string; - - // Readonly properties must be initialized at their declaration or in the constructor. - constructor(private _host: string, private _pow: Pow, private _token?: string) {} - - static async build(host: string, tokenval?: string): Promise { - //const host: string = "http://0.0.0.0:6002" - //const host = 'http://52.168.51.215:6002'; - const pow: Pow = createPow({ host }); - if (tokenval) { - pow.setAdminToken(tokenval); - pow.setToken(tokenval); - } else { - try { - const { user } = await pow.admin.users.create(); // save this token for later use! - tokenval = user?.token; - pow.setAdminToken(user?.token); - pow.setToken(user?.token); - } catch (err) { - throw err; - } - } - - return new Powergate(host, pow, tokenval); - } - - get pow() { - return this._pow; - } - - async open(): Promise { - this._pow = createPow({ host: this._host }); - if (this._token) { - this._pow.setAdminToken(this._token); - this._pow.setToken(this._token); - } - } - - async getToken(): Promise { - return this._token; - } - - async close(): Promise { - throw new Error('Method not implemented.'); - } - - async getAssetCid(buffer: any): Promise { - try { - const { cid } = await this._pow.data.stage(buffer); - return cid; - } catch (e) { - throw e; - } - } - - async getFromPowergate(cid: string): Promise { - try { - const bytes = await this._pow.data.get(cid); - return bytes; - } catch (e) { - //console.log(e); - throw e; - } - } - - async pin(cid: string): Promise { - try { - const { jobId } = await this._pow.storageConfig.apply(cid); - //this.waitForJobStatus(jobId); - } catch (e) { - if (e.message.includes('cid already pinned, consider using override flag')) { - // Do Nothing - } else { - throw e; - } - } - } - - protected waitForJobStatus(jobId: string): Promise { - return new Promise((resolve, reject) => { - const jobsCancel = this._pow.storageJobs.watch((job: any) => { - if (job.status === powTypes.JobStatus.JOB_STATUS_CANCELED) { - console.log('job canceled'); - } else if (job.status === powTypes.JobStatus.JOB_STATUS_FAILED) { - console.log('job failed'); - } else if (job.status === powTypes.JobStatus.JOB_STATUS_SUCCESS) { - console.log('job success!'); - } - }, jobId); - }); - } -} diff --git a/legacy/packages/core/src/resolver/geo-did-resolver.ts b/legacy/packages/core/src/resolver/geo-did-resolver.ts deleted file mode 100644 index 6517884..0000000 --- a/legacy/packages/core/src/resolver/geo-did-resolver.ts +++ /dev/null @@ -1,153 +0,0 @@ -import { AstralClient } from '../astral-client'; -import { DIDResolver, DIDDocument, ParsedDID, ServiceEndpoint } from 'did-resolver'; -import { Powergate } from '../pin/powergate'; -import { IAssetInfo } from '../geo-did/interfaces/global-geo-did-interfaces'; - -import { setIntervalAsync, clearIntervalAsync } from 'set-interval-async/dynamic'; -import cliSpinners from 'cli-spinners'; - -import { GraphQLClient, gql } from 'graphql-request'; - -//const Ora = require('ora'); -const chalk = require('chalk'); - -export interface ResolverRegistry { - [index: string]: DIDResolver; -} - -interface Variables { - [key: string]: any; -} - -interface Response { - geoDID: { - cid: string; - }; -} - -interface Resolve { - document: any; - asset?: any; -} - -async function declareCID(data: T): Promise{ - if(data.geoDID != null){ return (data.geoDID.cid).toString() } - else{ return undefined } -} - -async function getCID(client: GraphQLClient, query: any, variables: Variables): Promise { - var data: any; - var cid: string; - - var counter: number = 0; - - //const spinner = ora('Loading document').start(); - - return await new Promise((resolve, reject) => { - const interval = setIntervalAsync(async() => { - /* - const spinner = new Ora({ - discardStdin: false, - text: `${chalk.yellow('Loading document')}`, - spinner: cliSpinners.dots - }); - - spinner.start(); - spinner.color = 'yellow';*/ - try{ - data = await client.request(query, variables) - - if (data.hasOwnProperty('geoDID')) { - cid = await declareCID(data); - } - }catch(err){ - reject(`${err}`); // reject - } - - if (cid != undefined) { - //spinner.clear(); - //spinner.succeed(`${chalk.green('Request was successful')}`); - resolve(cid); - clearIntervalAsync(interval); - //spinner.stop(); - } - else if(counter >= 30){ - //spinner.clear(); - //spinner.fail(`${chalk.red('Failed: ')}`); - reject(`${chalk.red('The Request Timed out. Please try again.')}`); - clearIntervalAsync(interval); - //spinner.stop(); - } - - counter++; - }, 5000); - }); -} - -const resolve = async ( - astral: AstralClient, - powergate: Powergate, - parseddid: string, - parsedid: string, - parsedpath?: string, - parsedfragment?: string, -): Promise => { - - const endpoint = astral._thegraphEndpoint; - - const client = new GraphQLClient(endpoint); - - let pathActual: string = ''; - - if (parsedpath != undefined) { - pathActual = parseddid.concat(parsedpath); - } else { - pathActual = parseddid; - } - - const query = gql` - query($geoDIDID: ID!) { - geoDID(id: $geoDIDID) { - cid - } - } - `; - - const variables: Variables = { - geoDIDID: pathActual, - }; - - try { - // wait for the response to return cid or timeout - const cid: string = await getCID(client, query, variables); - - // gets the document - const bytes: Uint8Array = await powergate.getFromPowergate(cid); - const strj = new TextDecoder('utf-8').decode(bytes); - - const document = JSON.parse(strj); - - return document; - - } catch(e) { - //console.log(e); - throw e; - } -}; - - - -// needs a powergate instance to call getResolver -export default { - getResolver: (astral: AstralClient, powergate: Powergate): ResolverRegistry => { - return { - geo: async (did: string, parsed: ParsedDID): Promise => { - try{ - return await resolve(astral, powergate, parsed.did, parsed.id, parsed.path, parsed.fragment); - }catch(e){ - throw e; - } - }, - }; - }, -}; diff --git a/legacy/packages/core/src/scripts/fetch.ts b/legacy/packages/core/src/scripts/fetch.ts deleted file mode 100644 index 6c69175..0000000 --- a/legacy/packages/core/src/scripts/fetch.ts +++ /dev/null @@ -1,17 +0,0 @@ -import fetch from 'cross-fetch'; - -// will be used to fetch the catalogs and items -export async function fetchJson(url: string, payload?: any): Promise { - let opts; - if (payload) { - opts = { - method: 'post', - body: JSON.stringify(payload), - headers: { 'Content-Type': 'application/json' }, - }; - } - const res = await (await fetch(url, opts)).json(); - if (res.error) throw new Error(res.error); - return res; -} - diff --git a/legacy/packages/core/tsconfig.json b/legacy/packages/core/tsconfig.json deleted file mode 100644 index a2aa06c..0000000 --- a/legacy/packages/core/tsconfig.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "extends": "../../tsconfig.json", - "compilerOptions": { - "outDir": "./lib", - "rootDir": "./src", - "composite": true, - "strictNullChecks": false, - }, - "include": ["./src/**/*"] -} \ No newline at end of file diff --git a/legacy/packages/ipld-encoded-geotiff/CHANGELOG.md b/legacy/packages/ipld-encoded-geotiff/CHANGELOG.md deleted file mode 100644 index 2fe531a..0000000 --- a/legacy/packages/ipld-encoded-geotiff/CHANGELOG.md +++ /dev/null @@ -1,48 +0,0 @@ -# Change Log - -All notable changes to this project will be documented in this file. -See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. - -## [1.0.6](https://github.com/AstralProtocol/astralprotocol/compare/@astralprotocol/ipld-encoded-geotiff@1.0.5...@astralprotocol/ipld-encoded-geotiff@1.0.6) (2021-03-15) - -**Note:** Version bump only for package @astralprotocol/ipld-encoded-geotiff - - - - - -## [1.0.5](https://github.com/AstralProtocol/astralprotocol/compare/@astralprotocol/ipld-encoded-geotiff@1.0.4...@astralprotocol/ipld-encoded-geotiff@1.0.5) (2021-03-15) - -**Note:** Version bump only for package @astralprotocol/ipld-encoded-geotiff - - - - - -## [1.0.4](https://github.com/AstralProtocol/astralprotocol/compare/@astralprotocol/ipld-encoded-geotiff@1.0.3...@astralprotocol/ipld-encoded-geotiff@1.0.4) (2021-02-24) - -**Note:** Version bump only for package @astralprotocol/ipld-encoded-geotiff - - - - - -## [1.0.3](https://github.com/AstralProtocol/astralprotocol/compare/@astralprotocol/ipld-encoded-geotiff@1.0.2...@astralprotocol/ipld-encoded-geotiff@1.0.3) (2021-02-24) - -**Note:** Version bump only for package @astralprotocol/ipld-encoded-geotiff - - - - - -## [1.0.2](https://github.com/AstralProtocol/astralprotocol/compare/@astralprotocol/ipld-encoded-geotiff@1.0.1...@astralprotocol/ipld-encoded-geotiff@1.0.2) (2021-02-18) - -**Note:** Version bump only for package @astralprotocol/ipld-encoded-geotiff - - - - - -## 1.0.1 (2021-02-18) - -**Note:** Version bump only for package @astralprotocol/ipld-encoded-geotiff diff --git a/legacy/packages/ipld-encoded-geotiff/LICENSE-APACHE b/legacy/packages/ipld-encoded-geotiff/LICENSE-APACHE deleted file mode 100644 index 2ad0ad1..0000000 --- a/legacy/packages/ipld-encoded-geotiff/LICENSE-APACHE +++ /dev/null @@ -1,201 +0,0 @@ - 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 [2020] [astralDAO] - - 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/legacy/packages/ipld-encoded-geotiff/LICENSE-MIT b/legacy/packages/ipld-encoded-geotiff/LICENSE-MIT deleted file mode 100644 index 1874419..0000000 --- a/legacy/packages/ipld-encoded-geotiff/LICENSE-MIT +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) 2020 astralDAO - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/legacy/packages/ipld-encoded-geotiff/README.md b/legacy/packages/ipld-encoded-geotiff/README.md deleted file mode 100644 index 5af9e4d..0000000 --- a/legacy/packages/ipld-encoded-geotiff/README.md +++ /dev/null @@ -1,11 +0,0 @@ -# `ipld-encoded-geotiff` - -> TODO: description - -## Usage - -``` -const ipldEncodedGeotiff = require('ipld-encoded-geotiff'); - -// TODO: DEMONSTRATE API -``` diff --git a/legacy/packages/ipld-encoded-geotiff/__tests__/ipld-encoded-geotiff.test.js b/legacy/packages/ipld-encoded-geotiff/__tests__/ipld-encoded-geotiff.test.js deleted file mode 100644 index d491c88..0000000 --- a/legacy/packages/ipld-encoded-geotiff/__tests__/ipld-encoded-geotiff.test.js +++ /dev/null @@ -1,7 +0,0 @@ -'use strict'; - -const ipldEncodedGeotiff = require('..'); - -describe('ipld-encoded-geotiff', () => { - it('needs tests'); -}); diff --git a/legacy/packages/ipld-encoded-geotiff/lib/index.d.ts b/legacy/packages/ipld-encoded-geotiff/lib/index.d.ts deleted file mode 100644 index cb0ff5c..0000000 --- a/legacy/packages/ipld-encoded-geotiff/lib/index.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/legacy/packages/ipld-encoded-geotiff/lib/index.js b/legacy/packages/ipld-encoded-geotiff/lib/index.js deleted file mode 100644 index 0452e2c..0000000 --- a/legacy/packages/ipld-encoded-geotiff/lib/index.js +++ /dev/null @@ -1,41 +0,0 @@ -"use strict"; -var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; -Object.defineProperty(exports, "__esModule", { value: true }); -const geotiff_1 = require("geotiff"); -const cross_fetch_1 = __importDefault(require("cross-fetch")); -function run(url) { - return __awaiter(this, void 0, void 0, function* () { - try { - const response = yield cross_fetch_1.default(url); - const arrayBuffer = yield response.arrayBuffer(); - const tiff = yield geotiff_1.fromArrayBuffer(arrayBuffer); - console.log(tiff); - const image = yield tiff.getImage(); - console.log(image); - const width = image.getWidth(); - const height = image.getHeight(); - console.log("Width " + width); - console.log("Height " + height); - const tileWidth = image.getTileWidth(); - const tileHeight = image.getTileHeight(); - console.log("Tile Width " + tileWidth); - console.log("Tile Height " + tileHeight); - } - catch (e) { - console.log(e); - } - }); -} -run('http://download.osgeo.org/geotiff/samples/gdal_eg/cea.tif'); -//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/legacy/packages/ipld-encoded-geotiff/lib/index.js.map b/legacy/packages/ipld-encoded-geotiff/lib/index.js.map deleted file mode 100644 index a458ac2..0000000 --- a/legacy/packages/ipld-encoded-geotiff/lib/index.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAGA,qCAA0F;AAC1F,8DAAgC;AAQhC,SAAe,GAAG,CAAC,GAAW;;QAC1B,IAAG;YACC,MAAM,QAAQ,GAAG,MAAM,qBAAK,CAAC,GAAG,CAAC,CAAC;YAClC,MAAM,WAAW,GAAG,MAAM,QAAQ,CAAC,WAAW,EAAE,CAAC;YACjD,MAAM,IAAI,GAAG,MAAM,yBAAe,CAAC,WAAW,CAAC,CAAC;YAChD,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;YAClB,MAAM,KAAK,GAAG,MAAM,IAAI,CAAC,QAAQ,EAAE,CAAC;YACpC,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;YACnB,MAAM,KAAK,GAAG,KAAK,CAAC,QAAQ,EAAE,CAAC;YAC/B,MAAM,MAAM,GAAG,KAAK,CAAC,SAAS,EAAE,CAAC;YACjC,OAAO,CAAC,GAAG,CAAC,QAAQ,GAAG,KAAK,CAAC,CAAC;YAC9B,OAAO,CAAC,GAAG,CAAC,SAAS,GAAG,MAAM,CAAC,CAAC;YAEhC,MAAM,SAAS,GAAG,KAAK,CAAC,YAAY,EAAE,CAAC;YACvC,MAAM,UAAU,GAAG,KAAK,CAAC,aAAa,EAAE,CAAC;YACzC,OAAO,CAAC,GAAG,CAAC,aAAa,GAAG,SAAS,CAAC,CAAA;YACtC,OAAO,CAAC,GAAG,CAAC,cAAc,GAAG,UAAU,CAAC,CAAA;SAG3C;QAAA,OAAM,CAAC,EAAC;YACL,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;SAClB;IACL,CAAC;CAAA;AAED,GAAG,CAAC,2DAA2D,CAAC,CAAC"} \ No newline at end of file diff --git a/legacy/packages/ipld-encoded-geotiff/package.json b/legacy/packages/ipld-encoded-geotiff/package.json deleted file mode 100644 index 915a311..0000000 --- a/legacy/packages/ipld-encoded-geotiff/package.json +++ /dev/null @@ -1,55 +0,0 @@ -{ - "name": "@astralprotocol/ipld-encoded-geotiff", - "version": "1.0.6", - "description": "IPLD Encoded GeoTIFFs to enable CID serving capabilities on IPFS. ", - "author": "Astral ", - "homepage": "https://github.com/AstralProtocol/astralprotocol#readme", - "license": "MIT OR Apache-2.0", - "main": "lib/index.ts", - "typings": "lib/index.d.ts", - "directories": { - "lib": "lib", - "test": "__tests__" - }, - "files": [ - "lib" - ], - "repository": { - "type": "git", - "url": "git+https://github.com/AstralProtocol/astralprotocol.git", - "directory": "packages/ipld-encoded-geotiff" - }, - "publishConfig": { - "registry": "https://registry.npmjs.org", - "access": "public" - }, - "scripts": { - "start": "ts-node src/index.ts", - "tsc": "tsc", - "test": "jest --coverage --runInBand", - "build": "../../node_modules/.bin/tsc -p tsconfig.json", - "prepublishOnly": "yarn run build", - "prebuild": "yarn run clean", - "lint": "eslint ./src '*/**/*.{js,ts,tsx}' --quiet --fix", - "clean": "rm -rf ./lib ./tsconfig.tsbuildinfo" - }, - "devDependencies": { - "@typescript-eslint/eslint-plugin": "^4.9.0", - "@typescript-eslint/parser": "^4.9.0", - "cross-fetch": "^3.0.6", - "eslint": "^7.14.0", - "eslint-config-prettier": "^6.15.0", - "eslint-plugin-jest": "^24.1.3", - "eslint-plugin-prettier": "^3.1.4", - "express": "^4.17.1", - "jest": "^26.6.3", - "prettier": "^2.2.1" - }, - "dependencies": { - "geotiff": "^1.0.0-beta.14", - "ts-node": "^9.1.1" - }, - "bugs": { - "url": "https://github.com/AstralProtocol/astralprotocol/issues" - } -} diff --git a/legacy/packages/ipld-encoded-geotiff/src/index.ts b/legacy/packages/ipld-encoded-geotiff/src/index.ts deleted file mode 100644 index aa56ef2..0000000 --- a/legacy/packages/ipld-encoded-geotiff/src/index.ts +++ /dev/null @@ -1,38 +0,0 @@ -// 1. Get the data and parse it -// 2. - -import GeoTIFF, { fromUrl, fromFile, fromUrls, fromArrayBuffer, fromBlob } from 'geotiff'; -import fetch from 'cross-fetch'; - -// To read a whole image into one big array of arrays the following method call can be used: -// const data = await image.readRasters(); - -/** - * - */ -async function run(url: string){ - try{ - const response = await fetch(url); - const arrayBuffer = await response.arrayBuffer(); - const tiff = await fromArrayBuffer(arrayBuffer); - console.log(tiff); - const image = await tiff.getImage(); - console.log(image); - const width = image.getWidth(); - const height = image.getHeight(); - console.log("Width " + width); - console.log("Height " + height); - - const tileWidth = image.getTileWidth(); - const tileHeight = image.getTileHeight(); - console.log("Tile Width " + tileWidth) //514 - console.log("Tile Height " + tileHeight) //15 - - - }catch(e){ - console.log(e); - } -} - -run('http://download.osgeo.org/geotiff/samples/gdal_eg/cea.tif'); -//run('https://storage.googleapis.com/pdd-stac/disasters/hurricane-harvey/0831/SkySat_Freeport_s03_20170831T162740Z.tif'); \ No newline at end of file diff --git a/legacy/packages/ipld-encoded-geotiff/src/tiff/gdal/cea.tif b/legacy/packages/ipld-encoded-geotiff/src/tiff/gdal/cea.tif deleted file mode 100644 index 1d52161..0000000 Binary files a/legacy/packages/ipld-encoded-geotiff/src/tiff/gdal/cea.tif and /dev/null differ diff --git a/legacy/packages/ipld-encoded-geotiff/tsconfig.json b/legacy/packages/ipld-encoded-geotiff/tsconfig.json deleted file mode 100644 index 328b226..0000000 --- a/legacy/packages/ipld-encoded-geotiff/tsconfig.json +++ /dev/null @@ -1,25 +0,0 @@ -{ - "extends": "../../tsconfig.json", - "compilerOptions": { - "outDir": "./lib", - "rootDir": "./src", - "allowJs": true, - "composite": true, - "strictNullChecks": true, - "moduleResolution": "node", - "noImplicitAny": false, - "target": "es6", - "module": "commonjs" - }, - "typeRoots": [ - "./src/typings", - "./node_modules/@types/" - ], - "include": [ - "./src/**/*" - ] - , - "exclude": [ - "node_modules" - ] -} \ No newline at end of file diff --git a/legacy/packages/stac-validator-js/CHANGELOG.md b/legacy/packages/stac-validator-js/CHANGELOG.md deleted file mode 100644 index 5110bf0..0000000 --- a/legacy/packages/stac-validator-js/CHANGELOG.md +++ /dev/null @@ -1,288 +0,0 @@ -# Change Log - -All notable changes to this project will be documented in this file. -See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. - -## [0.0.7](https://github.com/AstralProtocol/astralprotocol/compare/@astralprotocol/stac-validator-js@0.0.6...@astralprotocol/stac-validator-js@0.0.7) (2021-03-15) - -**Note:** Version bump only for package @astralprotocol/stac-validator-js - - - - - -## [0.0.6](https://github.com/AstralProtocol/astralprotocol/compare/@astralprotocol/stac-validator-js@0.0.5...@astralprotocol/stac-validator-js@0.0.6) (2021-03-15) - -**Note:** Version bump only for package @astralprotocol/stac-validator-js - - - - - -## [0.0.5](https://github.com/AstralProtocol/astralprotocol/compare/@astralprotocol/stac-validator-js@0.0.4...@astralprotocol/stac-validator-js@0.0.5) (2021-02-24) - -**Note:** Version bump only for package @astralprotocol/stac-validator-js - - - - - -## [0.0.4](https://github.com/AstralProtocol/astralprotocol/compare/@astralprotocol/stac-validator-js@0.0.3...@astralprotocol/stac-validator-js@0.0.4) (2021-02-24) - -**Note:** Version bump only for package @astralprotocol/stac-validator-js - - - - - -## [0.0.3](https://github.com/AstralProtocol/astralprotocol/compare/@astralprotocol/stac-validator-js@0.0.2...@astralprotocol/stac-validator-js@0.0.3) (2021-02-18) - -**Note:** Version bump only for package @astralprotocol/stac-validator-js - - - - - -## [0.0.2](https://github.com/AstralProtocol/astralprotocol/compare/@astralprotocol/stac-validator-js@0.0.1...@astralprotocol/stac-validator-js@0.0.2) (2021-02-18) - -**Note:** Version bump only for package @astralprotocol/stac-validator-js - - - - - -## 0.0.1 (2021-01-05) - -**Note:** Version bump only for package @astralprotocol/stac-validator-js - - - - - -## [0.0.30](https://github.com/astralDAO/astralprotocol/compare/@astraldao/stac-validator-js@0.0.29...@astraldao/stac-validator-js@0.0.30) (2020-11-26) - -**Note:** Version bump only for package @astraldao/stac-validator-js - - - - - -## [0.0.29](https://github.com/astralDAO/astralprotocol/compare/@astraldao/stac-validator-js@0.0.28...@astraldao/stac-validator-js@0.0.29) (2020-11-26) - -**Note:** Version bump only for package @astraldao/stac-validator-js - - - - - -## [0.0.28](https://github.com/astralDAO/astralprotocol/compare/@astraldao/stac-validator-js@0.0.27...@astraldao/stac-validator-js@0.0.28) (2020-11-26) - -**Note:** Version bump only for package @astraldao/stac-validator-js - - - - - -## [0.0.27](https://github.com/astralDAO/astralprotocol/compare/@astraldao/stac-validator-js@0.0.26...@astraldao/stac-validator-js@0.0.27) (2020-11-26) - -**Note:** Version bump only for package @astraldao/stac-validator-js - - - - - -## [0.0.26](https://github.com/astralDAO/astralprotocol/compare/@astraldao/stac-validator-js@0.0.25...@astraldao/stac-validator-js@0.0.26) (2020-11-26) - -**Note:** Version bump only for package @astraldao/stac-validator-js - - - - - -## [0.0.25](https://github.com/astralDAO/astralprotocol/compare/@astraldao/stac-validator-js@0.0.24...@astraldao/stac-validator-js@0.0.25) (2020-11-26) - -**Note:** Version bump only for package @astraldao/stac-validator-js - - - - - -## [0.0.24](https://github.com/astralDAO/astralprotocol/compare/@astraldao/stac-validator-js@0.0.23...@astraldao/stac-validator-js@0.0.24) (2020-11-24) - -**Note:** Version bump only for package @astraldao/stac-validator-js - - - - - -## [0.0.23](https://github.com/astralDAO/astralprotocol/compare/@astraldao/stac-validator-js@0.0.22...@astraldao/stac-validator-js@0.0.23) (2020-11-24) - -**Note:** Version bump only for package @astraldao/stac-validator-js - - - - - -## [0.0.22](https://github.com/astralDAO/astralprotocol/compare/@astraldao/stac-validator-js@0.0.21...@astraldao/stac-validator-js@0.0.22) (2020-11-24) - -**Note:** Version bump only for package @astraldao/stac-validator-js - - - - - -## [0.0.21](https://github.com/astralDAO/astralprotocol/compare/@astraldao/stac-validator-js@0.0.20...@astraldao/stac-validator-js@0.0.21) (2020-11-21) - -**Note:** Version bump only for package @astraldao/stac-validator-js - - - - - -## [0.0.20](https://github.com/astralDAO/astralprotocol/compare/@astraldao/stac-validator-js@0.0.19...@astraldao/stac-validator-js@0.0.20) (2020-10-16) - -**Note:** Version bump only for package @astraldao/stac-validator-js - - - - - -## [0.0.19](https://github.com/astralDAO/astralprotocol/compare/@astraldao/stac-validator-js@0.0.18...@astraldao/stac-validator-js@0.0.19) (2020-10-16) - -**Note:** Version bump only for package @astraldao/stac-validator-js - - - - - -## [0.0.18](https://github.com/astralDAO/astralprotocol/compare/@astraldao/stac-validator-js@0.0.17...@astraldao/stac-validator-js@0.0.18) (2020-10-15) - -**Note:** Version bump only for package @astraldao/stac-validator-js - - - - - -## [0.0.17](https://github.com/astralDAO/astralprotocol/compare/@astraldao/stac-validator-js@0.0.16...@astraldao/stac-validator-js@0.0.17) (2020-10-14) - -**Note:** Version bump only for package @astraldao/stac-validator-js - - - - - -## [0.0.16](https://github.com/astralDAO/astralprotocol/compare/@astraldao/stac-validator-js@0.0.15...@astraldao/stac-validator-js@0.0.16) (2020-10-14) - -**Note:** Version bump only for package @astraldao/stac-validator-js - - - - - -## [0.0.15](https://github.com/astralDAO/astralprotocol/compare/@astraldao/stac-validator-js@0.0.14...@astraldao/stac-validator-js@0.0.15) (2020-10-14) - -**Note:** Version bump only for package @astraldao/stac-validator-js - - - - - -## [0.0.14](https://github.com/astralDAO/astralprotocol/compare/@astraldao/stac-validator-js@0.0.13...@astraldao/stac-validator-js@0.0.14) (2020-10-14) - -**Note:** Version bump only for package @astraldao/stac-validator-js - - - - - -## [0.0.13](https://github.com/astralDAO/astralprotocol/compare/@astraldao/stac-validator-js@0.0.12...@astraldao/stac-validator-js@0.0.13) (2020-10-14) - -**Note:** Version bump only for package @astraldao/stac-validator-js - - - - - -## [0.0.12](https://github.com/astralDAO/astralprotocol/compare/@astraldao/stac-validator-js@0.0.11...@astraldao/stac-validator-js@0.0.12) (2020-10-14) - -**Note:** Version bump only for package @astraldao/stac-validator-js - - - - - -## [0.0.11](https://github.com/astralDAO/astralprotocol/compare/@astraldao/stac-validator-js@0.0.10...@astraldao/stac-validator-js@0.0.11) (2020-10-14) - -**Note:** Version bump only for package @astraldao/stac-validator-js - - - - - -## [0.0.10](https://github.com/astralDAO/astralprotocol/compare/@astraldao/stac-validator-js@0.0.9...@astraldao/stac-validator-js@0.0.10) (2020-10-14) - -**Note:** Version bump only for package @astraldao/stac-validator-js - - - - - -## [0.0.9](https://github.com/astralDAO/astralprotocol/compare/@astraldao/stac-validator-js@0.0.8...@astraldao/stac-validator-js@0.0.9) (2020-10-14) - -**Note:** Version bump only for package @astraldao/stac-validator-js - - - - - -## [0.0.8](https://github.com/astralDAO/astralprotocol/compare/@astraldao/stac-validator-js@0.0.7...@astraldao/stac-validator-js@0.0.8) (2020-10-14) - -**Note:** Version bump only for package @astraldao/stac-validator-js - - - - - -## [0.0.7](https://github.com/astralDAO/astralprotocol/compare/@astraldao/stac-validator-js@0.0.6...@astraldao/stac-validator-js@0.0.7) (2020-10-13) - -**Note:** Version bump only for package @astraldao/stac-validator-js - - - - - -## [0.0.6](https://github.com/astralDAO/astralprotocol/compare/@astraldao/stac-validator-js@0.0.5...@astraldao/stac-validator-js@0.0.6) (2020-10-13) - -**Note:** Version bump only for package @astraldao/stac-validator-js - - - - - -## [0.0.5](https://github.com/astralDAO/astralprotocol/compare/@astraldao/stac-validator-js@0.0.4...@astraldao/stac-validator-js@0.0.5) (2020-10-13) - -**Note:** Version bump only for package @astraldao/stac-validator-js - - - - - -## [0.0.4](https://github.com/astralDAO/astralprotocol/compare/@astraldao/stac-validator-js@0.0.3...@astraldao/stac-validator-js@0.0.4) (2020-10-13) - -**Note:** Version bump only for package @astraldao/stac-validator-js - - - - - -## 0.0.3 (2020-10-13) - -**Note:** Version bump only for package @astraldao/stac-validator-js - - - - - -## 0.0.2 (2020-09-28) - -**Note:** Version bump only for package @astraldao/stac-validator diff --git a/legacy/packages/stac-validator-js/LICENSE-APACHE b/legacy/packages/stac-validator-js/LICENSE-APACHE deleted file mode 100644 index 2ad0ad1..0000000 --- a/legacy/packages/stac-validator-js/LICENSE-APACHE +++ /dev/null @@ -1,201 +0,0 @@ - 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 [2020] [astralDAO] - - 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/legacy/packages/stac-validator-js/LICENSE-MIT b/legacy/packages/stac-validator-js/LICENSE-MIT deleted file mode 100644 index 1874419..0000000 --- a/legacy/packages/stac-validator-js/LICENSE-MIT +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) 2020 astralDAO - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/legacy/packages/stac-validator-js/lib/file.d.ts b/legacy/packages/stac-validator-js/lib/file.d.ts deleted file mode 100644 index e69de29..0000000 diff --git a/legacy/packages/stac-validator-js/lib/file.js b/legacy/packages/stac-validator-js/lib/file.js deleted file mode 100644 index c7570e8..0000000 --- a/legacy/packages/stac-validator-js/lib/file.js +++ /dev/null @@ -1 +0,0 @@ -//# sourceMappingURL=file.js.map \ No newline at end of file diff --git a/legacy/packages/stac-validator-js/lib/file.js.map b/legacy/packages/stac-validator-js/lib/file.js.map deleted file mode 100644 index ba6f8b7..0000000 --- a/legacy/packages/stac-validator-js/lib/file.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"file.js","sourceRoot":"","sources":["../src/file.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/legacy/packages/stac-validator-js/package.json b/legacy/packages/stac-validator-js/package.json deleted file mode 100644 index dc92062..0000000 --- a/legacy/packages/stac-validator-js/package.json +++ /dev/null @@ -1,41 +0,0 @@ -{ - "name": "@astralprotocol/stac-validator-js", - "version": "0.0.7", - "description": "Node implementation of a Stac file validator ", - "author": "Astral ", - "homepage": "https://github.com/AstralProtocol/astralprotocol#readme", - "license": "MIT OR Apache-2.0", - "main": "src/stac-validator.js", - "directories": { - "lib": "lib" - }, - "files": [ - "src" - ], - "repository": { - "type": "git", - "url": "git+https://github.com/AstralProtocol/astralprotocol.git", - "directory": "packages/stac-validator-js" - }, - "publishConfig": { - "registry": "https://registry.npmjs.org", - "access": "public" - }, - "scripts": { - "tsc": "tsc", - "test": "jest --coverage --runInBand", - "prebuild": "yarn run clean", - "lint": "eslint ./src '*/**/*.{js,ts,tsx}' --quiet --fix", - "clean": "rm -rf ./lib", - "validate": "node ./src/index.js" - }, - "bugs": { - "url": "https://github.com/AstralProtocol/astralprotocol/issues" - }, - "dependencies": { - "@apidevtools/json-schema-ref-parser": "^9.0.1", - "ajv": "^6.12.2", - "compare-versions": "^3.6.0" - }, - "gitHead": "d1177c83e76b00ec51e6b0532b6588e3bc29fa77" -} diff --git a/legacy/packages/stac-validator-js/src/file.ts b/legacy/packages/stac-validator-js/src/file.ts deleted file mode 100644 index e69de29..0000000 diff --git a/legacy/packages/stac-validator-js/src/stac-validator.js b/legacy/packages/stac-validator-js/src/stac-validator.js deleted file mode 100644 index 599cdab..0000000 --- a/legacy/packages/stac-validator-js/src/stac-validator.js +++ /dev/null @@ -1,175 +0,0 @@ -// based on https://github.com/m-mohr/stac-node-validator -// transformed into a node package for easier consumption - -const RefParser = require("@apidevtools/json-schema-ref-parser"); -const Ajv = require("ajv"); -const compareVersions = require("compare-versions"); - -let COMPILED = {}; -let ajv = new Ajv({ - allErrors: true, - missingRefs: "ignore", -}); - -module.exports = async function validate(json) { - try { - let isApiList = false; - let entries; - if (Array.isArray(json.collections)) { - entries = json.collections; - isApiList = true; - console.log( - json + - " is a /collections endpoint. Validating all " + - entries.length + - " collections, but ignoring the other parts of the response.\n" - ); - } else if (Array.isArray(json.features)) { - entries = json.features; - isApiList = true; - console.log( - json + - " is a /collections/:id/items endpoint. Validating all " + - entries.length + - " items, but ignoring the other parts of the response.\n" - ); - } else { - entries = [json]; - } - - let fileValid = true; - for (let data of entries) { - let id = json; - if (isApiList) { - id += " -> " + data.id; - } - if (typeof data.stac_version !== "string") { - console.error("-- " + id + ": Skipping; No STAC version found\n"); - fileValid = false; - continue; - } else if (compareVersions(data.stac_version, "1.0.0-beta.2", "<")) { - console.error( - "-- " + - id + - ": Skipping; Can only validate STAC version >= 1.0.0-beta.2\n" - ); - continue; - } else { - console.log("-- " + id + " (" + data.stac_version + ")"); - } - - let type; - if (typeof data.type !== "undefined") { - if (data.type === "Feature") { - type = "item"; - } else if (data.type === "FeatureCollection") { - // type = 'itemcollection'; - console.warn( - "-- " + id + ": Skipping; STAC ItemCollections not supported yet\n" - ); - continue; - } else { - console.error( - "-- " + id + ": `type` is invalid; must be `Feature`\n" - ); - fileValid = false; - continue; - } - } else { - if ( - typeof data.extent !== "undefined" || - data.license !== "undefined" - ) { - type = "collection"; - } else { - type = "catalog"; - } - } - - // Get all schema to validate against - let schemas = [type]; - if (Array.isArray(data.stac_extensions)) { - schemas = schemas.concat(data.stac_extensions); - } - - for (let schema of schemas) { - try { - let loadArgs = isUrl(schema) - ? [schema] - : // removed schemaFolder and replaced with null - [null, data.stac_version, schema]; - let validate = await loadSchema(...loadArgs); - let valid = validate(data); - if (!valid) { - console.log("---- " + schema + ": invalid"); - console.warn(validate.errors); - console.log("\n"); - fileValid = false; - if (schema === "core") { - console.info( - "--- Validation error in core, skipping extension validation" - ); - break; - } - } else { - console.info("---- " + schema + ": valid"); - } - } catch (error) { - fileValid = false; - console.error("---- " + schema + ": " + error.message); - } - } - console.log("\n"); - } - - return fileValid; - } catch (error) { - console.error(error); - } -}; - -const SUPPORTED_PROTOCOLS = ["http", "https"]; - -function isUrl(uri) { - let part = uri.match(/^(\w+):\/\//i); - if (part) { - if (!SUPPORTED_PROTOCOLS.includes(part[1].toLowerCase())) { - throw new Error('Given protocol "' + part[1] + '" is not supported.'); - } - return true; - } - return false; -} - -async function loadSchema(baseUrl = null, version = null, shortcut = null) { - version = typeof version === "string" ? "v" + version : "unversioned"; - - if (typeof baseUrl !== "string") { - baseUrl = "https://schemas.stacspec.org/" + version; - } - - let url; - if ( - shortcut === "item" || - shortcut === "catalog" || - shortcut === "collection" - ) { - url = baseUrl + "/" + shortcut + "-spec/json-schema/" + shortcut + ".json"; - } else if (typeof shortcut === "string") { - url = baseUrl + "/extensions/" + shortcut + "/json-schema/schema.json"; - } else { - url = baseUrl; - } - - if (typeof COMPILED[url] !== "undefined") { - return COMPILED[url]; - } else { - let fullSchema = await RefParser.dereference(url, { - dereference: { - circular: "ignore", - }, - }); - COMPILED[url] = ajv.compile(fullSchema); - return COMPILED[url]; - } -} diff --git a/legacy/packages/stac-validator-js/tsconfig.json b/legacy/packages/stac-validator-js/tsconfig.json deleted file mode 100644 index 2f36eea..0000000 --- a/legacy/packages/stac-validator-js/tsconfig.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "extends": "../../tsconfig.json", - "compilerOptions": { - "outDir": "./lib", - "rootDir": "./src", - "composite": true, - "strictNullChecks": false - }, - "exclude": ["./lib/**/*"] -} diff --git a/legacy/packages/subgraph/CHANGELOG.md b/legacy/packages/subgraph/CHANGELOG.md deleted file mode 100644 index 8cf4232..0000000 --- a/legacy/packages/subgraph/CHANGELOG.md +++ /dev/null @@ -1,304 +0,0 @@ -# Change Log - -All notable changes to this project will be documented in this file. -See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. - -## [1.0.13](https://github.com/AstralProtocol/astralprotocol/compare/@astralprotocol/subgraph@1.0.12...@astralprotocol/subgraph@1.0.13) (2021-03-29) - -**Note:** Version bump only for package @astralprotocol/subgraph - - - - - -## [1.0.12](https://github.com/AstralProtocol/astralprotocol/compare/@astralprotocol/subgraph@1.0.11...@astralprotocol/subgraph@1.0.12) (2021-03-29) - -**Note:** Version bump only for package @astralprotocol/subgraph - - - - - -## [1.0.11](https://github.com/AstralProtocol/astralprotocol/compare/@astralprotocol/subgraph@1.0.10...@astralprotocol/subgraph@1.0.11) (2021-03-28) - -**Note:** Version bump only for package @astralprotocol/subgraph - - - - - -## [1.0.10](https://github.com/AstralProtocol/astralprotocol/compare/@astralprotocol/subgraph@1.0.9...@astralprotocol/subgraph@1.0.10) (2021-03-28) - -**Note:** Version bump only for package @astralprotocol/subgraph - - - - - -## [1.0.9](https://github.com/AstralProtocol/astralprotocol/compare/@astralprotocol/subgraph@1.0.8...@astralprotocol/subgraph@1.0.9) (2021-03-17) - -**Note:** Version bump only for package @astralprotocol/subgraph - - - - - -## [1.0.8](https://github.com/AstralProtocol/astralprotocol/compare/@astralprotocol/subgraph@1.0.7...@astralprotocol/subgraph@1.0.8) (2021-03-16) - -**Note:** Version bump only for package @astralprotocol/subgraph - - - - - -## [1.0.7](https://github.com/AstralProtocol/astralprotocol/compare/@astralprotocol/subgraph@1.0.6...@astralprotocol/subgraph@1.0.7) (2021-03-15) - -**Note:** Version bump only for package @astralprotocol/subgraph - - - - - -## [1.0.6](https://github.com/AstralProtocol/astralprotocol/compare/@astralprotocol/subgraph@1.0.5...@astralprotocol/subgraph@1.0.6) (2021-03-15) - -**Note:** Version bump only for package @astralprotocol/subgraph - - - - - -## [1.0.5](https://github.com/AstralProtocol/astralprotocol/compare/@astralprotocol/subgraph@1.0.4...@astralprotocol/subgraph@1.0.5) (2021-02-25) - -**Note:** Version bump only for package @astralprotocol/subgraph - - - - - -## [1.0.4](https://github.com/AstralProtocol/astralprotocol/compare/@astralprotocol/subgraph@1.0.3...@astralprotocol/subgraph@1.0.4) (2021-02-24) - -**Note:** Version bump only for package @astralprotocol/subgraph - - - - - -## [1.0.3](https://github.com/AstralProtocol/astralprotocol/compare/@astralprotocol/subgraph@1.0.2...@astralprotocol/subgraph@1.0.3) (2021-02-24) - -**Note:** Version bump only for package @astralprotocol/subgraph - - - - - -## [1.0.2](https://github.com/AstralProtocol/astralprotocol/compare/@astralprotocol/subgraph@1.0.1...@astralprotocol/subgraph@1.0.2) (2021-02-24) - -**Note:** Version bump only for package @astralprotocol/subgraph - - - - - -## [1.0.1](https://github.com/AstralProtocol/astralprotocol/compare/@astralprotocol/subgraph@0.1.5...@astralprotocol/subgraph@1.0.1) (2021-02-24) - -**Note:** Version bump only for package @astralprotocol/subgraph - - - - - -## [0.1.5](https://github.com/AstralProtocol/astralprotocol/compare/@astralprotocol/subgraph@0.1.4...@astralprotocol/subgraph@0.1.5) (2021-02-23) - -**Note:** Version bump only for package @astralprotocol/subgraph - - - - - -## [0.1.4](https://github.com/AstralProtocol/astralprotocol/compare/@astralprotocol/subgraph@0.1.3...@astralprotocol/subgraph@0.1.4) (2021-02-18) - -**Note:** Version bump only for package @astralprotocol/subgraph - - - - - -## [0.1.3](https://github.com/AstralProtocol/astralprotocol/compare/@astralprotocol/subgraph@0.1.1...@astralprotocol/subgraph@0.1.3) (2021-02-18) - -**Note:** Version bump only for package @astralprotocol/subgraph - - - - - -## [0.1.1](https://github.com/AstralProtocol/astralprotocol/compare/@astralprotocol/subgraph@0.0.3...@astralprotocol/subgraph@0.1.1) (2021-02-18) - -**Note:** Version bump only for package @astralprotocol/subgraph - - - - - -## [0.0.3](https://github.com/AstralProtocol/astralprotocol/compare/@astralprotocol/subgraph@0.0.2...@astralprotocol/subgraph@0.0.3) (2021-02-18) - -**Note:** Version bump only for package @astralprotocol/subgraph - - - - - -## [0.0.2](https://github.com/AstralProtocol/astralprotocol/compare/@astralprotocol/subgraph@0.0.1...@astralprotocol/subgraph@0.0.2) (2021-02-09) - -**Note:** Version bump only for package @astralprotocol/subgraph - - - - - -## 0.0.1 (2021-01-05) - -**Note:** Version bump only for package @astralprotocol/subgraph - - - - - -## [0.0.46](https://github.com/astralDAO/astralprotocol/compare/@astraldao/astral-protocol-subgraph@0.0.45...@astraldao/astral-protocol-subgraph@0.0.46) (2020-12-17) - -**Note:** Version bump only for package @astraldao/astral-protocol-subgraph - - - - - -## [0.0.45](https://github.com/astralDAO/astralprotocol/compare/@astraldao/astral-protocol-subgraph@0.0.44...@astraldao/astral-protocol-subgraph@0.0.45) (2020-12-01) - -**Note:** Version bump only for package @astraldao/astral-protocol-subgraph - - - - - -## [0.0.44](https://github.com/astralDAO/astralprotocol/compare/@astraldao/astral-protocol-subgraph@0.0.43...@astraldao/astral-protocol-subgraph@0.0.44) (2020-11-26) - -**Note:** Version bump only for package @astraldao/astral-protocol-subgraph - - - - - -## [0.0.43](https://github.com/astralDAO/astralprotocol/compare/@astraldao/astral-protocol-subgraph@0.0.42...@astraldao/astral-protocol-subgraph@0.0.43) (2020-11-26) - -**Note:** Version bump only for package @astraldao/astral-protocol-subgraph - - - - - -## [0.0.42](https://github.com/astralDAO/astralprotocol/compare/@astraldao/astral-protocol-subgraph@0.0.41...@astraldao/astral-protocol-subgraph@0.0.42) (2020-11-26) - -**Note:** Version bump only for package @astraldao/astral-protocol-subgraph - - - - - -## [0.0.41](https://github.com/astralDAO/astralprotocol/compare/@astraldao/astral-protocol-subgraph@0.0.40...@astraldao/astral-protocol-subgraph@0.0.41) (2020-11-24) - -**Note:** Version bump only for package @astraldao/astral-protocol-subgraph - - - - - -## [0.0.40](https://github.com/astralDAO/astralprotocol/compare/@astraldao/astral-protocol-subgraph@0.0.39...@astraldao/astral-protocol-subgraph@0.0.40) (2020-11-24) - -**Note:** Version bump only for package @astraldao/astral-protocol-subgraph - - - - - -## [0.0.39](https://github.com/astralDAO/astralprotocol/compare/@astraldao/astral-protocol-subgraph@0.0.38...@astraldao/astral-protocol-subgraph@0.0.39) (2020-11-24) - -**Note:** Version bump only for package @astraldao/astral-protocol-subgraph - - - - - -## [0.0.38](https://github.com/astralDAO/astralprotocol/compare/@astraldao/astral-protocol-subgraph@0.0.37...@astraldao/astral-protocol-subgraph@0.0.38) (2020-11-21) - -**Note:** Version bump only for package @astraldao/astral-protocol-subgraph - - - - - -## [0.0.37](https://github.com/astralDAO/astralprotocol/compare/@astraldao/astral-protocol-subgraph@0.0.36...@astraldao/astral-protocol-subgraph@0.0.37) (2020-11-21) - -**Note:** Version bump only for package @astraldao/astral-protocol-subgraph - - - - - -## [0.0.36](https://github.com/astralDAO/astralprotocol/compare/@astraldao/astral-protocol-subgraph@0.0.35...@astraldao/astral-protocol-subgraph@0.0.36) (2020-10-22) - -**Note:** Version bump only for package @astraldao/astral-protocol-subgraph - - - - - -## [0.0.35](https://github.com/astralDAO/astralprotocol/compare/@astraldao/astral-protocol-subgraph@0.0.34...@astraldao/astral-protocol-subgraph@0.0.35) (2020-10-22) - -**Note:** Version bump only for package @astraldao/astral-protocol-subgraph - - - - - -## [0.0.34](https://github.com/astralDAO/astralprotocol/compare/@astraldao/astral-protocol-subgraph@0.0.33...@astraldao/astral-protocol-subgraph@0.0.34) (2020-10-22) - -**Note:** Version bump only for package @astraldao/astral-protocol-subgraph - - - - - -## [0.0.33](https://github.com/astralDAO/astralprotocol/compare/@astraldao/astral-protocol-subgraph@0.0.32...@astraldao/astral-protocol-subgraph@0.0.33) (2020-10-22) - -**Note:** Version bump only for package @astraldao/astral-protocol-subgraph - - - - - -## [0.0.32](https://github.com/astralDAO/astralprotocol/compare/@astraldao/astral-protocol-subgraph@0.0.31...@astraldao/astral-protocol-subgraph@0.0.32) (2020-10-19) - -**Note:** Version bump only for package @astraldao/astral-protocol-subgraph - - - - - -## [0.0.31](https://github.com/astralDAO/astralprotocol/compare/@astraldao/astral-protocol-subgraph@0.0.30...@astraldao/astral-protocol-subgraph@0.0.31) (2020-10-19) - -**Note:** Version bump only for package @astraldao/astral-protocol-subgraph - - - - - -## [0.0.30](https://github.com/astralDAO/astralprotocol/compare/@astraldao/astral-protocol-subgraph@0.0.29...@astraldao/astral-protocol-subgraph@0.0.30) (2020-10-19) - -**Note:** Version bump only for package @astraldao/astral-protocol-subgraph - - - - - -## [0.0.29](https://github.com/astralDAO/astralprotocol/compare/@astraldao/astral-protocol-subgraph@0.0.28...@astraldao/astral-protocol-subgraph@0.0.29) (2020-10-19) - -**Note:** Version bump only for package @astraldao/astral-protocol-subgraph diff --git a/legacy/packages/subgraph/LICENSE-APACHE b/legacy/packages/subgraph/LICENSE-APACHE deleted file mode 100644 index 2ad0ad1..0000000 --- a/legacy/packages/subgraph/LICENSE-APACHE +++ /dev/null @@ -1,201 +0,0 @@ - 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 [2020] [astralDAO] - - 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/legacy/packages/subgraph/LICENSE-MIT b/legacy/packages/subgraph/LICENSE-MIT deleted file mode 100644 index 1874419..0000000 --- a/legacy/packages/subgraph/LICENSE-MIT +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) 2020 astralDAO - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/legacy/packages/subgraph/README.md b/legacy/packages/subgraph/README.md deleted file mode 100644 index 7430d8f..0000000 --- a/legacy/packages/subgraph/README.md +++ /dev/null @@ -1,61 +0,0 @@ -# @astralprotocol/subgraph - -## Description - -The @astralprotocol/subgraph serves as the indexing engine of the protocol, capturing the registration and modification events of GeoDIDs in the @astralprotocol/contracts. It acts like a decentralized querying database where it is substantially easier to make complex queries to the Spatial Assets registry. It is used to create the tree of GeoDID nodes that represents their relationships and groupings. - -The current version of the subgraph (v06) is indexing the Ethereum Roptsten network at the following graphql endpoints: - -- `https://api.thegraph.com/subgraphs/name/astralprotocol/spatialassetsv06` -- `wss://api.thegraph.com/subgraphs/name/astralprotocol/spatialassetsv06` - -You can connect to these with your GraphQL client of choice. - -## To add Astral Protocol Subgraph to your application - -``` -yarn add @astralprotocol/subgraph -``` - -## To develop or try the Astral Protocol Subgraph locally - -### Prerequisites - -- Clone the astralprotocol repository and go to packages/subgraph -- Run `sudo apt-get install libsecret-1-dev` -- [Docker Instalation](https://docs.docker.com/install/linux/docker-ce/debian/) -- Run `git clone https://github.com/graphprotocol/graph-node/` (check setup instructions for docker version on https://thegraph.com/docs/) -- Have the development steps of @astralprotocol/contracts done previously (with Ganache) - -### Deployment - -1. Ensure you have ganache running with the contracts deployed from packages/contracts -2. Update the SpatialAssets contract address that you got from the previous step in the subgraph.yaml (if needed and ensure the correct file is named according to the network of deployment - for ganache it should read as mainnet: backup the current subgraph.yamlfile and rename it to subgraphRopsten.yaml). -3. In another terminal, inside the graph-node folder, run `cd docker && docker-compose up`. If using Docker for WSL, Docker must be running on Windows. If graph-node throws an error try clearing the `data/postgres` folder, within the docker directory of graph-node, with `sudo rm -rf data/postgres`. Restart docker if needed and you are using WSL. -4. Generate subgraph typescript files with `yarn codegen`, then create and deploy the subgraph to the graph-node with `yarn create-local && yarn deploy-local` -5. You can query the subgraph and view the GeoDID tree in the local provided endpoint. - -### Testing - -The following query can be provided to the graphql endpoint to view the GeoDIDs tree (after doing the deployment steps above): - -``` -{ - geoDIDs { - id - owner - cid - storage - root - parent - edges { - id - childGeoDID { - id - } - } - active - type - } -} -``` diff --git a/legacy/packages/subgraph/abis/SpatialAssets.json b/legacy/packages/subgraph/abis/SpatialAssets.json deleted file mode 100644 index 6e325c2..0000000 --- a/legacy/packages/subgraph/abis/SpatialAssets.json +++ /dev/null @@ -1,30268 +0,0 @@ -{ - "contractName": "SpatialAssets", - "abi": [ - { - "inputs": [ - { - "internalType": "string", - "name": "uri", - "type": "string" - } - ], - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "geoDIDId", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "bytes32", - "name": "childrenGeoDIDId", - "type": "bytes32" - } - ], - "name": "ChildrenAdded", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "geoDIDId", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "bytes32", - "name": "childrenGeoDIDId", - "type": "bytes32" - } - ], - "name": "ChildrenErrorHasParent", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "geoDIDId", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "bytes32", - "name": "childrenGeoDIDId", - "type": "bytes32" - } - ], - "name": "ChildrenErrorNoExistence", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "geoDIDId", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "bytes32", - "name": "childrenGeoDIDId", - "type": "bytes32" - } - ], - "name": "ChildrenErrorNoParent", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "geoDIDId", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "bytes32", - "name": "childrenGeoDIDId", - "type": "bytes32" - } - ], - "name": "ChildrenRemoved", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "geoDIDId", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "bytes32", - "name": "parentGeoDIDId", - "type": "bytes32" - } - ], - "name": "ParentAdded", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "geoDIDId", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "bytes32", - "name": "parentGeoDIDId", - "type": "bytes32" - } - ], - "name": "ParentRemoved", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "bytes32", - "name": "previousAdminRole", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "bytes32", - "name": "newAdminRole", - "type": "bytes32" - } - ], - "name": "RoleAdminChanged", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "sender", - "type": "address" - } - ], - "name": "RoleGranted", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "sender", - "type": "address" - } - ], - "name": "RoleRevoked", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "geoDIDId", - "type": "bytes32" - } - ], - "name": "SpatialAssetDeactivated", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": true, - "internalType": "bytes32", - "name": "geoDIDId", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "bytes32", - "name": "cid", - "type": "bytes32" - }, - { - "indexed": false, - "internalType": "bytes32", - "name": "offChainStorage", - "type": "bytes32" - }, - { - "indexed": false, - "internalType": "bytes32", - "name": "root", - "type": "bytes32" - }, - { - "indexed": false, - "internalType": "bool", - "name": "canBeParent", - "type": "bool" - } - ], - "name": "SpatialAssetRegistered", - "type": "event" - }, - { - "inputs": [], - "name": "DATA_SUPPLIER", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function", - "constant": true - }, - { - "inputs": [], - "name": "DEFAULT_ADMIN_ROLE", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function", - "constant": true - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - } - ], - "name": "getRoleAdmin", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function", - "constant": true - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "uint256", - "name": "index", - "type": "uint256" - } - ], - "name": "getRoleMember", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function", - "constant": true - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - } - ], - "name": "getRoleMemberCount", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function", - "constant": true - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "grantRole", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "hasRole", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function", - "constant": true - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "renounceRole", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "revokeRole", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "registerRole", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "offChainStorage", - "type": "bytes32" - } - ], - "name": "enableStorage", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "offChainStorage", - "type": "bytes32" - } - ], - "name": "disableStorage", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "internalType": "bytes32", - "name": "geoDIDId", - "type": "bytes32" - }, - { - "internalType": "bytes32", - "name": "parentGeoDIDId", - "type": "bytes32" - }, - { - "internalType": "bytes32[]", - "name": "childrenGeoDIDIds", - "type": "bytes32[]" - }, - { - "internalType": "bytes32", - "name": "cid", - "type": "bytes32" - }, - { - "internalType": "bytes32", - "name": "offChainStorage", - "type": "bytes32" - }, - { - "internalType": "uint256", - "name": "geoDIDtype", - "type": "uint256" - } - ], - "name": "registerSpatialAsset", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "geoDIDId", - "type": "bytes32" - }, - { - "internalType": "bytes32[]", - "name": "childrenGeoDIDIds", - "type": "bytes32[]" - } - ], - "name": "addChildrenGeoDIDs", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "geoDIDId", - "type": "bytes32" - }, - { - "internalType": "bytes32", - "name": "parentGeoDIDId", - "type": "bytes32" - } - ], - "name": "addParentGeoDID", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "geoDIDId", - "type": "bytes32" - }, - { - "internalType": "bytes32[]", - "name": "childrenGeoDIDIds", - "type": "bytes32[]" - } - ], - "name": "removeChildrenGeoDIDs", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "geoDIDId", - "type": "bytes32" - }, - { - "internalType": "bytes32", - "name": "parentGeoDIDId", - "type": "bytes32" - } - ], - "name": "removeParentGeoDID", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "geoDIDId", - "type": "bytes32" - }, - { - "internalType": "bytes32[]", - "name": "childrenToRemove", - "type": "bytes32[]" - } - ], - "name": "deactivateSpatialAsset", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "id", - "type": "bytes32" - } - ], - "name": "idToOwner", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function", - "constant": true - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "id", - "type": "bytes32" - } - ], - "name": "idToCid", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function", - "constant": true - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "id", - "type": "bytes32" - } - ], - "name": "idToCanBeParent", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function", - "constant": true - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "id", - "type": "bytes32" - } - ], - "name": "idToHasParent", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function", - "constant": true - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "id", - "type": "bytes32" - } - ], - "name": "idToExternalStorage", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function", - "constant": true - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "offChainStorage", - "type": "bytes32" - } - ], - "name": "allowedStorages", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function", - "constant": true - }, - { - "inputs": [], - "name": "uri", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function", - "constant": true - } - ], - "metadata": "{\"compiler\":{\"version\":\"0.6.12+commit.27d51765\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"string\",\"name\":\"uri\",\"type\":\"string\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"geoDIDId\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"childrenGeoDIDId\",\"type\":\"bytes32\"}],\"name\":\"ChildrenAdded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"geoDIDId\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"childrenGeoDIDId\",\"type\":\"bytes32\"}],\"name\":\"ChildrenErrorHasParent\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"geoDIDId\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"childrenGeoDIDId\",\"type\":\"bytes32\"}],\"name\":\"ChildrenErrorNoExistence\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"geoDIDId\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"childrenGeoDIDId\",\"type\":\"bytes32\"}],\"name\":\"ChildrenErrorNoParent\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"geoDIDId\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"childrenGeoDIDId\",\"type\":\"bytes32\"}],\"name\":\"ChildrenRemoved\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"geoDIDId\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"parentGeoDIDId\",\"type\":\"bytes32\"}],\"name\":\"ParentAdded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"geoDIDId\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"parentGeoDIDId\",\"type\":\"bytes32\"}],\"name\":\"ParentRemoved\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"previousAdminRole\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"newAdminRole\",\"type\":\"bytes32\"}],\"name\":\"RoleAdminChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"RoleGranted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"RoleRevoked\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"geoDIDId\",\"type\":\"bytes32\"}],\"name\":\"SpatialAssetDeactivated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"geoDIDId\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"cid\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"offChainStorage\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"root\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"canBeParent\",\"type\":\"bool\"}],\"name\":\"SpatialAssetRegistered\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"DATA_SUPPLIER\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"DEFAULT_ADMIN_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"geoDIDId\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32[]\",\"name\":\"childrenGeoDIDIds\",\"type\":\"bytes32[]\"}],\"name\":\"addChildrenGeoDIDs\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"geoDIDId\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"parentGeoDIDId\",\"type\":\"bytes32\"}],\"name\":\"addParentGeoDID\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"offChainStorage\",\"type\":\"bytes32\"}],\"name\":\"allowedStorages\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"geoDIDId\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32[]\",\"name\":\"childrenToRemove\",\"type\":\"bytes32[]\"}],\"name\":\"deactivateSpatialAsset\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"offChainStorage\",\"type\":\"bytes32\"}],\"name\":\"disableStorage\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"offChainStorage\",\"type\":\"bytes32\"}],\"name\":\"enableStorage\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"}],\"name\":\"getRoleAdmin\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"index\",\"type\":\"uint256\"}],\"name\":\"getRoleMember\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"}],\"name\":\"getRoleMemberCount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"grantRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"hasRole\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"id\",\"type\":\"bytes32\"}],\"name\":\"idToCanBeParent\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"id\",\"type\":\"bytes32\"}],\"name\":\"idToCid\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"id\",\"type\":\"bytes32\"}],\"name\":\"idToExternalStorage\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"id\",\"type\":\"bytes32\"}],\"name\":\"idToHasParent\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"id\",\"type\":\"bytes32\"}],\"name\":\"idToOwner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"registerRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"bytes32\",\"name\":\"geoDIDId\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"parentGeoDIDId\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32[]\",\"name\":\"childrenGeoDIDIds\",\"type\":\"bytes32[]\"},{\"internalType\":\"bytes32\",\"name\":\"cid\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"offChainStorage\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"geoDIDtype\",\"type\":\"uint256\"}],\"name\":\"registerSpatialAsset\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"geoDIDId\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32[]\",\"name\":\"childrenGeoDIDIds\",\"type\":\"bytes32[]\"}],\"name\":\"removeChildrenGeoDIDs\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"geoDIDId\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"parentGeoDIDId\",\"type\":\"bytes32\"}],\"name\":\"removeParentGeoDID\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"renounceRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"revokeRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"uri\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"{SpatialAssets} registry This contract uses {AccessControl} to lock permissioned functions using the different roles - head to its documentation for details. The account that deploys the contract will be granted the 'DATA_SUPPLIER' as well as the default admin role, which will let it grant 'DATA_SUPPLIER' roles to other accounts\",\"events\":{\"ChildrenAdded(bytes32,bytes32)\":{\"details\":\"Emitted when a children geodid is added to a node\"},\"ChildrenErrorHasParent(bytes32,bytes32)\":{\"details\":\"Emitted when a children geodid already has a parent but shouldn't have\"},\"ChildrenErrorNoExistence(bytes32,bytes32)\":{\"details\":\"Emitted when a children geodid does not exist\"},\"ChildrenErrorNoParent(bytes32,bytes32)\":{\"details\":\"Emitted when a children geodid does not have a parent when trying to remove it from a parent\"},\"ChildrenRemoved(bytes32,bytes32)\":{\"details\":\"Emitted when a children geodid is removed from a node\"},\"ParentAdded(bytes32,bytes32)\":{\"details\":\"Emitted when a parent geodid is added to a node\"},\"ParentRemoved(bytes32,bytes32)\":{\"details\":\"Emitted when a parent geodid is removed from a node\"},\"SpatialAssetDeactivated(bytes32)\":{\"details\":\"Emitted when Spatial Assets of id `id` are deactivated.\"},\"SpatialAssetRegistered(address,bytes32,bytes32,bytes32,bytes32,bool)\":{\"details\":\"Emitted when Spatial Assets of id `id` are transferred to `to``.\"}},\"kind\":\"dev\",\"methods\":{\"addChildrenGeoDIDs(bytes32,bytes32[])\":{\"details\":\"Adds children GeoDIDs to an already existent geoDID Emits a {ChildrenAdded} event.\"},\"addParentGeoDID(bytes32,bytes32)\":{\"details\":\"Adds a parent GeoDID to an already existent geoDID Emits a {ParentAdded} event.\"},\"constructor\":{\"details\":\"Grants `DEFAULT_ADMIN_ROLE`, `DATA_SUPPLIER` to the account that deploys the contract.\"},\"deactivateSpatialAsset(bytes32,bytes32[])\":{\"details\":\"De-registers a spatial asset\"},\"disableStorage(bytes32)\":{\"details\":\"Disables an existing storage\"},\"enableStorage(bytes32)\":{\"details\":\"Registers a new storage that can accept GeoDID document creation\"},\"getRoleAdmin(bytes32)\":{\"details\":\"Returns the admin role that controls `role`. See {grantRole} and {revokeRole}. To change a role's admin, use {_setRoleAdmin}.\"},\"getRoleMember(bytes32,uint256)\":{\"details\":\"Returns one of the accounts that have `role`. `index` must be a value between 0 and {getRoleMemberCount}, non-inclusive. Role bearers are not sorted in any particular way, and their ordering may change at any point. WARNING: When using {getRoleMember} and {getRoleMemberCount}, make sure you perform all queries on the same block. See the following https://forum.openzeppelin.com/t/iterating-over-elements-on-enumerableset-in-openzeppelin-contracts/2296[forum post] for more information.\"},\"getRoleMemberCount(bytes32)\":{\"details\":\"Returns the number of accounts that have `role`. Can be used together with {getRoleMember} to enumerate all bearers of a role.\"},\"grantRole(bytes32,address)\":{\"details\":\"Grants `role` to `account`. If `account` had not been already granted `role`, emits a {RoleGranted} event. Requirements: - the caller must have ``role``'s admin role.\"},\"hasRole(bytes32,address)\":{\"details\":\"Returns `true` if `account` has been granted `role`.\"},\"registerRole()\":{\"details\":\"Registers a new user with the ability to register a spatial asset.\"},\"registerSpatialAsset(address,bytes32,bytes32,bytes32[],bytes32,bytes32,uint256)\":{\"details\":\"Registers one spatial asset with external storage 'data' and assigns them to `account`. Emits a {SpatialAssetRegistered} event.\"},\"removeChildrenGeoDIDs(bytes32,bytes32[])\":{\"details\":\"Removes childrenGeoDIDs from a geoDID Emits a {ChildrenRemoved} event.\"},\"removeParentGeoDID(bytes32,bytes32)\":{\"details\":\"Removes a parent GeoDID from an already existent geoDID Emits a {ParentAdded} event.\"},\"renounceRole(bytes32,address)\":{\"details\":\"Revokes `role` from the calling account. Roles are often managed via {grantRole} and {revokeRole}: this function's purpose is to provide a mechanism for accounts to lose their privileges if they are compromised (such as when a trusted device is misplaced). If the calling account had been granted `role`, emits a {RoleRevoked} event. Requirements: - the caller must be `account`.\"},\"revokeRole(bytes32,address)\":{\"details\":\"Revokes `role` from `account`. If `account` had been granted `role`, emits a {RoleRevoked} event. Requirements: - the caller must have ``role``'s admin role.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"/Users/jaredchilders/Astral/astralprotocol/packages/contracts/contracts/SpatialAssets.sol\":\"SpatialAssets\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"/Users/jaredchilders/Astral/astralprotocol/packages/contracts/contracts/SpatialAssets.sol\":{\"keccak256\":\"0xb63dbe4b63cf8b764fe8ce1609b0cf075366715e162a239f5fa897e68345648d\",\"license\":\"APACHE OR MIT\",\"urls\":[\"bzz-raw://17c1309fec71b328034ec5e37b1732f13e7c46ddb52f7a1561e39063eaed0a43\",\"dweb:/ipfs/QmPGJEKrVy3x8DtJtB9Z86rAFArjsmU5wovA2qvjuLY986\"]},\"@openzeppelin/contracts/GSN/Context.sol\":{\"keccak256\":\"0x9486045e189facd2e868ece35249872598ef03f1087fb6fa4d1161842daa2287\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://77c3a04ef8453788b14b1ebbc24dd3f0a18ceb2615cd156aac949a611e552af8\",\"dweb:/ipfs/QmcmqWGguRM3iLuF57tcyrN3F6EA63kzeNkDfQuteBnurr\"]},\"@openzeppelin/contracts/access/AccessControl.sol\":{\"keccak256\":\"0x4fc155a2f7837603d69a13cfa481eb5e7f5e02cb77e2ec9edbac30986db37988\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://0855147e38b5e36288a8df73b8da49132f14ec7abb19041b0c98872263643aaa\",\"dweb:/ipfs/QmSrSysyFUYQq7hbJaJXG7EyZW6ezDBzEJx3SABp6eiJSS\"]},\"@openzeppelin/contracts/utils/Address.sol\":{\"keccak256\":\"0x28911e614500ae7c607a432a709d35da25f3bc5ddc8bd12b278b66358070c0ea\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://256c8c8af5eb072bc473226ab2b2187149b8fc04f5f4a4820db22527f5ce8e3c\",\"dweb:/ipfs/QmRvi5BhnL7Rxf85KrJhwM6RRhukm4tzoctRdgQEheNyiN\"]},\"@openzeppelin/contracts/utils/Context.sol\":{\"keccak256\":\"0x8d3cb350f04ff49cfb10aef08d87f19dcbaecc8027b0bed12f3275cd12f38cf0\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://ded47ec7c96750f9bd04bbbc84f659992d4ba901cb7b532a52cd468272cf378f\",\"dweb:/ipfs/QmfBrGtQP7rZEqEg6Wz6jh2N2Kukpj1z5v3CGWmAqrzm96\"]},\"@openzeppelin/contracts/utils/EnumerableSet.sol\":{\"keccak256\":\"0x1562cd9922fbf739edfb979f506809e2743789cbde3177515542161c3d04b164\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://4580d57781513d98870d9738c7d39094336e0a70cdb90d68dad549c6ced466ec\",\"dweb:/ipfs/Qmf9YZzzRFuvMnav9dgmeRUpdYMMECiZX8w25sHWVbA18V\"]}},\"version\":1}", - "bytecode": "0x60806040523480156200001157600080fd5b506040516200236138038062002361833981810160405260208110156200003757600080fd5b81019080805160405193929190846401000000008211156200005857600080fd5b9083019060208201858111156200006e57600080fd5b82516401000000008111828201881017156200008957600080fd5b82525081516020918201929091019080838360005b83811015620000b85781810151838201526020016200009e565b50505050905090810190601f168015620000e65780820380516001836020036101000a031916815260200191505b50604052505050620000fe816200014a60201b60201c565b6200011460006200010e62000163565b62000167565b620001437fb90ec3213bc54b34738ca7ad785b7e6275742931f3ddfa147171c27090643f3f6200010e62000163565b5062000309565b80516200015f9060019060208401906200026d565b5050565b3390565b6200015f8282600082815260208181526040909120620001929183906200199b620001e6821b17901c565b156200015f57620001a262000163565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b6000620001fd836001600160a01b03841662000206565b90505b92915050565b600062000214838362000255565b6200024c5750815460018181018455600084815260208082209093018490558454848252828601909352604090209190915562000200565b50600062000200565b60009081526001919091016020526040902054151590565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f10620002b057805160ff1916838001178555620002e0565b82800160010185558215620002e0579182015b82811115620002e0578251825591602001919060010190620002c3565b50620002ee929150620002f2565b5090565b5b80821115620002ee5760008155600101620002f3565b61204880620003196000396000f3fe608060405234801561001057600080fd5b50600436106101735760003560e01c806391d14854116100de578063c44e96a011610097578063d547741f11610071578063d547741f14610663578063eac989f81461068f578063f999be891461070c578063fd52c0d51461072f57610173565b8063c44e96a014610621578063c66f70cc14610629578063ca15c8731461064657610173565b806391d14854146103cd5780639969879b146103f9578063a217fddf14610401578063a8f904b514610409578063b22de880146104b1578063bdabcf631461057957610173565b806336568abe1161013057806336568abe146103045780636e7a6f4b146103305780637c1c6c271461034d57806384f42912146103705780638d0a9bff1461038d5780639010d07c146103aa57610173565b8063092e9f25146101785780630bfa194d146101a95780630e437b1c146101c65780631dc2a7b014610270578063248a9ca3146102a95780632f2ff15d146102d8575b600080fd5b6101956004803603602081101561018e57600080fd5b503561074c565b604080519115158252519081900360200190f35b610195600480360360208110156101bf57600080fd5b5035610761565b61026e600480360360408110156101dc57600080fd5b81359190810190604081016020820135600160201b8111156101fd57600080fd5b82018360208201111561020f57600080fd5b803590602001918460208302840111600160201b8311171561023057600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250929550610776945050505050565b005b61028d6004803603602081101561028657600080fd5b50356109b1565b604080516001600160a01b039092168252519081900360200190f35b6102c6600480360360208110156102bf57600080fd5b50356109cc565b60408051918252519081900360200190f35b61026e600480360360408110156102ee57600080fd5b50803590602001356001600160a01b03166109e1565b61026e6004803603604081101561031a57600080fd5b50803590602001356001600160a01b0316610a4d565b61026e6004803603602081101561034657600080fd5b5035610aae565b61026e6004803603604081101561036357600080fd5b5080359060200135610b5f565b6102c66004803603602081101561038657600080fd5b5035610d05565b610195600480360360208110156103a357600080fd5b5035610d17565b61028d600480360360408110156103c057600080fd5b5080359060200135610d2c565b610195600480360360408110156103e357600080fd5b50803590602001356001600160a01b0316610d4d565b6102c6610d65565b6102c6610d77565b61026e6004803603604081101561041f57600080fd5b81359190810190604081016020820135600160201b81111561044057600080fd5b82018360208201111561045257600080fd5b803590602001918460208302840111600160201b8311171561047357600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250929550610d7c945050505050565b61026e600480360360e08110156104c757600080fd5b6001600160a01b038235169160208101359160408201359190810190608081016060820135600160201b8111156104fd57600080fd5b82018360208201111561050f57600080fd5b803590602001918460208302840111600160201b8311171561053057600080fd5b9190808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152509295505082359350505060208101359060400135610f97565b61026e6004803603604081101561058f57600080fd5b81359190810190604081016020820135600160201b8111156105b057600080fd5b8201836020820111156105c257600080fd5b803590602001918460208302840111600160201b831117156105e357600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250929550611342945050505050565b61026e6115ae565b6102c66004803603602081101561063f57600080fd5b5035611625565b6102c66004803603602081101561065c57600080fd5b5035611637565b61026e6004803603604081101561067957600080fd5b50803590602001356001600160a01b031661164e565b6106976116a7565b6040805160208082528351818301528351919283929083019185019080838360005b838110156106d15781810151838201526020016106b9565b50505050905090810190601f1680156106fe5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b61026e6004803603604081101561072257600080fd5b508035906020013561173c565b61026e6004803603602081101561074557600080fd5b503561193b565b60009081526004602052604090205460ff1690565b60009081526005602052604090205460ff1690565b61077e6119b0565b6000838152600260205260409020546001600160a01b039081169116146107d65760405162461bcd60e51b8152600401808060200182810382526037815260200180611ef56037913960400191505060405180910390fd5b600082815260026020908152604080832080546001600160a01b0319169055600782528083208390556003825280832083905560048252808320805460ff191690556006909152812055805180156109815760005b8181101561097f57600083828151811061084157fe5b602090810291909101810151600081815260029092526040909120549091506001600160a01b031615801590610885575060008181526004602052604090205460ff165b156108dc576000818152600460209081526040808320805460ff19169055600690915280822083905551829187917f64cd8d5daa1351ab7ef481cd86ebc8d199e153d85b6442711dbaa6ee68989eee9190a3610976565b6000818152600260205260409020546001600160a01b031615801590610911575060008181526004602052604090205460ff16155b1561094857604051819086907f69081739e741291d0f0ca163bc158eaa3775c02069512953c69e7ae7e7a1970c90600090a3610976565b604051819086907f9fd08a31a95521d410b6d20008384ec9a65bff57159bb95ad8ba86c03fda046690600090a35b5060010161082b565b505b60405183907ff02d29e4850d2beddb5886160b76b29bd18836de50f35dde5b1ce3e11ec43bb890600090a2505050565b6000908152600260205260409020546001600160a01b031690565b60009081526020819052604090206002015490565b600082815260208190526040902060020154610a04906109ff6119b0565b610d4d565b610a3f5760405162461bcd60e51b815260040180806020018281038252602f815260200180611ca0602f913960400191505060405180910390fd5b610a4982826119b4565b5050565b610a556119b0565b6001600160a01b0316816001600160a01b031614610aa45760405162461bcd60e51b815260040180806020018281038252602f815260200180611fe4602f913960400191505060405180910390fd5b610a498282611a1d565b610abb60006109ff6119b0565b610af65760405162461bcd60e51b8152600401808060200182810382526045815260200180611d036045913960600191505060405180910390fd5b60008181526008602052604090205460ff1615610b445760405162461bcd60e51b815260040180806020018281038252602d815260200180611ec8602d913960400191505060405180910390fd5b6000908152600860205260409020805460ff19166001179055565b610b79600080516020611fc48339815191526109ff6119b0565b610bb45760405162461bcd60e51b8152600401808060200182810382526037815260200180611f586037913960400191505060405180910390fd5b610bbc6119b0565b6000838152600260205260409020546001600160a01b03908116911614610c145760405162461bcd60e51b815260040180806020018281038252602c815260200180611f2c602c913960400191505060405180910390fd5b6000818152600260205260409020546001600160a01b0316610c675760405162461bcd60e51b815260040180806020018281038252603c815260200180611e8c603c913960400191505060405180910390fd5b60008281526004602052604090205460ff16610cb45760405162461bcd60e51b8152600401808060200182810382526036815260200180611d486036913960400191505060405180910390fd5b6000828152600460209081526040808320805460ff19169055600690915280822084905551829184917f09ba4d5138fa8cb519e6a82fc3d9fe09a800f44f4b25ecea405424f82ffcaca99190a35050565b60009081526007602052604090205490565b60009081526008602052604090205460ff1690565b6000828152602081905260408120610d449083611a86565b90505b92915050565b6000828152602081905260408120610d449083611a92565b600080516020611fc483398151915281565b600081565b610d96600080516020611fc48339815191526109ff6119b0565b610dd15760405162461bcd60e51b8152600401808060200182810382526037815260200180611f586037913960400191505060405180910390fd5b610dd96119b0565b6000838152600260205260409020546001600160a01b03908116911614610e315760405162461bcd60e51b815260040180806020018281038252602c815260200180611f2c602c913960400191505060405180910390fd5b80518015610f925760005b81811015610f90576000838281518110610e5257fe5b602090810291909101810151600081815260029092526040909120549091506001600160a01b031615801590610e96575060008181526004602052604090205460ff165b15610eed576000818152600460209081526040808320805460ff19169055600690915280822083905551829187917f64cd8d5daa1351ab7ef481cd86ebc8d199e153d85b6442711dbaa6ee68989eee9190a3610f87565b6000818152600260205260409020546001600160a01b031615801590610f22575060008181526004602052604090205460ff16155b15610f5957604051819086907f69081739e741291d0f0ca163bc158eaa3775c02069512953c69e7ae7e7a1970c90600090a3610f87565b604051819086907f9fd08a31a95521d410b6d20008384ec9a65bff57159bb95ad8ba86c03fda046690600090a35b50600101610e3c565b505b505050565b610fb1600080516020611fc48339815191526109ff6119b0565b610fec5760405162461bcd60e51b8152600401808060200182810382526037815260200180611f586037913960400191505060405180910390fd5b610ff582610d17565b6110305760405162461bcd60e51b8152600401808060200182810382526026815260200180611c7a6026913960400191505060405180910390fd5b6000868152600260205260409020546001600160a01b0316156110845760405162461bcd60e51b815260040180806020018281038252602c815260200180611f2c602c913960400191505060405180910390fd5b8015806110915750806001145b6110e2576040805162461bcd60e51b815260206004820181905260248201527f5370617469616c204173736574733a2077726f6e672067656f64696474797065604482015290519081900360640190fd5b60008681526003602090815260408083208690556002825280832080546001600160a01b0319166001600160a01b038c161790556007909152902082905580611143576000868152600560205260409020805460ff19166001179055611163565b8060011415611163576000868152600560205260409020805460ff191690555b846111e9576000868152600460209081526040808320805460ff1916905560068252808320899055600582529182902054825185815291820189905260ff161515818301529051849188916001600160a01b038b16917f63b20be522ec742d63054a358a08806c3d3645cddc76f3ffcd2e5a66697a47a2919081900360600190a461129e565b6000868152600460209081526040808320805460ff19166001179055878352600682528083205489845260058352928190205481518681529283019390935260ff929092161515818301529051849188916001600160a01b038b16917f63b20be522ec742d63054a358a08806c3d3645cddc76f3ffcd2e5a66697a47a2919081900360600190a4604051859087907fe4dc822b14b51bcb0daee9b2a47ad5cfe785b97988c9ba9fb18a008fa74d8d0690600090a35b835180158015906112bd575060008781526005602052604090205460ff165b156113385760005b818110156113365760008682815181106112db57fe5b602090810291909101810151600081815260049092526040808320805460ff191660011790555190925082918b917fc5188e1ad025cd9b14f9b77496a121bb77c2aca1c221401a1e92288a93ad143d9190a3506001016112c5565b505b5050505050505050565b61135c600080516020611fc48339815191526109ff6119b0565b6113975760405162461bcd60e51b8152600401808060200182810382526037815260200180611f586037913960400191505060405180910390fd5b61139f6119b0565b6000838152600260205260409020546001600160a01b039081169116146113f75760405162461bcd60e51b8152600401808060200182810382526034815260200180611ccf6034913960400191505060405180910390fd5b60008281526005602052604090205460ff166114445760405162461bcd60e51b8152600401808060200182810382526040815260200180611dc46040913960400191505060405180910390fd5b80518015610f925760005b81811015610f9057600083828151811061146557fe5b602090810291909101810151600081815260029092526040909120549091506001600160a01b0316158015906114aa575060008181526004602052604090205460ff16155b1561150c576000818152600460209081526040808320805460ff191660011790558783526006909152808220548383528183205551829187917fc5188e1ad025cd9b14f9b77496a121bb77c2aca1c221401a1e92288a93ad143d9190a36115a5565b6000818152600260205260409020546001600160a01b031615801590611540575060008181526004602052604090205460ff165b1561157757604051819086907fc2fbe5202fa3aef19d26284e739c3305170f8c2e9acf77122fc10277a492ac6b90600090a36115a5565b604051819086907f9fd08a31a95521d410b6d20008384ec9a65bff57159bb95ad8ba86c03fda046690600090a35b5060010161144f565b6115c8600080516020611fc48339815191526109ff6119b0565b156116045760405162461bcd60e51b8152600401808060200182810382526035815260200180611f8f6035913960400191505060405180910390fd5b611623600080516020611fc483398151915261161e6119b0565b610a3f565b565b60009081526003602052604090205490565b6000818152602081905260408120610d4790611aa7565b60008281526020819052604090206002015461166c906109ff6119b0565b610aa45760405162461bcd60e51b8152600401808060200182810382526030815260200180611e5c6030913960400191505060405180910390fd5b60018054604080516020601f600260001961010087891615020190951694909404938401819004810282018101909252828152606093909290918301828280156117325780601f1061170757610100808354040283529160200191611732565b820191906000526020600020905b81548152906001019060200180831161171557829003601f168201915b5050505050905090565b611756600080516020611fc48339815191526109ff6119b0565b6117915760405162461bcd60e51b8152600401808060200182810382526037815260200180611f586037913960400191505060405180910390fd5b6117996119b0565b6000838152600260205260409020546001600160a01b039081169116146117f15760405162461bcd60e51b8152600401808060200182810382526034815260200180611ccf6034913960400191505060405180910390fd5b6000818152600260205260409020546001600160a01b03166118445760405162461bcd60e51b815260040180806020018281038252602c815260200180611e30602c913960400191505060405180910390fd5b60008281526004602052604090205460ff16156118925760405162461bcd60e51b815260040180806020018281038252602c815260200180611e04602c913960400191505060405180910390fd5b60008181526005602052604090205460ff166118df5760405162461bcd60e51b8152600401808060200182810382526046815260200180611d7e6046913960600191505060405180910390fd5b6000828152600460209081526040808320805460ff191660011790558383526006909152808220548483528183205551829184917fe4dc822b14b51bcb0daee9b2a47ad5cfe785b97988c9ba9fb18a008fa74d8d069190a35050565b61194860006109ff6119b0565b6119835760405162461bcd60e51b8152600401808060200182810382526045815260200180611d036045913960600191505060405180910390fd5b6000908152600860205260409020805460ff19169055565b6000610d44836001600160a01b038416611ab2565b3390565b60008281526020819052604090206119cc908261199b565b15610a49576119d96119b0565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b6000828152602081905260409020611a359082611afc565b15610a4957611a426119b0565b6001600160a01b0316816001600160a01b0316837ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b60405160405180910390a45050565b6000610d448383611b11565b6000610d44836001600160a01b038416611b75565b6000610d4782611b8d565b6000611abe8383611b75565b611af457508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155610d47565b506000610d47565b6000610d44836001600160a01b038416611b91565b81546000908210611b535760405162461bcd60e51b8152600401808060200182810382526022815260200180611c586022913960400191505060405180910390fd5b826000018281548110611b6257fe5b9060005260206000200154905092915050565b60009081526001919091016020526040902054151590565b5490565b60008181526001830160205260408120548015611c4d5783546000198083019190810190600090879083908110611bc457fe5b9060005260206000200154905080876000018481548110611be157fe5b600091825260208083209091019290925582815260018981019092526040902090840190558654879080611c1157fe5b60019003818190600052602060002001600090559055866001016000878152602001908152602001600020600090556001945050505050610d47565b6000915050610d4756fe456e756d657261626c655365743a20696e646578206f7574206f6620626f756e64735370617469616c4173736574733a2073746f72616765206d75737420626520616c6c6f776564416363657373436f6e74726f6c3a2073656e646572206d75737420626520616e2061646d696e20746f206772616e745370617469616c4173736574733a2067656f4449444964206d757374206265206f776e6564206279206974732063726561746f725370617469616c4173736574733a206d75737420686176652061646d696e20726f6c6520746f206564697420616c6c6f776564206f6666636861696e2073746f72616765735370617469616c4173736574733a2047656f44494420646f6573206e6f742068617665206120706172656e7420746f2072656d6f76655370617469616c4173736574733a20706172656e7447656f4449444964206d7573742062652061626c6520746f20626520706172656e7420286120436f6c6c656374696f6e295370617469616c4173736574733a2067656f4449444964206d7573742062652061626c6520746f20626520706172656e7420286120436f6c6c656374696f6e295370617469616c4173736574733a2067656f444944496420616c726561647920686173206120706172656e745370617469616c4173736574733a20706172656e7447656f444944496420646f6573206e6f74206578697374416363657373436f6e74726f6c3a2073656e646572206d75737420626520616e2061646d696e20746f207265766f6b655370617469616c4173736574733a2047656f44494420746f2062652072656d6f76656420617320706172656e7420646f6573206e6f742065786973745370617469616c4173736574733a2073746f72616765206d757374206e6f7420626520616374697665207965745370617469616c4173736574733a2063616c6c6572206973206e6f74206f776e6572206f6620746865205370617469616c2041737365745370617469616c4173736574733a206964206d757374206e6f74206861766520616e206f776e6572207965745370617469616c4173736574733a206d7573742068617665206461746120737570706c69657220726f6c6520746f2072656769737465725370617469616c4173736574733a206d757374206e6f742068617665206120444154415f535550504c49455220726f6c6520796574b90ec3213bc54b34738ca7ad785b7e6275742931f3ddfa147171c27090643f3f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636520726f6c657320666f722073656c66a26469706673582212200603174d84b92a254e194b236a6220fcb94109027f9b708b8705b69fcb21d1bd64736f6c634300060c0033", - "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106101735760003560e01c806391d14854116100de578063c44e96a011610097578063d547741f11610071578063d547741f14610663578063eac989f81461068f578063f999be891461070c578063fd52c0d51461072f57610173565b8063c44e96a014610621578063c66f70cc14610629578063ca15c8731461064657610173565b806391d14854146103cd5780639969879b146103f9578063a217fddf14610401578063a8f904b514610409578063b22de880146104b1578063bdabcf631461057957610173565b806336568abe1161013057806336568abe146103045780636e7a6f4b146103305780637c1c6c271461034d57806384f42912146103705780638d0a9bff1461038d5780639010d07c146103aa57610173565b8063092e9f25146101785780630bfa194d146101a95780630e437b1c146101c65780631dc2a7b014610270578063248a9ca3146102a95780632f2ff15d146102d8575b600080fd5b6101956004803603602081101561018e57600080fd5b503561074c565b604080519115158252519081900360200190f35b610195600480360360208110156101bf57600080fd5b5035610761565b61026e600480360360408110156101dc57600080fd5b81359190810190604081016020820135600160201b8111156101fd57600080fd5b82018360208201111561020f57600080fd5b803590602001918460208302840111600160201b8311171561023057600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250929550610776945050505050565b005b61028d6004803603602081101561028657600080fd5b50356109b1565b604080516001600160a01b039092168252519081900360200190f35b6102c6600480360360208110156102bf57600080fd5b50356109cc565b60408051918252519081900360200190f35b61026e600480360360408110156102ee57600080fd5b50803590602001356001600160a01b03166109e1565b61026e6004803603604081101561031a57600080fd5b50803590602001356001600160a01b0316610a4d565b61026e6004803603602081101561034657600080fd5b5035610aae565b61026e6004803603604081101561036357600080fd5b5080359060200135610b5f565b6102c66004803603602081101561038657600080fd5b5035610d05565b610195600480360360208110156103a357600080fd5b5035610d17565b61028d600480360360408110156103c057600080fd5b5080359060200135610d2c565b610195600480360360408110156103e357600080fd5b50803590602001356001600160a01b0316610d4d565b6102c6610d65565b6102c6610d77565b61026e6004803603604081101561041f57600080fd5b81359190810190604081016020820135600160201b81111561044057600080fd5b82018360208201111561045257600080fd5b803590602001918460208302840111600160201b8311171561047357600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250929550610d7c945050505050565b61026e600480360360e08110156104c757600080fd5b6001600160a01b038235169160208101359160408201359190810190608081016060820135600160201b8111156104fd57600080fd5b82018360208201111561050f57600080fd5b803590602001918460208302840111600160201b8311171561053057600080fd5b9190808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152509295505082359350505060208101359060400135610f97565b61026e6004803603604081101561058f57600080fd5b81359190810190604081016020820135600160201b8111156105b057600080fd5b8201836020820111156105c257600080fd5b803590602001918460208302840111600160201b831117156105e357600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250929550611342945050505050565b61026e6115ae565b6102c66004803603602081101561063f57600080fd5b5035611625565b6102c66004803603602081101561065c57600080fd5b5035611637565b61026e6004803603604081101561067957600080fd5b50803590602001356001600160a01b031661164e565b6106976116a7565b6040805160208082528351818301528351919283929083019185019080838360005b838110156106d15781810151838201526020016106b9565b50505050905090810190601f1680156106fe5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b61026e6004803603604081101561072257600080fd5b508035906020013561173c565b61026e6004803603602081101561074557600080fd5b503561193b565b60009081526004602052604090205460ff1690565b60009081526005602052604090205460ff1690565b61077e6119b0565b6000838152600260205260409020546001600160a01b039081169116146107d65760405162461bcd60e51b8152600401808060200182810382526037815260200180611ef56037913960400191505060405180910390fd5b600082815260026020908152604080832080546001600160a01b0319169055600782528083208390556003825280832083905560048252808320805460ff191690556006909152812055805180156109815760005b8181101561097f57600083828151811061084157fe5b602090810291909101810151600081815260029092526040909120549091506001600160a01b031615801590610885575060008181526004602052604090205460ff165b156108dc576000818152600460209081526040808320805460ff19169055600690915280822083905551829187917f64cd8d5daa1351ab7ef481cd86ebc8d199e153d85b6442711dbaa6ee68989eee9190a3610976565b6000818152600260205260409020546001600160a01b031615801590610911575060008181526004602052604090205460ff16155b1561094857604051819086907f69081739e741291d0f0ca163bc158eaa3775c02069512953c69e7ae7e7a1970c90600090a3610976565b604051819086907f9fd08a31a95521d410b6d20008384ec9a65bff57159bb95ad8ba86c03fda046690600090a35b5060010161082b565b505b60405183907ff02d29e4850d2beddb5886160b76b29bd18836de50f35dde5b1ce3e11ec43bb890600090a2505050565b6000908152600260205260409020546001600160a01b031690565b60009081526020819052604090206002015490565b600082815260208190526040902060020154610a04906109ff6119b0565b610d4d565b610a3f5760405162461bcd60e51b815260040180806020018281038252602f815260200180611ca0602f913960400191505060405180910390fd5b610a4982826119b4565b5050565b610a556119b0565b6001600160a01b0316816001600160a01b031614610aa45760405162461bcd60e51b815260040180806020018281038252602f815260200180611fe4602f913960400191505060405180910390fd5b610a498282611a1d565b610abb60006109ff6119b0565b610af65760405162461bcd60e51b8152600401808060200182810382526045815260200180611d036045913960600191505060405180910390fd5b60008181526008602052604090205460ff1615610b445760405162461bcd60e51b815260040180806020018281038252602d815260200180611ec8602d913960400191505060405180910390fd5b6000908152600860205260409020805460ff19166001179055565b610b79600080516020611fc48339815191526109ff6119b0565b610bb45760405162461bcd60e51b8152600401808060200182810382526037815260200180611f586037913960400191505060405180910390fd5b610bbc6119b0565b6000838152600260205260409020546001600160a01b03908116911614610c145760405162461bcd60e51b815260040180806020018281038252602c815260200180611f2c602c913960400191505060405180910390fd5b6000818152600260205260409020546001600160a01b0316610c675760405162461bcd60e51b815260040180806020018281038252603c815260200180611e8c603c913960400191505060405180910390fd5b60008281526004602052604090205460ff16610cb45760405162461bcd60e51b8152600401808060200182810382526036815260200180611d486036913960400191505060405180910390fd5b6000828152600460209081526040808320805460ff19169055600690915280822084905551829184917f09ba4d5138fa8cb519e6a82fc3d9fe09a800f44f4b25ecea405424f82ffcaca99190a35050565b60009081526007602052604090205490565b60009081526008602052604090205460ff1690565b6000828152602081905260408120610d449083611a86565b90505b92915050565b6000828152602081905260408120610d449083611a92565b600080516020611fc483398151915281565b600081565b610d96600080516020611fc48339815191526109ff6119b0565b610dd15760405162461bcd60e51b8152600401808060200182810382526037815260200180611f586037913960400191505060405180910390fd5b610dd96119b0565b6000838152600260205260409020546001600160a01b03908116911614610e315760405162461bcd60e51b815260040180806020018281038252602c815260200180611f2c602c913960400191505060405180910390fd5b80518015610f925760005b81811015610f90576000838281518110610e5257fe5b602090810291909101810151600081815260029092526040909120549091506001600160a01b031615801590610e96575060008181526004602052604090205460ff165b15610eed576000818152600460209081526040808320805460ff19169055600690915280822083905551829187917f64cd8d5daa1351ab7ef481cd86ebc8d199e153d85b6442711dbaa6ee68989eee9190a3610f87565b6000818152600260205260409020546001600160a01b031615801590610f22575060008181526004602052604090205460ff16155b15610f5957604051819086907f69081739e741291d0f0ca163bc158eaa3775c02069512953c69e7ae7e7a1970c90600090a3610f87565b604051819086907f9fd08a31a95521d410b6d20008384ec9a65bff57159bb95ad8ba86c03fda046690600090a35b50600101610e3c565b505b505050565b610fb1600080516020611fc48339815191526109ff6119b0565b610fec5760405162461bcd60e51b8152600401808060200182810382526037815260200180611f586037913960400191505060405180910390fd5b610ff582610d17565b6110305760405162461bcd60e51b8152600401808060200182810382526026815260200180611c7a6026913960400191505060405180910390fd5b6000868152600260205260409020546001600160a01b0316156110845760405162461bcd60e51b815260040180806020018281038252602c815260200180611f2c602c913960400191505060405180910390fd5b8015806110915750806001145b6110e2576040805162461bcd60e51b815260206004820181905260248201527f5370617469616c204173736574733a2077726f6e672067656f64696474797065604482015290519081900360640190fd5b60008681526003602090815260408083208690556002825280832080546001600160a01b0319166001600160a01b038c161790556007909152902082905580611143576000868152600560205260409020805460ff19166001179055611163565b8060011415611163576000868152600560205260409020805460ff191690555b846111e9576000868152600460209081526040808320805460ff1916905560068252808320899055600582529182902054825185815291820189905260ff161515818301529051849188916001600160a01b038b16917f63b20be522ec742d63054a358a08806c3d3645cddc76f3ffcd2e5a66697a47a2919081900360600190a461129e565b6000868152600460209081526040808320805460ff19166001179055878352600682528083205489845260058352928190205481518681529283019390935260ff929092161515818301529051849188916001600160a01b038b16917f63b20be522ec742d63054a358a08806c3d3645cddc76f3ffcd2e5a66697a47a2919081900360600190a4604051859087907fe4dc822b14b51bcb0daee9b2a47ad5cfe785b97988c9ba9fb18a008fa74d8d0690600090a35b835180158015906112bd575060008781526005602052604090205460ff165b156113385760005b818110156113365760008682815181106112db57fe5b602090810291909101810151600081815260049092526040808320805460ff191660011790555190925082918b917fc5188e1ad025cd9b14f9b77496a121bb77c2aca1c221401a1e92288a93ad143d9190a3506001016112c5565b505b5050505050505050565b61135c600080516020611fc48339815191526109ff6119b0565b6113975760405162461bcd60e51b8152600401808060200182810382526037815260200180611f586037913960400191505060405180910390fd5b61139f6119b0565b6000838152600260205260409020546001600160a01b039081169116146113f75760405162461bcd60e51b8152600401808060200182810382526034815260200180611ccf6034913960400191505060405180910390fd5b60008281526005602052604090205460ff166114445760405162461bcd60e51b8152600401808060200182810382526040815260200180611dc46040913960400191505060405180910390fd5b80518015610f925760005b81811015610f9057600083828151811061146557fe5b602090810291909101810151600081815260029092526040909120549091506001600160a01b0316158015906114aa575060008181526004602052604090205460ff16155b1561150c576000818152600460209081526040808320805460ff191660011790558783526006909152808220548383528183205551829187917fc5188e1ad025cd9b14f9b77496a121bb77c2aca1c221401a1e92288a93ad143d9190a36115a5565b6000818152600260205260409020546001600160a01b031615801590611540575060008181526004602052604090205460ff165b1561157757604051819086907fc2fbe5202fa3aef19d26284e739c3305170f8c2e9acf77122fc10277a492ac6b90600090a36115a5565b604051819086907f9fd08a31a95521d410b6d20008384ec9a65bff57159bb95ad8ba86c03fda046690600090a35b5060010161144f565b6115c8600080516020611fc48339815191526109ff6119b0565b156116045760405162461bcd60e51b8152600401808060200182810382526035815260200180611f8f6035913960400191505060405180910390fd5b611623600080516020611fc483398151915261161e6119b0565b610a3f565b565b60009081526003602052604090205490565b6000818152602081905260408120610d4790611aa7565b60008281526020819052604090206002015461166c906109ff6119b0565b610aa45760405162461bcd60e51b8152600401808060200182810382526030815260200180611e5c6030913960400191505060405180910390fd5b60018054604080516020601f600260001961010087891615020190951694909404938401819004810282018101909252828152606093909290918301828280156117325780601f1061170757610100808354040283529160200191611732565b820191906000526020600020905b81548152906001019060200180831161171557829003601f168201915b5050505050905090565b611756600080516020611fc48339815191526109ff6119b0565b6117915760405162461bcd60e51b8152600401808060200182810382526037815260200180611f586037913960400191505060405180910390fd5b6117996119b0565b6000838152600260205260409020546001600160a01b039081169116146117f15760405162461bcd60e51b8152600401808060200182810382526034815260200180611ccf6034913960400191505060405180910390fd5b6000818152600260205260409020546001600160a01b03166118445760405162461bcd60e51b815260040180806020018281038252602c815260200180611e30602c913960400191505060405180910390fd5b60008281526004602052604090205460ff16156118925760405162461bcd60e51b815260040180806020018281038252602c815260200180611e04602c913960400191505060405180910390fd5b60008181526005602052604090205460ff166118df5760405162461bcd60e51b8152600401808060200182810382526046815260200180611d7e6046913960600191505060405180910390fd5b6000828152600460209081526040808320805460ff191660011790558383526006909152808220548483528183205551829184917fe4dc822b14b51bcb0daee9b2a47ad5cfe785b97988c9ba9fb18a008fa74d8d069190a35050565b61194860006109ff6119b0565b6119835760405162461bcd60e51b8152600401808060200182810382526045815260200180611d036045913960600191505060405180910390fd5b6000908152600860205260409020805460ff19169055565b6000610d44836001600160a01b038416611ab2565b3390565b60008281526020819052604090206119cc908261199b565b15610a49576119d96119b0565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b6000828152602081905260409020611a359082611afc565b15610a4957611a426119b0565b6001600160a01b0316816001600160a01b0316837ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b60405160405180910390a45050565b6000610d448383611b11565b6000610d44836001600160a01b038416611b75565b6000610d4782611b8d565b6000611abe8383611b75565b611af457508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155610d47565b506000610d47565b6000610d44836001600160a01b038416611b91565b81546000908210611b535760405162461bcd60e51b8152600401808060200182810382526022815260200180611c586022913960400191505060405180910390fd5b826000018281548110611b6257fe5b9060005260206000200154905092915050565b60009081526001919091016020526040902054151590565b5490565b60008181526001830160205260408120548015611c4d5783546000198083019190810190600090879083908110611bc457fe5b9060005260206000200154905080876000018481548110611be157fe5b600091825260208083209091019290925582815260018981019092526040902090840190558654879080611c1157fe5b60019003818190600052602060002001600090559055866001016000878152602001908152602001600020600090556001945050505050610d47565b6000915050610d4756fe456e756d657261626c655365743a20696e646578206f7574206f6620626f756e64735370617469616c4173736574733a2073746f72616765206d75737420626520616c6c6f776564416363657373436f6e74726f6c3a2073656e646572206d75737420626520616e2061646d696e20746f206772616e745370617469616c4173736574733a2067656f4449444964206d757374206265206f776e6564206279206974732063726561746f725370617469616c4173736574733a206d75737420686176652061646d696e20726f6c6520746f206564697420616c6c6f776564206f6666636861696e2073746f72616765735370617469616c4173736574733a2047656f44494420646f6573206e6f742068617665206120706172656e7420746f2072656d6f76655370617469616c4173736574733a20706172656e7447656f4449444964206d7573742062652061626c6520746f20626520706172656e7420286120436f6c6c656374696f6e295370617469616c4173736574733a2067656f4449444964206d7573742062652061626c6520746f20626520706172656e7420286120436f6c6c656374696f6e295370617469616c4173736574733a2067656f444944496420616c726561647920686173206120706172656e745370617469616c4173736574733a20706172656e7447656f444944496420646f6573206e6f74206578697374416363657373436f6e74726f6c3a2073656e646572206d75737420626520616e2061646d696e20746f207265766f6b655370617469616c4173736574733a2047656f44494420746f2062652072656d6f76656420617320706172656e7420646f6573206e6f742065786973745370617469616c4173736574733a2073746f72616765206d757374206e6f7420626520616374697665207965745370617469616c4173736574733a2063616c6c6572206973206e6f74206f776e6572206f6620746865205370617469616c2041737365745370617469616c4173736574733a206964206d757374206e6f74206861766520616e206f776e6572207965745370617469616c4173736574733a206d7573742068617665206461746120737570706c69657220726f6c6520746f2072656769737465725370617469616c4173736574733a206d757374206e6f742068617665206120444154415f535550504c49455220726f6c6520796574b90ec3213bc54b34738ca7ad785b7e6275742931f3ddfa147171c27090643f3f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636520726f6c657320666f722073656c66a26469706673582212200603174d84b92a254e194b236a6220fcb94109027f9b708b8705b69fcb21d1bd64736f6c634300060c0033", - "immutableReferences": {}, - "sourceMap": "539:12282:1:-:0;;;3166:171;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;3166:171:1;;;;;;;;;;-1:-1:-1;3166:171:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3214:12;3222:3;3214:7;;;:12;;:::i;:::-;3236:44;1772:4:3;3267:12:1;:10;:12::i;:::-;3236:10;:44::i;:::-;3290:39;2284:26;3316:12;:10;:12::i;3290:39::-;3166:171;539:12282;;11979:78;12037:13;;;;:4;;:13;;;;;:::i;:::-;;11979:78;:::o;598:104:5:-;685:10;598:104;:::o;6588:110:3:-;6666:25;6677:4;6683:7;7098:6;:12;;;;;;;;;;;:33;;7123:7;;7098:24;;;;;:33;;:::i;:::-;7094:109;;;7179:12;:10;:12::i;:::-;-1:-1:-1;;;;;7152:40:3;7170:7;-1:-1:-1;;;;;7152:40:3;7164:4;7152:40;;;;;;;;;;7025:184;;:::o;6429:150:6:-;6499:4;6522:50;6527:3;-1:-1:-1;;;;;6547:23:6;;6522:4;:50::i;:::-;6515:57;;6429:150;;;;;:::o;1640:404::-;1703:4;1724:21;1734:3;1739:5;1724:9;:21::i;:::-;1719:319;;-1:-1:-1;1761:23:6;;;;;;;;:11;:23;;;;;;;;;;;;;1941:18;;1919:19;;;:12;;;:19;;;;;;:40;;;;1973:11;;1719:319;-1:-1:-1;2022:5:6;2015:12;;3805:127;3878:4;3901:19;;;:12;;;;;:19;;;;;;:24;;;3805:127::o;539:12282:1:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;539:12282:1;;;-1:-1:-1;539:12282:1;:::i;:::-;;;:::o;:::-;;;;;;;;;;;;;;;;;;;;;;", - "deployedSourceMap": "539:12282:1:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;12373:100;;;;;;;;;;;;;;;;-1:-1:-1;12373:100:1;;:::i;:::-;;;;;;;;;;;;;;;;;;12263:104;;;;;;;;;;;;;;;;-1:-1:-1;12263:104:1;;:::i;10640:1256::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;10640:1256:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;10640:1256:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;10640:1256:1;;-1:-1:-1;10640:1256:1;;-1:-1:-1;;;;;10640:1256:1:i;:::-;;12063:96;;;;;;;;;;;;;;;;-1:-1:-1;12063:96:1;;:::i;:::-;;;;-1:-1:-1;;;;;12063:96:1;;;;;;;;;;;;;;4282:112:3;;;;;;;;;;;;;;;;-1:-1:-1;4282:112:3;;:::i;:::-;;;;;;;;;;;;;;;;4644:223;;;;;;;;;;;;;;;;-1:-1:-1;4644:223:3;;;;;;-1:-1:-1;;;;;4644:223:3;;:::i;5818:205::-;;;;;;;;;;;;;;;;-1:-1:-1;5818:205:3;;;;;;-1:-1:-1;;;;;5818:205:3;;:::i;3737:354:1:-;;;;;;;;;;;;;;;;-1:-1:-1;3737:354:1;;:::i;9923:653::-;;;;;;;;;;;;;;;;-1:-1:-1;9923:653:1;;;;;;;:::i;12479:115::-;;;;;;;;;;;;;;;;-1:-1:-1;12479:115:1;;:::i;12600:134::-;;;;;;;;;;;;;;;;-1:-1:-1;12600:134:1;;:::i;3965:136:3:-;;;;;;;;;;;;;;;;-1:-1:-1;3965:136:3;;;;;;;:::i;2950:137::-;;;;;;;;;;;;;;;;-1:-1:-1;2950:137:3;;;;;;-1:-1:-1;;;;;2950:137:3;;:::i;2244:66:1:-;;;:::i;1727:49:3:-;;;:::i;8677:1111:1:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;8677:1111:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;8677:1111:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;8677:1111:1;;-1:-1:-1;8677:1111:1;;-1:-1:-1;;;;;8677:1111:1:i;4578:1736::-;;;;;;;;;;;;;;;;-1:-1:-1;;;;;4578:1736:1;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;4578:1736:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;4578:1736:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;4578:1736:1;;-1:-1:-1;;4578:1736:1;;;-1:-1:-1;;;4578:1736:1;;;;;;;;;:::i;6446:1224::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;6446:1224:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;6446:1224:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;6446:1224:1;;-1:-1:-1;6446:1224:1;;-1:-1:-1;;;;;6446:1224:1:i;3438:200::-;;;:::i;12165:92::-;;;;;;;;;;;;;;;;-1:-1:-1;12165:92:1;;:::i;3255:125:3:-;;;;;;;;;;;;;;;;-1:-1:-1;3255:125:3;;:::i;5101:226::-;;;;;;;;;;;;;;;;-1:-1:-1;5101:226:3;;;;;;-1:-1:-1;;;;;5101:226:3;;:::i;12740:79:1:-;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;7798:755;;;;;;;;;;;;;;;;-1:-1:-1;7798:755:1;;;;;;;:::i;4154:247::-;;;;;;;;;;;;;;;;-1:-1:-1;4154:247:1;;:::i;12373:100::-;12429:4;12452:14;;;:10;:14;;;;;;;;;12373:100::o;12263:104::-;12321:4;12344:16;;;:12;:16;;;;;;;;;12263:104::o;10640:1256::-;10784:12;:10;:12::i;:::-;10763:17;;;;:7;:17;;;;;;-1:-1:-1;;;;;10763:17:1;;;:33;;;10742:122;;;;-1:-1:-1;;;10742:122:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;10902:1;10874:17;;;:7;:17;;;;;;;;:30;;-1:-1:-1;;;;;;10874:30:1;;;10914:16;:26;;;;;:31;;;10955:5;:15;;;;;:20;;;10985:10;:20;;;;;:28;;-1:-1:-1;;10985:28:1;;;11023:5;:15;;;;;:20;11077:23;;11115:16;;11111:730;;11150:9;11146:685;11167:12;11163:1;:16;11146:685;;;11204:22;11229:16;11246:1;11229:19;;;;;;;;;;;;;;;;;;;11305:1;11270:23;;;:7;:23;;;;;;;;11229:19;;-1:-1:-1;;;;;;11270:23:1;:37;;;;:67;;-1:-1:-1;11311:26:1;;;;:10;:26;;;;;;;;11270:67;11266:551;;;11390:5;11361:26;;;:10;:26;;;;;;;;:34;;-1:-1:-1;;11361:34:1;;;11417:5;:21;;;;;;:38;;;11482:41;11372:14;;11498:8;;11482:41;;11390:5;11482:41;11266:551;;;11588:1;11553:23;;;:7;:23;;;;;;-1:-1:-1;;;;;11553:23:1;:37;;;;:68;;-1:-1:-1;11595:26:1;;;;:10;:26;;;;;;;;11594:27;11553:68;11549:268;;;11649:47;;11681:14;;11671:8;;11649:47;;;;;11549:268;;;11748:50;;11783:14;;11773:8;;11748:50;;;;;11549:268;-1:-1:-1;11181:3:1;;11146:685;;;;11111:730;11856:33;;11880:8;;11856:33;;;;;10640:1256;;;:::o;12063:96::-;12115:7;12141:11;;;:7;:11;;;;;;-1:-1:-1;;;;;12141:11:1;;12063:96::o;4282:112:3:-;4339:7;4365:12;;;;;;;;;;:22;;;;4282:112::o;4644:223::-;4735:6;:12;;;;;;;;;;:22;;;4727:45;;4759:12;:10;:12::i;:::-;4727:7;:45::i;:::-;4719:105;;;;-1:-1:-1;;;4719:105:3;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4835:25;4846:4;4852:7;4835:10;:25::i;:::-;4644:223;;:::o;5818:205::-;5915:12;:10;:12::i;:::-;-1:-1:-1;;;;;5904:23:3;:7;-1:-1:-1;;;;;5904:23:3;;5896:83;;;;-1:-1:-1;;;5896:83:3;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;5990:26;6002:4;6008:7;5990:11;:26::i;3737:354:1:-;3810:41;1772:4:3;3838:12:1;:10;:12::i;3810:41::-;3802:123;;;;-1:-1:-1;;;3802:123:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3943:33;;;;:16;:33;;;;;;;;:41;3935:99;;;;-1:-1:-1;;;3935:99:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4044:33;;;;:16;:33;;;;;:40;;-1:-1:-1;;4044:40:1;4080:4;4044:40;;;3737:354::o;9923:653::-;10018:36;-1:-1:-1;;;;;;;;;;;10041:12:1;:10;:12::i;10018:36::-;10010:104;;;;-1:-1:-1;;;10010:104:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;10153:12;:10;:12::i;:::-;10132:17;;;;:7;:17;;;;;;-1:-1:-1;;;;;10132:17:1;;;:33;;;10124:90;;;;-1:-1:-1;;;10124:90:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;10267:1;10232:23;;;:7;:23;;;;;;-1:-1:-1;;;;;10232:23:1;10224:110;;;;-1:-1:-1;;;10224:110:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;10352:20;;;;:10;:20;;;;;;;;10344:87;;;;-1:-1:-1;;;10344:87:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;10465:5;10442:20;;;:10;:20;;;;;;;;:28;;-1:-1:-1;;10442:28:1;;;10480:5;:15;;;;;;:26;;;10530:39;10554:14;;10453:8;;10530:39;;10465:5;10530:39;9923:653;;:::o;12479:115::-;12541:7;12567:20;;;:16;:20;;;;;;;12479:115::o;12600:134::-;12671:4;12694:33;;;:16;:33;;;;;;;;;12600:134::o;3965:136:3:-;4038:7;4064:12;;;;;;;;;;:30;;4088:5;4064:23;:30::i;:::-;4057:37;;3965:136;;;;;:::o;2950:137::-;3019:4;3042:12;;;;;;;;;;:38;;3072:7;3042:29;:38::i;2244:66:1:-;-1:-1:-1;;;;;;;;;;;2244:66:1;:::o;1727:49:3:-;1772:4;1727:49;:::o;8677:1111:1:-;8787:36;-1:-1:-1;;;;;;;;;;;8810:12:1;:10;:12::i;8787:36::-;8779:104;;;;-1:-1:-1;;;8779:104:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8922:12;:10;:12::i;:::-;8901:17;;;;:7;:17;;;;;;-1:-1:-1;;;;;8901:17:1;;;:33;;;8893:90;;;;-1:-1:-1;;;8893:90:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;9017:24;;9056:16;;9052:730;;9091:9;9087:685;9108:12;9104:1;:16;9087:685;;;9145:22;9170:17;9188:1;9170:20;;;;;;;;;;;;;;;;;;;9247:1;9212:23;;;:7;:23;;;;;;;;9170:20;;-1:-1:-1;;;;;;9212:23:1;:37;;;;:67;;-1:-1:-1;9253:26:1;;;;:10;:26;;;;;;;;9212:67;9208:550;;;9332:5;9303:26;;;:10;:26;;;;;;;;:34;;-1:-1:-1;;9303:34:1;;;9359:5;:21;;;;;;:38;;;9424:41;9314:14;;9440:8;;9424:41;;9332:5;9424:41;9208:550;;;9529:1;9494:23;;;:7;:23;;;;;;-1:-1:-1;;;;;9494:23:1;:37;;;;:68;;-1:-1:-1;9536:26:1;;;;:10;:26;;;;;;;;9535:27;9494:68;9490:268;;;9590:47;;9622:14;;9612:8;;9590:47;;;;;9490:268;;;9689:50;;9724:14;;9714:8;;9689:50;;;;;9490:268;-1:-1:-1;9122:3:1;;9087:685;;;;9052:730;8677:1111;;;:::o;4578:1736::-;4785:36;-1:-1:-1;;;;;;;;;;;4808:12:1;:10;:12::i;4785:36::-;4777:104;;;;-1:-1:-1;;;4777:104:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4899:32;4915:15;4899;:32::i;:::-;4891:83;;;;-1:-1:-1;;;4891:83:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;5021:1;4992:17;;;:7;:17;;;;;;-1:-1:-1;;;;;4992:17:1;:31;4984:88;;;;-1:-1:-1;;;4984:88:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;5090:16;;;:35;;;5110:10;5124:1;5110:15;5090:35;5082:80;;;;;-1:-1:-1;;;5082:80:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;5173:15;;;;:5;:15;;;;;;;;:20;;;5203:7;:17;;;;;:25;;-1:-1:-1;;;;;;5203:25:1;-1:-1:-1;;;;;5203:25:1;;;;;5238:16;:26;;;;;:44;;;5297:15;5293:157;;5328:22;;;;:12;:22;;;;;:29;;-1:-1:-1;;5328:29:1;5353:4;5328:29;;;5293:157;;;5378:10;5392:1;5378:15;5374:76;;;5434:5;5409:22;;;:12;:22;;;;;:30;;-1:-1:-1;;5409:30:1;;;5374:76;5464:28;5460:478;;5531:5;5508:20;;;:10;:20;;;;;;;;:28;;-1:-1:-1;;5508:28:1;;;5550:5;:15;;;;;:26;;;5663:12;:22;;;;;;;5591:95;;;;;;;;;;;5508:28;5663:22;5591:95;;;;;;;;5631:3;;5519:8;;-1:-1:-1;;;;;5591:95:1;;;;;;;;;;;;;5460:478;;;5717:20;;;;:10;:20;;;;;;;;:27;;-1:-1:-1;;5717:27:1;5740:4;5717:27;;;5825:21;;;:5;:21;;;;;;5848:22;;;:12;:22;;;;;;;5763:108;;;;;;;;;;;;5717:27;5848:22;;;;5763:108;;;;;;;;5803:3;;5728:8;;-1:-1:-1;;;;;5763:108:1;;;;;;;;;;;;;5890:37;;5912:14;;5902:8;;5890:37;;;;;5460:478;5971:24;;6010:16;;;;;:42;;-1:-1:-1;6030:22:1;;;;:12;:22;;;;;;;;6010:42;6006:302;;;6071:9;6067:231;6088:12;6084:1;:16;6067:231;;;6125:22;6150:17;6168:1;6150:20;;;;;;;;;;;;;;;;;;;6188:26;;;;:10;:26;;;;;;;:33;;-1:-1:-1;;6188:33:1;6217:4;6188:33;;;6244:39;6150:20;;-1:-1:-1;6150:20:1;;6258:8;;6244:39;;6188:26;6244:39;-1:-1:-1;6102:3:1;;6067:231;;;;6006:302;4578:1736;;;;;;;;:::o;6446:1224::-;6553:36;-1:-1:-1;;;;;;;;;;;6576:12:1;:10;:12::i;6553:36::-;6545:104;;;;-1:-1:-1;;;6545:104:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;6688:12;:10;:12::i;:::-;6667:17;;;;:7;:17;;;;;;-1:-1:-1;;;;;6667:17:1;;;:33;;;6659:98;;;;-1:-1:-1;;;6659:98:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;6775:22;;;;:12;:22;;;;;;;;6767:99;;;;-1:-1:-1;;;6767:99:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;6900:24;;6939:16;;6935:729;;6974:9;6970:684;6991:12;6987:1;:16;6970:684;;;7028:22;7053:17;7071:1;7053:20;;;;;;;;;;;;;;;;;;;7130:1;7095:23;;;:7;:23;;;;;;;;7053:20;;-1:-1:-1;;;;;;7095:23:1;:37;;;;:68;;-1:-1:-1;7137:26:1;;;;:10;:26;;;;;;;;7136:27;7095:68;7091:549;;;7187:26;;;;:10;:26;;;;;;;;:33;;-1:-1:-1;;7187:33:1;7216:4;7187:33;;;7266:15;;;:5;:15;;;;;;;7242:21;;;;;;:39;7308;7198:14;;7272:8;;7308:39;;7187:26;7308:39;7091:549;;;7411:1;7376:23;;;:7;:23;;;;;;-1:-1:-1;;;;;7376:23:1;:37;;;;:67;;-1:-1:-1;7417:26:1;;;;:10;:26;;;;;;;;7376:67;7372:268;;;7471:48;;7504:14;;7494:8;;7471:48;;;;;7372:268;;;7571:50;;7606:14;;7596:8;;7571:50;;;;;7372:268;-1:-1:-1;7005:3:1;;6970:684;;3438:200;3488:36;-1:-1:-1;;;;;;;;;;;3511:12:1;:10;:12::i;3488:36::-;3487:37;3479:103;;;;-1:-1:-1;;;3479:103:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3592:39;-1:-1:-1;;;;;;;;;;;3618:12:1;:10;:12::i;:::-;3592:10;:39::i;:::-;3438:200::o;12165:92::-;12215:7;12241:9;;;:5;:9;;;;;;;12165:92::o;3255:125:3:-;3318:7;3344:12;;;;;;;;;;:29;;:27;:29::i;5101:226::-;5193:6;:12;;;;;;;;;;:22;;;5185:45;;5217:12;:10;:12::i;5185:45::-;5177:106;;;;-1:-1:-1;;;5177:106:3;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;12740:79:1;12808:4;12801:11;;;;;;;;-1:-1:-1;;12801:11:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;12776:13;;12801:11;;12808:4;;12801:11;;12808:4;12801:11;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;12740:79;:::o;7798:755::-;7890:36;-1:-1:-1;;;;;;;;;;;7913:12:1;:10;:12::i;7890:36::-;7882:104;;;;-1:-1:-1;;;7882:104:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8025:12;:10;:12::i;:::-;8004:17;;;;:7;:17;;;;;;-1:-1:-1;;;;;8004:17:1;;;:33;;;7996:98;;;;-1:-1:-1;;;7996:98:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8147:1;8112:23;;;:7;:23;;;;;;-1:-1:-1;;;;;8112:23:1;8104:94;;;;-1:-1:-1;;;8104:94:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8217:20;;;;:10;:20;;;;;;;;8216:21;8208:78;;;;-1:-1:-1;;;8208:78:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8304:28;;;;:12;:28;;;;;;;;8296:111;;;;-1:-1:-1;;;8296:111:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8418:20;;;;:10;:20;;;;;;;;:27;;-1:-1:-1;;8418:27:1;8441:4;8418:27;;;8473:21;;;:5;:21;;;;;;;8455:15;;;;;;:39;8509:37;8479:14;;8429:8;;8509:37;;8418:20;8509:37;7798:755;;:::o;4154:247::-;4228:41;1772:4:3;4256:12:1;:10;:12::i;4228:41::-;4220:123;;;;-1:-1:-1;;;4220:123:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4389:5;4353:33;;;:16;:33;;;;;:41;;-1:-1:-1;;4353:41:1;;;4154:247::o;6429:150:6:-;6499:4;6522:50;6527:3;-1:-1:-1;;;;;6547:23:6;;6522:4;:50::i;598:104:5:-;685:10;598:104;:::o;7025:184:3:-;7098:6;:12;;;;;;;;;;:33;;7123:7;7098:24;:33::i;:::-;7094:109;;;7179:12;:10;:12::i;:::-;-1:-1:-1;;;;;7152:40:3;7170:7;-1:-1:-1;;;;;7152:40:3;7164:4;7152:40;;;;;;;;;;7025:184;;:::o;7215:188::-;7289:6;:12;;;;;;;;;;:36;;7317:7;7289:27;:36::i;:::-;7285:112;;;7373:12;:10;:12::i;:::-;-1:-1:-1;;;;;7346:40:3;7364:7;-1:-1:-1;;;;;7346:40:3;7358:4;7346:40;;;;;;;;;;7215:188;;:::o;7677:156:6:-;7751:7;7801:22;7805:3;7817:5;7801:3;:22::i;6984:165::-;7064:4;7087:55;7097:3;-1:-1:-1;;;;;7117:23:6;;7087:9;:55::i;7230:115::-;7293:7;7319:19;7327:3;7319:7;:19::i;1640:404::-;1703:4;1724:21;1734:3;1739:5;1724:9;:21::i;:::-;1719:319;;-1:-1:-1;1761:23:6;;;;;;;;:11;:23;;;;;;;;;;;;;1941:18;;1919:19;;;:12;;;:19;;;;;;:40;;;;1973:11;;1719:319;-1:-1:-1;2022:5:6;2015:12;;6747:156;6820:4;6843:53;6851:3;-1:-1:-1;;;;;6871:23:6;;6843:7;:53::i;4452:201::-;4546:18;;4519:7;;4546:26;-1:-1:-1;4538:73:6;;;;-1:-1:-1;;;4538:73:6;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4628:3;:11;;4640:5;4628:18;;;;;;;;;;;;;;;;4621:25;;4452:201;;;;:::o;3805:127::-;3878:4;3901:19;;;:12;;;;;:19;;;;;;:24;;;3805:127::o;4013:107::-;4095:18;;4013:107::o;2212:1512::-;2278:4;2415:19;;;:12;;;:19;;;;;;2449:15;;2445:1273;;2878:18;;-1:-1:-1;;2830:14:6;;;;2878:22;;;;2806:21;;2878:3;;:22;;3160;;;;;;;;;;;;;;3140:42;;3303:9;3274:3;:11;;3286:13;3274:26;;;;;;;;;;;;;;;;;;;:38;;;;3378:23;;;3420:1;3378:12;;;:23;;;;;;3404:17;;;3378:43;;3527:17;;3378:3;;3527:17;;;;;;;;;;;;;;;;;;;;;;3619:3;:12;;:19;3632:5;3619:19;;;;;;;;;;;3612:26;;;3660:4;3653:11;;;;;;;;2445:1273;3702:5;3695:12;;;;", - "source": "// SPDX-License-Identifier: APACHE OR MIT\npragma solidity ^0.6.0;\n\nimport \"@openzeppelin/contracts/access/AccessControl.sol\";\nimport \"@openzeppelin/contracts/GSN/Context.sol\";\n\n/**\n * @dev {SpatialAssets} registry\n * This contract uses {AccessControl} to lock permissioned functions using the\n * different roles - head to its documentation for details.\n *\n * The account that deploys the contract will be granted the 'DATA_SUPPLIER' as well as the default admin role, which will let it grant\n * 'DATA_SUPPLIER' roles to other accounts\n */\ncontract SpatialAssets is Context, AccessControl {\n /**\n * @dev Emitted when Spatial Assets of id `id` are transferred to `to``.\n */\n event SpatialAssetRegistered(address indexed to, bytes32 indexed geoDIDId, bytes32 indexed cid, bytes32 offChainStorage, bytes32 root, bool canBeParent);\n\n /**\n * @dev Emitted when Spatial Assets of id `id` are deactivated.\n */\n event SpatialAssetDeactivated(bytes32 indexed geoDIDId);\n\n /**\n * @dev Emitted when a parent geodid is added to a node\n */\n event ParentAdded(bytes32 indexed geoDIDId, bytes32 indexed parentGeoDIDId);\n\n /**\n * @dev Emitted when a children geodid is added to a node\n */\n event ChildrenAdded(bytes32 indexed geoDIDId, bytes32 indexed childrenGeoDIDId);\n\n /**\n * @dev Emitted when a parent geodid is removed from a node\n */\n event ParentRemoved(bytes32 indexed geoDIDId, bytes32 indexed parentGeoDIDId);\n\n /**\n * @dev Emitted when a children geodid is removed from a node\n */\n event ChildrenRemoved(bytes32 indexed geoDIDId, bytes32 indexed childrenGeoDIDId);\n\n \n /**\n * @dev Emitted when a children geodid does not have a parent when trying to remove it from a parent\n */\n event ChildrenErrorNoParent(bytes32 indexed geoDIDId, bytes32 indexed childrenGeoDIDId);\n\n \n /**\n * @dev Emitted when a children geodid does not exist\n */\n event ChildrenErrorNoExistence(bytes32 indexed geoDIDId, bytes32 indexed childrenGeoDIDId);\n\n \n /**\n * @dev Emitted when a children geodid already has a parent but shouldn't have\n */\n event ChildrenErrorHasParent(bytes32 indexed geoDIDId, bytes32 indexed childrenGeoDIDId);\n\n\n bytes32 public constant DATA_SUPPLIER = keccak256(\"DATA_SUPPLIER\");\n\n string private _uri;\n\n // Mapping from GeodidID to registrant\n mapping (bytes32 => address) private _owners;\n \n // Mapping from GeodidID to Cid\n mapping (bytes32 => bytes32) private _cids;\n\n // Mapping from GeodidID to parenthood status\n mapping (bytes32 => bool) private _hasParent;\n\n // Mapping from GeodidID to parenthood type\n mapping (bytes32 => bool) private _canBeParent;\n \n // Mapping from GeodidID to root GeoDID\n mapping (bytes32 => bytes32) private _root;\n\n // Mapping from id to spatial asset external storage\n mapping (bytes32 => bytes32) private _externalStorage;\n\n // Allowed external storages signatures\n mapping (bytes32 => bool) private _allowedStorages;\n\n\n /**\n * @dev Grants `DEFAULT_ADMIN_ROLE`, `DATA_SUPPLIER` to the account that\n * deploys the contract.\n */\n constructor(string memory uri) public {\n _setURI(uri);\n _setupRole(DEFAULT_ADMIN_ROLE, _msgSender());\n _setupRole(DATA_SUPPLIER, _msgSender());\n\n }\n\n /**\n * @dev Registers a new user with the ability to register a spatial asset.\n */\n function registerRole() public {\n require(!hasRole(DATA_SUPPLIER, _msgSender()), \"SpatialAssets: must not have a DATA_SUPPLIER role yet\");\n _setupRole(DATA_SUPPLIER, _msgSender());\n }\n\n /**\n * @dev Registers a new storage that can accept GeoDID document creation\n */\n function enableStorage(bytes32 offChainStorage) public {\n require(hasRole(DEFAULT_ADMIN_ROLE, _msgSender()), \"SpatialAssets: must have admin role to edit allowed offchain storages\");\n require(_allowedStorages[offChainStorage]== false, \"SpatialAssets: storage must not be active yet\");\n _allowedStorages[offChainStorage] = true;\n }\n\n /**\n * @dev Disables an existing storage\n */\n function disableStorage(bytes32 offChainStorage) public {\n require(hasRole(DEFAULT_ADMIN_ROLE, _msgSender()), \"SpatialAssets: must have admin role to edit allowed offchain storages\");\n _allowedStorages[offChainStorage] = false;\n }\n\n\n /**\n * @dev Registers one spatial asset with external storage 'data' and assigns them to `account`.\n *\n * Emits a {SpatialAssetRegistered} event.\n */\n function registerSpatialAsset(address owner, bytes32 geoDIDId, bytes32 parentGeoDIDId , bytes32[] memory childrenGeoDIDIds, bytes32 cid, bytes32 offChainStorage, uint256 geoDIDtype) public {\n require(hasRole(DATA_SUPPLIER, _msgSender()), \"SpatialAssets: must have data supplier role to register\");\n require(allowedStorages(offChainStorage), \"SpatialAssets: storage must be allowed\");\n require(_owners[geoDIDId] == address(0), \"SpatialAssets: id must not have an owner yet\");\n require(geoDIDtype == 0 || geoDIDtype == 1, \"Spatial Assets: wrong geodidtype\");\n\n _cids[geoDIDId] =cid;\n _owners[geoDIDId] = owner;\n _externalStorage[geoDIDId] = offChainStorage;\n\n if (geoDIDtype == 0) {\n _canBeParent[geoDIDId] = true;\n } else if (geoDIDtype == 1) {\n _canBeParent[geoDIDId] = false;\n }\n\n if (parentGeoDIDId == bytes32(0)) {\n _hasParent[geoDIDId] = false;\n _root[geoDIDId] = geoDIDId;\n emit SpatialAssetRegistered(owner, geoDIDId, cid, offChainStorage, geoDIDId, _canBeParent[geoDIDId]);\n } else {\n _hasParent[geoDIDId] = true;\n emit SpatialAssetRegistered(owner, geoDIDId, cid, offChainStorage, _root[parentGeoDIDId], _canBeParent[geoDIDId]);\n emit ParentAdded(geoDIDId, parentGeoDIDId);\n }\n\n uint256 childrensLen = childrenGeoDIDIds.length;\n\n if (childrensLen > 0 && _canBeParent[geoDIDId]){\n for(uint256 j=0; j < childrensLen; j++) {\n bytes32 childrenGeoDID = childrenGeoDIDIds[j];\n _hasParent[childrenGeoDID] = true;\n emit ChildrenAdded(geoDIDId, childrenGeoDID);\n }\n }\n }\n\n\n /**\n * @dev Adds children GeoDIDs to an already existent geoDID\n *\n * Emits a {ChildrenAdded} event.\n */\n function addChildrenGeoDIDs(bytes32 geoDIDId, bytes32[] memory childrenGeoDIDIds) public {\n require(hasRole(DATA_SUPPLIER, _msgSender()), \"SpatialAssets: must have data supplier role to register\");\n require(_owners[geoDIDId] == _msgSender(), \"SpatialAssets: geoDIDId must be owned by its creator\");\n require(_canBeParent[geoDIDId], \"SpatialAssets: geoDIDId must be able to be parent (a Collection)\");\n\n uint256 childrensLen = childrenGeoDIDIds.length;\n\n if (childrensLen > 0){\n for(uint256 j=0; j < childrensLen; j++) {\n bytes32 childrenGeoDID = childrenGeoDIDIds[j];\n if (_owners[childrenGeoDID] != address(0) && !_hasParent[childrenGeoDID]) {\n _hasParent[childrenGeoDID] = true;\n _root[childrenGeoDID] = _root[geoDIDId];\n emit ChildrenAdded(geoDIDId, childrenGeoDID);\n } else if (_owners[childrenGeoDID] != address(0) && _hasParent[childrenGeoDID]){\n emit ChildrenErrorHasParent(geoDIDId, childrenGeoDID);\n } else {\n emit ChildrenErrorNoExistence(geoDIDId, childrenGeoDID);\n }\n }\n }\n }\n\n /**\n * @dev Adds a parent GeoDID to an already existent geoDID\n *\n * Emits a {ParentAdded} event.\n */\n function addParentGeoDID(bytes32 geoDIDId, bytes32 parentGeoDIDId) public {\n require(hasRole(DATA_SUPPLIER, _msgSender()), \"SpatialAssets: must have data supplier role to register\");\n require(_owners[geoDIDId] == _msgSender(), \"SpatialAssets: geoDIDId must be owned by its creator\");\n require(_owners[parentGeoDIDId] != address(0), \"SpatialAssets: parentGeoDIDId does not exist\");\n require(!_hasParent[geoDIDId], \"SpatialAssets: geoDIDId already has a parent\");\n require(_canBeParent[parentGeoDIDId], \"SpatialAssets: parentGeoDIDId must be able to be parent (a Collection)\");\n\n _hasParent[geoDIDId] = true;\n _root[geoDIDId] = _root[parentGeoDIDId];\n emit ParentAdded(geoDIDId, parentGeoDIDId);\n }\n\n \n /**\n * @dev Removes childrenGeoDIDs from a geoDID\n *\n * Emits a {ChildrenRemoved} event.\n */\n function removeChildrenGeoDIDs(bytes32 geoDIDId, bytes32[] memory childrenGeoDIDIds) public {\n require(hasRole(DATA_SUPPLIER, _msgSender()), \"SpatialAssets: must have data supplier role to register\");\n require(_owners[geoDIDId] == _msgSender(), \"SpatialAssets: id must not have an owner yet\");\n\n uint256 childrensLen = childrenGeoDIDIds.length;\n\n if (childrensLen > 0){\n for(uint256 j=0; j < childrensLen; j++) {\n bytes32 childrenGeoDID = childrenGeoDIDIds[j];\n if (_owners[childrenGeoDID] != address(0) && _hasParent[childrenGeoDID]) {\n _hasParent[childrenGeoDID] = false;\n _root[childrenGeoDID] = childrenGeoDID;\n emit ChildrenRemoved(geoDIDId, childrenGeoDID);\n } else if (_owners[childrenGeoDID] != address(0) && !_hasParent[childrenGeoDID]){\n emit ChildrenErrorNoParent(geoDIDId, childrenGeoDID);\n } else {\n emit ChildrenErrorNoExistence(geoDIDId, childrenGeoDID);\n }\n }\n }\n }\n\n\n /**\n * @dev Removes a parent GeoDID from an already existent geoDID\n *\n * Emits a {ParentAdded} event.\n */\n function removeParentGeoDID(bytes32 geoDIDId, bytes32 parentGeoDIDId) public {\n require(hasRole(DATA_SUPPLIER, _msgSender()), \"SpatialAssets: must have data supplier role to register\");\n require(_owners[geoDIDId] == _msgSender(), \"SpatialAssets: id must not have an owner yet\");\n require(_owners[parentGeoDIDId] != address(0), \"SpatialAssets: GeoDID to be removed as parent does not exist\");\n require(_hasParent[geoDIDId], \"SpatialAssets: GeoDID does not have a parent to remove\");\n\n _hasParent[geoDIDId] = false;\n _root[geoDIDId] = geoDIDId;\n \n emit ParentRemoved(geoDIDId, parentGeoDIDId);\n }\n\n /**\n * @dev De-registers a spatial asset\n */\n function deactivateSpatialAsset(bytes32 geoDIDId, bytes32[] memory childrenToRemove) public {\n require(\n _owners[geoDIDId] == _msgSender(),\"SpatialAssets: caller is not owner of the Spatial Asset\"\n );\n _owners[geoDIDId] = address(0);\n _externalStorage[geoDIDId] = \"\";\n _cids[geoDIDId] = \"\";\n _hasParent[geoDIDId] = false;\n _root[geoDIDId] = \"\";\n\n uint256 childrensLen = childrenToRemove.length;\n\n if (childrensLen > 0){\n for(uint256 j=0; j < childrensLen; j++) {\n bytes32 childrenGeoDID = childrenToRemove[j];\n if (_owners[childrenGeoDID] != address(0) && _hasParent[childrenGeoDID]) {\n _hasParent[childrenGeoDID] = false;\n _root[childrenGeoDID] = childrenGeoDID;\n emit ChildrenRemoved(geoDIDId, childrenGeoDID);\n } else if (_owners[childrenGeoDID] != address(0) && !_hasParent[childrenGeoDID]){\n emit ChildrenErrorNoParent(geoDIDId, childrenGeoDID);\n } else {\n emit ChildrenErrorNoExistence(geoDIDId, childrenGeoDID);\n }\n }\n }\n\n emit SpatialAssetDeactivated(geoDIDId);\n }\n \n /**\n * @dev Sets a new URI for all the spatial asset types\n */\n function _setURI(string memory newuri) internal {\n _uri = newuri;\n }\n\n function idToOwner(bytes32 id) public view returns (address) {\n return _owners[id];\n }\n\n function idToCid(bytes32 id) public view returns (bytes32) {\n return _cids[id];\n }\n\n function idToCanBeParent(bytes32 id) public view returns (bool) {\n return _canBeParent[id];\n }\n\n function idToHasParent(bytes32 id) public view returns (bool) {\n return _hasParent[id];\n }\n\n function idToExternalStorage(bytes32 id) public view returns (bytes32) {\n return _externalStorage[id];\n }\n\n function allowedStorages(bytes32 offChainStorage) public view returns (bool) {\n return _allowedStorages[offChainStorage];\n }\n\n function uri() public view returns (string memory) {\n return _uri;\n }\n}\n", - "sourcePath": "/Users/jaredchilders/Astral/astralprotocol/packages/contracts/contracts/SpatialAssets.sol", - "ast": { - "absolutePath": "/Users/jaredchilders/Astral/astralprotocol/packages/contracts/contracts/SpatialAssets.sol", - "exportedSymbols": { - "SpatialAssets": [ - 1073 - ] - }, - "id": 1074, - "license": "APACHE OR MIT", - "nodeType": "SourceUnit", - "nodes": [ - { - "id": 58, - "literals": [ - "solidity", - "^", - "0.6", - ".0" - ], - "nodeType": "PragmaDirective", - "src": "42:23:1" - }, - { - "absolutePath": "@openzeppelin/contracts/access/AccessControl.sol", - "file": "@openzeppelin/contracts/access/AccessControl.sol", - "id": 59, - "nodeType": "ImportDirective", - "scope": 1074, - "sourceUnit": 1360, - "src": "67:58:1", - "symbolAliases": [], - "unitAlias": "" - }, - { - "absolutePath": "@openzeppelin/contracts/GSN/Context.sol", - "file": "@openzeppelin/contracts/GSN/Context.sol", - "id": 60, - "nodeType": "ImportDirective", - "scope": 1074, - "sourceUnit": 1077, - "src": "126:49:1", - "symbolAliases": [], - "unitAlias": "" - }, - { - "abstract": false, - "baseContracts": [ - { - "arguments": null, - "baseName": { - "contractScope": null, - "id": 62, - "name": "Context", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 1678, - "src": "565:7:1", - "typeDescriptions": { - "typeIdentifier": "t_contract$_Context_$1678", - "typeString": "contract Context" - } - }, - "id": 63, - "nodeType": "InheritanceSpecifier", - "src": "565:7:1" - }, - { - "arguments": null, - "baseName": { - "contractScope": null, - "id": 64, - "name": "AccessControl", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 1359, - "src": "574:13:1", - "typeDescriptions": { - "typeIdentifier": "t_contract$_AccessControl_$1359", - "typeString": "contract AccessControl" - } - }, - "id": 65, - "nodeType": "InheritanceSpecifier", - "src": "574:13:1" - } - ], - "contractDependencies": [ - 1359, - 1678 - ], - "contractKind": "contract", - "documentation": { - "id": 61, - "nodeType": "StructuredDocumentation", - "src": "177:361:1", - "text": " @dev {SpatialAssets} registry\n This contract uses {AccessControl} to lock permissioned functions using the\n different roles - head to its documentation for details.\n The account that deploys the contract will be granted the 'DATA_SUPPLIER' as well as the default admin role, which will let it grant\n 'DATA_SUPPLIER' roles to other accounts" - }, - "fullyImplemented": true, - "id": 1073, - "linearizedBaseContracts": [ - 1073, - 1359, - 1678 - ], - "name": "SpatialAssets", - "nodeType": "ContractDefinition", - "nodes": [ - { - "anonymous": false, - "documentation": { - "id": 66, - "nodeType": "StructuredDocumentation", - "src": "594:88:1", - "text": " @dev Emitted when Spatial Assets of id `id` are transferred to `to``." - }, - "id": 80, - "name": "SpatialAssetRegistered", - "nodeType": "EventDefinition", - "parameters": { - "id": 79, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 68, - "indexed": true, - "mutability": "mutable", - "name": "to", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 80, - "src": "716:18:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 67, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "716:7:1", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 70, - "indexed": true, - "mutability": "mutable", - "name": "geoDIDId", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 80, - "src": "736:24:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 69, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "736:7:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 72, - "indexed": true, - "mutability": "mutable", - "name": "cid", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 80, - "src": "762:19:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 71, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "762:7:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 74, - "indexed": false, - "mutability": "mutable", - "name": "offChainStorage", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 80, - "src": "783:23:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 73, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "783:7:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 76, - "indexed": false, - "mutability": "mutable", - "name": "root", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 80, - "src": "808:12:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 75, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "808:7:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 78, - "indexed": false, - "mutability": "mutable", - "name": "canBeParent", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 80, - "src": "822:16:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 77, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "822:4:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "715:124:1" - }, - "src": "687:153:1" - }, - { - "anonymous": false, - "documentation": { - "id": 81, - "nodeType": "StructuredDocumentation", - "src": "846:79:1", - "text": " @dev Emitted when Spatial Assets of id `id` are deactivated." - }, - "id": 85, - "name": "SpatialAssetDeactivated", - "nodeType": "EventDefinition", - "parameters": { - "id": 84, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 83, - "indexed": true, - "mutability": "mutable", - "name": "geoDIDId", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 85, - "src": "960:24:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 82, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "960:7:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "959:26:1" - }, - "src": "930:56:1" - }, - { - "anonymous": false, - "documentation": { - "id": 86, - "nodeType": "StructuredDocumentation", - "src": "992:71:1", - "text": " @dev Emitted when a parent geodid is added to a node" - }, - "id": 92, - "name": "ParentAdded", - "nodeType": "EventDefinition", - "parameters": { - "id": 91, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 88, - "indexed": true, - "mutability": "mutable", - "name": "geoDIDId", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 92, - "src": "1086:24:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 87, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "1086:7:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 90, - "indexed": true, - "mutability": "mutable", - "name": "parentGeoDIDId", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 92, - "src": "1112:30:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 89, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "1112:7:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1085:58:1" - }, - "src": "1068:76:1" - }, - { - "anonymous": false, - "documentation": { - "id": 93, - "nodeType": "StructuredDocumentation", - "src": "1150:73:1", - "text": " @dev Emitted when a children geodid is added to a node" - }, - "id": 99, - "name": "ChildrenAdded", - "nodeType": "EventDefinition", - "parameters": { - "id": 98, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 95, - "indexed": true, - "mutability": "mutable", - "name": "geoDIDId", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 99, - "src": "1248:24:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 94, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "1248:7:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 97, - "indexed": true, - "mutability": "mutable", - "name": "childrenGeoDIDId", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 99, - "src": "1274:32:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 96, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "1274:7:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1247:60:1" - }, - "src": "1228:80:1" - }, - { - "anonymous": false, - "documentation": { - "id": 100, - "nodeType": "StructuredDocumentation", - "src": "1314:75:1", - "text": " @dev Emitted when a parent geodid is removed from a node" - }, - "id": 106, - "name": "ParentRemoved", - "nodeType": "EventDefinition", - "parameters": { - "id": 105, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 102, - "indexed": true, - "mutability": "mutable", - "name": "geoDIDId", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 106, - "src": "1414:24:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 101, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "1414:7:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 104, - "indexed": true, - "mutability": "mutable", - "name": "parentGeoDIDId", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 106, - "src": "1440:30:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 103, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "1440:7:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1413:58:1" - }, - "src": "1394:78:1" - }, - { - "anonymous": false, - "documentation": { - "id": 107, - "nodeType": "StructuredDocumentation", - "src": "1478:77:1", - "text": " @dev Emitted when a children geodid is removed from a node" - }, - "id": 113, - "name": "ChildrenRemoved", - "nodeType": "EventDefinition", - "parameters": { - "id": 112, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 109, - "indexed": true, - "mutability": "mutable", - "name": "geoDIDId", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 113, - "src": "1582:24:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 108, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "1582:7:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 111, - "indexed": true, - "mutability": "mutable", - "name": "childrenGeoDIDId", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 113, - "src": "1608:32:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 110, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "1608:7:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1581:60:1" - }, - "src": "1560:82:1" - }, - { - "anonymous": false, - "documentation": { - "id": 114, - "nodeType": "StructuredDocumentation", - "src": "1653:116:1", - "text": " @dev Emitted when a children geodid does not have a parent when trying to remove it from a parent" - }, - "id": 120, - "name": "ChildrenErrorNoParent", - "nodeType": "EventDefinition", - "parameters": { - "id": 119, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 116, - "indexed": true, - "mutability": "mutable", - "name": "geoDIDId", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 120, - "src": "1802:24:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 115, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "1802:7:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 118, - "indexed": true, - "mutability": "mutable", - "name": "childrenGeoDIDId", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 120, - "src": "1828:32:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 117, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "1828:7:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1801:60:1" - }, - "src": "1774:88:1" - }, - { - "anonymous": false, - "documentation": { - "id": 121, - "nodeType": "StructuredDocumentation", - "src": "1873:69:1", - "text": " @dev Emitted when a children geodid does not exist" - }, - "id": 127, - "name": "ChildrenErrorNoExistence", - "nodeType": "EventDefinition", - "parameters": { - "id": 126, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 123, - "indexed": true, - "mutability": "mutable", - "name": "geoDIDId", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 127, - "src": "1978:24:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 122, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "1978:7:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 125, - "indexed": true, - "mutability": "mutable", - "name": "childrenGeoDIDId", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 127, - "src": "2004:32:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 124, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "2004:7:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1977:60:1" - }, - "src": "1947:91:1" - }, - { - "anonymous": false, - "documentation": { - "id": 128, - "nodeType": "StructuredDocumentation", - "src": "2049:94:1", - "text": " @dev Emitted when a children geodid already has a parent but shouldn't have" - }, - "id": 134, - "name": "ChildrenErrorHasParent", - "nodeType": "EventDefinition", - "parameters": { - "id": 133, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 130, - "indexed": true, - "mutability": "mutable", - "name": "geoDIDId", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 134, - "src": "2177:24:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 129, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "2177:7:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 132, - "indexed": true, - "mutability": "mutable", - "name": "childrenGeoDIDId", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 134, - "src": "2203:32:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 131, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "2203:7:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "2176:60:1" - }, - "src": "2148:89:1" - }, - { - "constant": true, - "functionSelector": "9969879b", - "id": 139, - "mutability": "constant", - "name": "DATA_SUPPLIER", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1073, - "src": "2244:66:1", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 135, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "2244:7:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "444154415f535550504c494552", - "id": 137, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2294:15:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_b90ec3213bc54b34738ca7ad785b7e6275742931f3ddfa147171c27090643f3f", - "typeString": "literal_string \"DATA_SUPPLIER\"" - }, - "value": "DATA_SUPPLIER" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_b90ec3213bc54b34738ca7ad785b7e6275742931f3ddfa147171c27090643f3f", - "typeString": "literal_string \"DATA_SUPPLIER\"" - } - ], - "id": 136, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -8, - "src": "2284:9:1", - "typeDescriptions": { - "typeIdentifier": "t_function_keccak256_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$", - "typeString": "function (bytes memory) pure returns (bytes32)" - } - }, - "id": 138, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2284:26:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "visibility": "public" - }, - { - "constant": false, - "id": 141, - "mutability": "mutable", - "name": "_uri", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1073, - "src": "2317:19:1", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_string_storage", - "typeString": "string" - }, - "typeName": { - "id": 140, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "2317:6:1", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "private" - }, - { - "constant": false, - "id": 145, - "mutability": "mutable", - "name": "_owners", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1073, - "src": "2386:44:1", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_bytes32_$_t_address_$", - "typeString": "mapping(bytes32 => address)" - }, - "typeName": { - "id": 144, - "keyType": { - "id": 142, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "2395:7:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "Mapping", - "src": "2386:28:1", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_bytes32_$_t_address_$", - "typeString": "mapping(bytes32 => address)" - }, - "valueType": { - "id": 143, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "2406:7:1", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - }, - "value": null, - "visibility": "private" - }, - { - "constant": false, - "id": 149, - "mutability": "mutable", - "name": "_cids", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1073, - "src": "2477:42:1", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_bytes32_$_t_bytes32_$", - "typeString": "mapping(bytes32 => bytes32)" - }, - "typeName": { - "id": 148, - "keyType": { - "id": 146, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "2486:7:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "Mapping", - "src": "2477:28:1", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_bytes32_$_t_bytes32_$", - "typeString": "mapping(bytes32 => bytes32)" - }, - "valueType": { - "id": 147, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "2497:7:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - } - }, - "value": null, - "visibility": "private" - }, - { - "constant": false, - "id": 153, - "mutability": "mutable", - "name": "_hasParent", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1073, - "src": "2576:44:1", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_bytes32_$_t_bool_$", - "typeString": "mapping(bytes32 => bool)" - }, - "typeName": { - "id": 152, - "keyType": { - "id": 150, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "2585:7:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "Mapping", - "src": "2576:25:1", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_bytes32_$_t_bool_$", - "typeString": "mapping(bytes32 => bool)" - }, - "valueType": { - "id": 151, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "2596:4:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - }, - "value": null, - "visibility": "private" - }, - { - "constant": false, - "id": 157, - "mutability": "mutable", - "name": "_canBeParent", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1073, - "src": "2675:46:1", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_bytes32_$_t_bool_$", - "typeString": "mapping(bytes32 => bool)" - }, - "typeName": { - "id": 156, - "keyType": { - "id": 154, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "2684:7:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "Mapping", - "src": "2675:25:1", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_bytes32_$_t_bool_$", - "typeString": "mapping(bytes32 => bool)" - }, - "valueType": { - "id": 155, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "2695:4:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - }, - "value": null, - "visibility": "private" - }, - { - "constant": false, - "id": 161, - "mutability": "mutable", - "name": "_root", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1073, - "src": "2776:42:1", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_bytes32_$_t_bytes32_$", - "typeString": "mapping(bytes32 => bytes32)" - }, - "typeName": { - "id": 160, - "keyType": { - "id": 158, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "2785:7:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "Mapping", - "src": "2776:28:1", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_bytes32_$_t_bytes32_$", - "typeString": "mapping(bytes32 => bytes32)" - }, - "valueType": { - "id": 159, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "2796:7:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - } - }, - "value": null, - "visibility": "private" - }, - { - "constant": false, - "id": 165, - "mutability": "mutable", - "name": "_externalStorage", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1073, - "src": "2882:53:1", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_bytes32_$_t_bytes32_$", - "typeString": "mapping(bytes32 => bytes32)" - }, - "typeName": { - "id": 164, - "keyType": { - "id": 162, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "2891:7:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "Mapping", - "src": "2882:28:1", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_bytes32_$_t_bytes32_$", - "typeString": "mapping(bytes32 => bytes32)" - }, - "valueType": { - "id": 163, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "2902:7:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - } - }, - "value": null, - "visibility": "private" - }, - { - "constant": false, - "id": 169, - "mutability": "mutable", - "name": "_allowedStorages", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1073, - "src": "2986:50:1", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_bytes32_$_t_bool_$", - "typeString": "mapping(bytes32 => bool)" - }, - "typeName": { - "id": 168, - "keyType": { - "id": 166, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "2995:7:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "Mapping", - "src": "2986:25:1", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_bytes32_$_t_bool_$", - "typeString": "mapping(bytes32 => bool)" - }, - "valueType": { - "id": 167, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "3006:4:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - }, - "value": null, - "visibility": "private" - }, - { - "body": { - "id": 191, - "nodeType": "Block", - "src": "3204:133:1", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 176, - "name": "uri", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 172, - "src": "3222:3:1", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - ], - "id": 175, - "name": "_setURI", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 992, - "src": "3214:7:1", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_string_memory_ptr_$returns$__$", - "typeString": "function (string memory)" - } - }, - "id": 177, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "3214:12:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 178, - "nodeType": "ExpressionStatement", - "src": "3214:12:1" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 180, - "name": "DEFAULT_ADMIN_ROLE", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1102, - "src": "3247:18:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 181, - "name": "_msgSender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1666, - "src": "3267:10:1", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_address_payable_$", - "typeString": "function () view returns (address payable)" - } - }, - "id": 182, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "3267:12:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - ], - "id": 179, - "name": "_setupRole", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1285, - "src": "3236:10:1", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_bytes32_$_t_address_$returns$__$", - "typeString": "function (bytes32,address)" - } - }, - "id": 183, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "3236:44:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 184, - "nodeType": "ExpressionStatement", - "src": "3236:44:1" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 186, - "name": "DATA_SUPPLIER", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 139, - "src": "3301:13:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 187, - "name": "_msgSender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1666, - "src": "3316:10:1", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_address_payable_$", - "typeString": "function () view returns (address payable)" - } - }, - "id": 188, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "3316:12:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - ], - "id": 185, - "name": "_setupRole", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1285, - "src": "3290:10:1", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_bytes32_$_t_address_$returns$__$", - "typeString": "function (bytes32,address)" - } - }, - "id": 189, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "3290:39:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 190, - "nodeType": "ExpressionStatement", - "src": "3290:39:1" - } - ] - }, - "documentation": { - "id": 170, - "nodeType": "StructuredDocumentation", - "src": "3044:117:1", - "text": " @dev Grants `DEFAULT_ADMIN_ROLE`, `DATA_SUPPLIER` to the account that\n deploys the contract." - }, - "id": 192, - "implemented": true, - "kind": "constructor", - "modifiers": [], - "name": "", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 173, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 172, - "mutability": "mutable", - "name": "uri", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 192, - "src": "3178:17:1", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 171, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "3178:6:1", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "3177:19:1" - }, - "returnParameters": { - "id": 174, - "nodeType": "ParameterList", - "parameters": [], - "src": "3204:0:1" - }, - "scope": 1073, - "src": "3166:171:1", - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "public" - }, - { - "body": { - "id": 212, - "nodeType": "Block", - "src": "3469:169:1", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 202, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "UnaryOperation", - "operator": "!", - "prefix": true, - "src": "3487:37:1", - "subExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 198, - "name": "DATA_SUPPLIER", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 139, - "src": "3496:13:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 199, - "name": "_msgSender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1666, - "src": "3511:10:1", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_address_payable_$", - "typeString": "function () view returns (address payable)" - } - }, - "id": 200, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "3511:12:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - ], - "id": 197, - "name": "hasRole", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1148, - "src": "3488:7:1", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_bytes32_$_t_address_$returns$_t_bool_$", - "typeString": "function (bytes32,address) view returns (bool)" - } - }, - "id": 201, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "3488:36:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "5370617469616c4173736574733a206d757374206e6f742068617665206120444154415f535550504c49455220726f6c6520796574", - "id": 203, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "3526:55:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_ad6e74c880a0a8789cc0999bb5807e042142eac3ba8cd1a8f038e7ac1c7b18f3", - "typeString": "literal_string \"SpatialAssets: must not have a DATA_SUPPLIER role yet\"" - }, - "value": "SpatialAssets: must not have a DATA_SUPPLIER role yet" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_ad6e74c880a0a8789cc0999bb5807e042142eac3ba8cd1a8f038e7ac1c7b18f3", - "typeString": "literal_string \"SpatialAssets: must not have a DATA_SUPPLIER role yet\"" - } - ], - "id": 196, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - -18, - -18 - ], - "referencedDeclaration": -18, - "src": "3479:7:1", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 204, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "3479:103:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 205, - "nodeType": "ExpressionStatement", - "src": "3479:103:1" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 207, - "name": "DATA_SUPPLIER", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 139, - "src": "3603:13:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 208, - "name": "_msgSender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1666, - "src": "3618:10:1", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_address_payable_$", - "typeString": "function () view returns (address payable)" - } - }, - "id": 209, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "3618:12:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - ], - "id": 206, - "name": "_setupRole", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1285, - "src": "3592:10:1", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_bytes32_$_t_address_$returns$__$", - "typeString": "function (bytes32,address)" - } - }, - "id": 210, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "3592:39:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 211, - "nodeType": "ExpressionStatement", - "src": "3592:39:1" - } - ] - }, - "documentation": { - "id": 193, - "nodeType": "StructuredDocumentation", - "src": "3343:90:1", - "text": " @dev Registers a new user with the ability to register a spatial asset." - }, - "functionSelector": "c44e96a0", - "id": 213, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "registerRole", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 194, - "nodeType": "ParameterList", - "parameters": [], - "src": "3459:2:1" - }, - "returnParameters": { - "id": 195, - "nodeType": "ParameterList", - "parameters": [], - "src": "3469:0:1" - }, - "scope": 1073, - "src": "3438:200:1", - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "public" - }, - { - "body": { - "id": 243, - "nodeType": "Block", - "src": "3792:299:1", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 221, - "name": "DEFAULT_ADMIN_ROLE", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1102, - "src": "3818:18:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 222, - "name": "_msgSender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1666, - "src": "3838:10:1", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_address_payable_$", - "typeString": "function () view returns (address payable)" - } - }, - "id": 223, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "3838:12:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - ], - "id": 220, - "name": "hasRole", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1148, - "src": "3810:7:1", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_bytes32_$_t_address_$returns$_t_bool_$", - "typeString": "function (bytes32,address) view returns (bool)" - } - }, - "id": 224, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "3810:41:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "5370617469616c4173736574733a206d75737420686176652061646d696e20726f6c6520746f206564697420616c6c6f776564206f6666636861696e2073746f7261676573", - "id": 225, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "3853:71:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_217cfcce26face481fde3359afaf9f2136dc9bfd5af0a63745f2341a24673a9f", - "typeString": "literal_string \"SpatialAssets: must have admin role to edit allowed offchain storages\"" - }, - "value": "SpatialAssets: must have admin role to edit allowed offchain storages" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_217cfcce26face481fde3359afaf9f2136dc9bfd5af0a63745f2341a24673a9f", - "typeString": "literal_string \"SpatialAssets: must have admin role to edit allowed offchain storages\"" - } - ], - "id": 219, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - -18, - -18 - ], - "referencedDeclaration": -18, - "src": "3802:7:1", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 226, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "3802:123:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 227, - "nodeType": "ExpressionStatement", - "src": "3802:123:1" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "id": 233, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 229, - "name": "_allowedStorages", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 169, - "src": "3943:16:1", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_bytes32_$_t_bool_$", - "typeString": "mapping(bytes32 => bool)" - } - }, - "id": 231, - "indexExpression": { - "argumentTypes": null, - "id": 230, - "name": "offChainStorage", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 216, - "src": "3960:15:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "3943:33:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "hexValue": "66616c7365", - "id": 232, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "3979:5:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "false" - }, - "src": "3943:41:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "5370617469616c4173736574733a2073746f72616765206d757374206e6f742062652061637469766520796574", - "id": 234, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "3986:47:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_8fee17d368687c80e4deac3f133d29733581706ec6213898eb6c5db439fb45d7", - "typeString": "literal_string \"SpatialAssets: storage must not be active yet\"" - }, - "value": "SpatialAssets: storage must not be active yet" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_8fee17d368687c80e4deac3f133d29733581706ec6213898eb6c5db439fb45d7", - "typeString": "literal_string \"SpatialAssets: storage must not be active yet\"" - } - ], - "id": 228, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - -18, - -18 - ], - "referencedDeclaration": -18, - "src": "3935:7:1", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 235, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "3935:99:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 236, - "nodeType": "ExpressionStatement", - "src": "3935:99:1" - }, - { - "expression": { - "argumentTypes": null, - "id": 241, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 237, - "name": "_allowedStorages", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 169, - "src": "4044:16:1", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_bytes32_$_t_bool_$", - "typeString": "mapping(bytes32 => bool)" - } - }, - "id": 239, - "indexExpression": { - "argumentTypes": null, - "id": 238, - "name": "offChainStorage", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 216, - "src": "4061:15:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "4044:33:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "hexValue": "74727565", - "id": 240, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "4080:4:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "src": "4044:40:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "id": 242, - "nodeType": "ExpressionStatement", - "src": "4044:40:1" - } - ] - }, - "documentation": { - "id": 214, - "nodeType": "StructuredDocumentation", - "src": "3644:88:1", - "text": " @dev Registers a new storage that can accept GeoDID document creation" - }, - "functionSelector": "6e7a6f4b", - "id": 244, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "enableStorage", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 217, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 216, - "mutability": "mutable", - "name": "offChainStorage", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 244, - "src": "3760:23:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 215, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "3760:7:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "3759:25:1" - }, - "returnParameters": { - "id": 218, - "nodeType": "ParameterList", - "parameters": [], - "src": "3792:0:1" - }, - "scope": 1073, - "src": "3737:354:1", - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "public" - }, - { - "body": { - "id": 265, - "nodeType": "Block", - "src": "4210:191:1", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 252, - "name": "DEFAULT_ADMIN_ROLE", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1102, - "src": "4236:18:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 253, - "name": "_msgSender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1666, - "src": "4256:10:1", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_address_payable_$", - "typeString": "function () view returns (address payable)" - } - }, - "id": 254, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "4256:12:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - ], - "id": 251, - "name": "hasRole", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1148, - "src": "4228:7:1", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_bytes32_$_t_address_$returns$_t_bool_$", - "typeString": "function (bytes32,address) view returns (bool)" - } - }, - "id": 255, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "4228:41:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "5370617469616c4173736574733a206d75737420686176652061646d696e20726f6c6520746f206564697420616c6c6f776564206f6666636861696e2073746f7261676573", - "id": 256, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "4271:71:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_217cfcce26face481fde3359afaf9f2136dc9bfd5af0a63745f2341a24673a9f", - "typeString": "literal_string \"SpatialAssets: must have admin role to edit allowed offchain storages\"" - }, - "value": "SpatialAssets: must have admin role to edit allowed offchain storages" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_217cfcce26face481fde3359afaf9f2136dc9bfd5af0a63745f2341a24673a9f", - "typeString": "literal_string \"SpatialAssets: must have admin role to edit allowed offchain storages\"" - } - ], - "id": 250, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - -18, - -18 - ], - "referencedDeclaration": -18, - "src": "4220:7:1", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 257, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "4220:123:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 258, - "nodeType": "ExpressionStatement", - "src": "4220:123:1" - }, - { - "expression": { - "argumentTypes": null, - "id": 263, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 259, - "name": "_allowedStorages", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 169, - "src": "4353:16:1", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_bytes32_$_t_bool_$", - "typeString": "mapping(bytes32 => bool)" - } - }, - "id": 261, - "indexExpression": { - "argumentTypes": null, - "id": 260, - "name": "offChainStorage", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 247, - "src": "4370:15:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "4353:33:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "hexValue": "66616c7365", - "id": 262, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "4389:5:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "false" - }, - "src": "4353:41:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "id": 264, - "nodeType": "ExpressionStatement", - "src": "4353:41:1" - } - ] - }, - "documentation": { - "id": 245, - "nodeType": "StructuredDocumentation", - "src": "4097:52:1", - "text": " @dev Disables an existing storage" - }, - "functionSelector": "fd52c0d5", - "id": 266, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "disableStorage", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 248, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 247, - "mutability": "mutable", - "name": "offChainStorage", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 266, - "src": "4178:23:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 246, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "4178:7:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "4177:25:1" - }, - "returnParameters": { - "id": 249, - "nodeType": "ParameterList", - "parameters": [], - "src": "4210:0:1" - }, - "scope": 1073, - "src": "4154:247:1", - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "public" - }, - { - "body": { - "id": 463, - "nodeType": "Block", - "src": "4767:1547:1", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 287, - "name": "DATA_SUPPLIER", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 139, - "src": "4793:13:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 288, - "name": "_msgSender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1666, - "src": "4808:10:1", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_address_payable_$", - "typeString": "function () view returns (address payable)" - } - }, - "id": 289, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "4808:12:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - ], - "id": 286, - "name": "hasRole", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1148, - "src": "4785:7:1", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_bytes32_$_t_address_$returns$_t_bool_$", - "typeString": "function (bytes32,address) view returns (bool)" - } - }, - "id": 290, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "4785:36:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "5370617469616c4173736574733a206d7573742068617665206461746120737570706c69657220726f6c6520746f207265676973746572", - "id": 291, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "4823:57:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_a63f9d7c89af474141c60ef50b69afc5ff92c5a8bca01ae8bf1ad58a8d517343", - "typeString": "literal_string \"SpatialAssets: must have data supplier role to register\"" - }, - "value": "SpatialAssets: must have data supplier role to register" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_a63f9d7c89af474141c60ef50b69afc5ff92c5a8bca01ae8bf1ad58a8d517343", - "typeString": "literal_string \"SpatialAssets: must have data supplier role to register\"" - } - ], - "id": 285, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - -18, - -18 - ], - "referencedDeclaration": -18, - "src": "4777:7:1", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 292, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "4777:104:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 293, - "nodeType": "ExpressionStatement", - "src": "4777:104:1" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 296, - "name": "offChainStorage", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 280, - "src": "4915:15:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - ], - "id": 295, - "name": "allowedStorages", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1064, - "src": "4899:15:1", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_bytes32_$returns$_t_bool_$", - "typeString": "function (bytes32) view returns (bool)" - } - }, - "id": 297, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "4899:32:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "5370617469616c4173736574733a2073746f72616765206d75737420626520616c6c6f776564", - "id": 298, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "4933:40:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_0ae99bd2d2bc928ba974a4c0584b94117dc577f73fe645d1eace2711f12192a2", - "typeString": "literal_string \"SpatialAssets: storage must be allowed\"" - }, - "value": "SpatialAssets: storage must be allowed" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_0ae99bd2d2bc928ba974a4c0584b94117dc577f73fe645d1eace2711f12192a2", - "typeString": "literal_string \"SpatialAssets: storage must be allowed\"" - } - ], - "id": 294, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - -18, - -18 - ], - "referencedDeclaration": -18, - "src": "4891:7:1", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 299, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "4891:83:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 300, - "nodeType": "ExpressionStatement", - "src": "4891:83:1" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 309, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 302, - "name": "_owners", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 145, - "src": "4992:7:1", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_bytes32_$_t_address_$", - "typeString": "mapping(bytes32 => address)" - } - }, - "id": 304, - "indexExpression": { - "argumentTypes": null, - "id": 303, - "name": "geoDIDId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 271, - "src": "5000:8:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "4992:17:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "30", - "id": 307, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "5021:1:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - } - ], - "id": 306, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "5013:7:1", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": { - "id": 305, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "5013:7:1", - "typeDescriptions": { - "typeIdentifier": null, - "typeString": null - } - } - }, - "id": 308, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "5013:10:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "src": "4992:31:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "5370617469616c4173736574733a206964206d757374206e6f74206861766520616e206f776e657220796574", - "id": 310, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "5025:46:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_a2ba2ebfc38e548fefdb3c30fe605533706b9d98e3015ed81adb67a22d6cd33c", - "typeString": "literal_string \"SpatialAssets: id must not have an owner yet\"" - }, - "value": "SpatialAssets: id must not have an owner yet" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_a2ba2ebfc38e548fefdb3c30fe605533706b9d98e3015ed81adb67a22d6cd33c", - "typeString": "literal_string \"SpatialAssets: id must not have an owner yet\"" - } - ], - "id": 301, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - -18, - -18 - ], - "referencedDeclaration": -18, - "src": "4984:7:1", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 311, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "4984:88:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 312, - "nodeType": "ExpressionStatement", - "src": "4984:88:1" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "id": 320, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 316, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 314, - "name": "geoDIDtype", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 282, - "src": "5090:10:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 315, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "5105:1:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "5090:16:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "BinaryOperation", - "operator": "||", - "rightExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 319, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 317, - "name": "geoDIDtype", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 282, - "src": "5110:10:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "hexValue": "31", - "id": 318, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "5124:1:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_1_by_1", - "typeString": "int_const 1" - }, - "value": "1" - }, - "src": "5110:15:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "src": "5090:35:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "5370617469616c204173736574733a2077726f6e672067656f64696474797065", - "id": 321, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "5127:34:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_e674447e79034d68bd1c7f2aa0a8d31190ad751eb2b878eced3a014448a54daa", - "typeString": "literal_string \"Spatial Assets: wrong geodidtype\"" - }, - "value": "Spatial Assets: wrong geodidtype" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_e674447e79034d68bd1c7f2aa0a8d31190ad751eb2b878eced3a014448a54daa", - "typeString": "literal_string \"Spatial Assets: wrong geodidtype\"" - } - ], - "id": 313, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - -18, - -18 - ], - "referencedDeclaration": -18, - "src": "5082:7:1", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 322, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "5082:80:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 323, - "nodeType": "ExpressionStatement", - "src": "5082:80:1" - }, - { - "expression": { - "argumentTypes": null, - "id": 328, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 324, - "name": "_cids", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 149, - "src": "5173:5:1", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_bytes32_$_t_bytes32_$", - "typeString": "mapping(bytes32 => bytes32)" - } - }, - "id": 326, - "indexExpression": { - "argumentTypes": null, - "id": 325, - "name": "geoDIDId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 271, - "src": "5179:8:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "5173:15:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 327, - "name": "cid", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 278, - "src": "5190:3:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "src": "5173:20:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "id": 329, - "nodeType": "ExpressionStatement", - "src": "5173:20:1" - }, - { - "expression": { - "argumentTypes": null, - "id": 334, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 330, - "name": "_owners", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 145, - "src": "5203:7:1", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_bytes32_$_t_address_$", - "typeString": "mapping(bytes32 => address)" - } - }, - "id": 332, - "indexExpression": { - "argumentTypes": null, - "id": 331, - "name": "geoDIDId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 271, - "src": "5211:8:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "5203:17:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 333, - "name": "owner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 269, - "src": "5223:5:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "5203:25:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 335, - "nodeType": "ExpressionStatement", - "src": "5203:25:1" - }, - { - "expression": { - "argumentTypes": null, - "id": 340, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 336, - "name": "_externalStorage", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 165, - "src": "5238:16:1", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_bytes32_$_t_bytes32_$", - "typeString": "mapping(bytes32 => bytes32)" - } - }, - "id": 338, - "indexExpression": { - "argumentTypes": null, - "id": 337, - "name": "geoDIDId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 271, - "src": "5255:8:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "5238:26:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 339, - "name": "offChainStorage", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 280, - "src": "5267:15:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "src": "5238:44:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "id": 341, - "nodeType": "ExpressionStatement", - "src": "5238:44:1" - }, - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 344, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 342, - "name": "geoDIDtype", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 282, - "src": "5297:10:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 343, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "5311:1:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "5297:15:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 354, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 352, - "name": "geoDIDtype", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 282, - "src": "5378:10:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "hexValue": "31", - "id": 353, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "5392:1:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_1_by_1", - "typeString": "int_const 1" - }, - "value": "1" - }, - "src": "5378:15:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 362, - "nodeType": "IfStatement", - "src": "5374:76:1", - "trueBody": { - "id": 361, - "nodeType": "Block", - "src": "5395:55:1", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 359, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 355, - "name": "_canBeParent", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 157, - "src": "5409:12:1", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_bytes32_$_t_bool_$", - "typeString": "mapping(bytes32 => bool)" - } - }, - "id": 357, - "indexExpression": { - "argumentTypes": null, - "id": 356, - "name": "geoDIDId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 271, - "src": "5422:8:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "5409:22:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "hexValue": "66616c7365", - "id": 358, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "5434:5:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "false" - }, - "src": "5409:30:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "id": 360, - "nodeType": "ExpressionStatement", - "src": "5409:30:1" - } - ] - } - }, - "id": 363, - "nodeType": "IfStatement", - "src": "5293:157:1", - "trueBody": { - "id": 351, - "nodeType": "Block", - "src": "5314:54:1", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 349, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 345, - "name": "_canBeParent", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 157, - "src": "5328:12:1", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_bytes32_$_t_bool_$", - "typeString": "mapping(bytes32 => bool)" - } - }, - "id": 347, - "indexExpression": { - "argumentTypes": null, - "id": 346, - "name": "geoDIDId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 271, - "src": "5341:8:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "5328:22:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "hexValue": "74727565", - "id": 348, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "5353:4:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "src": "5328:29:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "id": 350, - "nodeType": "ExpressionStatement", - "src": "5328:29:1" - } - ] - } - }, - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "id": 369, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 364, - "name": "parentGeoDIDId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 273, - "src": "5464:14:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "30", - "id": 367, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "5490:1:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - } - ], - "id": 366, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "5482:7:1", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_bytes32_$", - "typeString": "type(bytes32)" - }, - "typeName": { - "id": 365, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "5482:7:1", - "typeDescriptions": { - "typeIdentifier": null, - "typeString": null - } - } - }, - "id": 368, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "5482:10:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "src": "5464:28:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": { - "id": 418, - "nodeType": "Block", - "src": "5703:235:1", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 398, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 394, - "name": "_hasParent", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 153, - "src": "5717:10:1", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_bytes32_$_t_bool_$", - "typeString": "mapping(bytes32 => bool)" - } - }, - "id": 396, - "indexExpression": { - "argumentTypes": null, - "id": 395, - "name": "geoDIDId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 271, - "src": "5728:8:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "5717:20:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "hexValue": "74727565", - "id": 397, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "5740:4:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "src": "5717:27:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "id": 399, - "nodeType": "ExpressionStatement", - "src": "5717:27:1" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 401, - "name": "owner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 269, - "src": "5786:5:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 402, - "name": "geoDIDId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 271, - "src": "5793:8:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "id": 403, - "name": "cid", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 278, - "src": "5803:3:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "id": 404, - "name": "offChainStorage", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 280, - "src": "5808:15:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 405, - "name": "_root", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 161, - "src": "5825:5:1", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_bytes32_$_t_bytes32_$", - "typeString": "mapping(bytes32 => bytes32)" - } - }, - "id": 407, - "indexExpression": { - "argumentTypes": null, - "id": 406, - "name": "parentGeoDIDId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 273, - "src": "5831:14:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "5825:21:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 408, - "name": "_canBeParent", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 157, - "src": "5848:12:1", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_bytes32_$_t_bool_$", - "typeString": "mapping(bytes32 => bool)" - } - }, - "id": 410, - "indexExpression": { - "argumentTypes": null, - "id": 409, - "name": "geoDIDId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 271, - "src": "5861:8:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "5848:22:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - ], - "id": 400, - "name": "SpatialAssetRegistered", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 80, - "src": "5763:22:1", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_bytes32_$_t_bytes32_$_t_bytes32_$_t_bytes32_$_t_bool_$returns$__$", - "typeString": "function (address,bytes32,bytes32,bytes32,bytes32,bool)" - } - }, - "id": 411, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "5763:108:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 412, - "nodeType": "EmitStatement", - "src": "5758:113:1" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 414, - "name": "geoDIDId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 271, - "src": "5902:8:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "id": 415, - "name": "parentGeoDIDId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 273, - "src": "5912:14:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - ], - "id": 413, - "name": "ParentAdded", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 92, - "src": "5890:11:1", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_bytes32_$_t_bytes32_$returns$__$", - "typeString": "function (bytes32,bytes32)" - } - }, - "id": 416, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "5890:37:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 417, - "nodeType": "EmitStatement", - "src": "5885:42:1" - } - ] - }, - "id": 419, - "nodeType": "IfStatement", - "src": "5460:478:1", - "trueBody": { - "id": 393, - "nodeType": "Block", - "src": "5494:203:1", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 374, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 370, - "name": "_hasParent", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 153, - "src": "5508:10:1", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_bytes32_$_t_bool_$", - "typeString": "mapping(bytes32 => bool)" - } - }, - "id": 372, - "indexExpression": { - "argumentTypes": null, - "id": 371, - "name": "geoDIDId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 271, - "src": "5519:8:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "5508:20:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "hexValue": "66616c7365", - "id": 373, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "5531:5:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "false" - }, - "src": "5508:28:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "id": 375, - "nodeType": "ExpressionStatement", - "src": "5508:28:1" - }, - { - "expression": { - "argumentTypes": null, - "id": 380, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 376, - "name": "_root", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 161, - "src": "5550:5:1", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_bytes32_$_t_bytes32_$", - "typeString": "mapping(bytes32 => bytes32)" - } - }, - "id": 378, - "indexExpression": { - "argumentTypes": null, - "id": 377, - "name": "geoDIDId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 271, - "src": "5556:8:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "5550:15:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 379, - "name": "geoDIDId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 271, - "src": "5568:8:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "src": "5550:26:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "id": 381, - "nodeType": "ExpressionStatement", - "src": "5550:26:1" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 383, - "name": "owner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 269, - "src": "5614:5:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 384, - "name": "geoDIDId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 271, - "src": "5621:8:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "id": 385, - "name": "cid", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 278, - "src": "5631:3:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "id": 386, - "name": "offChainStorage", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 280, - "src": "5636:15:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "id": 387, - "name": "geoDIDId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 271, - "src": "5653:8:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 388, - "name": "_canBeParent", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 157, - "src": "5663:12:1", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_bytes32_$_t_bool_$", - "typeString": "mapping(bytes32 => bool)" - } - }, - "id": 390, - "indexExpression": { - "argumentTypes": null, - "id": 389, - "name": "geoDIDId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 271, - "src": "5676:8:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "5663:22:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - ], - "id": 382, - "name": "SpatialAssetRegistered", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 80, - "src": "5591:22:1", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_bytes32_$_t_bytes32_$_t_bytes32_$_t_bytes32_$_t_bool_$returns$__$", - "typeString": "function (address,bytes32,bytes32,bytes32,bytes32,bool)" - } - }, - "id": 391, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "5591:95:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 392, - "nodeType": "EmitStatement", - "src": "5586:100:1" - } - ] - } - }, - { - "assignments": [ - 421 - ], - "declarations": [ - { - "constant": false, - "id": 421, - "mutability": "mutable", - "name": "childrensLen", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 463, - "src": "5948:20:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 420, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "5948:7:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 424, - "initialValue": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 422, - "name": "childrenGeoDIDIds", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 276, - "src": "5971:17:1", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes32_$dyn_memory_ptr", - "typeString": "bytes32[] memory" - } - }, - "id": 423, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "length", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "5971:24:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "5948:47:1" - }, - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "id": 431, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 427, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 425, - "name": "childrensLen", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 421, - "src": "6010:12:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 426, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "6025:1:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "6010:16:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "BinaryOperation", - "operator": "&&", - "rightExpression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 428, - "name": "_canBeParent", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 157, - "src": "6030:12:1", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_bytes32_$_t_bool_$", - "typeString": "mapping(bytes32 => bool)" - } - }, - "id": 430, - "indexExpression": { - "argumentTypes": null, - "id": 429, - "name": "geoDIDId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 271, - "src": "6043:8:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "6030:22:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "src": "6010:42:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 462, - "nodeType": "IfStatement", - "src": "6006:302:1", - "trueBody": { - "id": 461, - "nodeType": "Block", - "src": "6053:255:1", - "statements": [ - { - "body": { - "id": 459, - "nodeType": "Block", - "src": "6107:191:1", - "statements": [ - { - "assignments": [ - 443 - ], - "declarations": [ - { - "constant": false, - "id": 443, - "mutability": "mutable", - "name": "childrenGeoDID", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 459, - "src": "6125:22:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 442, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "6125:7:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 447, - "initialValue": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 444, - "name": "childrenGeoDIDIds", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 276, - "src": "6150:17:1", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes32_$dyn_memory_ptr", - "typeString": "bytes32[] memory" - } - }, - "id": 446, - "indexExpression": { - "argumentTypes": null, - "id": 445, - "name": "j", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 433, - "src": "6168:1:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "6150:20:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "6125:45:1" - }, - { - "expression": { - "argumentTypes": null, - "id": 452, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 448, - "name": "_hasParent", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 153, - "src": "6188:10:1", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_bytes32_$_t_bool_$", - "typeString": "mapping(bytes32 => bool)" - } - }, - "id": 450, - "indexExpression": { - "argumentTypes": null, - "id": 449, - "name": "childrenGeoDID", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 443, - "src": "6199:14:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "6188:26:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "hexValue": "74727565", - "id": 451, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "6217:4:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "src": "6188:33:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "id": 453, - "nodeType": "ExpressionStatement", - "src": "6188:33:1" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 455, - "name": "geoDIDId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 271, - "src": "6258:8:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "id": 456, - "name": "childrenGeoDID", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 443, - "src": "6268:14:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - ], - "id": 454, - "name": "ChildrenAdded", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 99, - "src": "6244:13:1", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_bytes32_$_t_bytes32_$returns$__$", - "typeString": "function (bytes32,bytes32)" - } - }, - "id": 457, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "6244:39:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 458, - "nodeType": "EmitStatement", - "src": "6239:44:1" - } - ] - }, - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 438, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 436, - "name": "j", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 433, - "src": "6084:1:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<", - "rightExpression": { - "argumentTypes": null, - "id": 437, - "name": "childrensLen", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 421, - "src": "6088:12:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "6084:16:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "id": 460, - "initializationExpression": { - "assignments": [ - 433 - ], - "declarations": [ - { - "constant": false, - "id": 433, - "mutability": "mutable", - "name": "j", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 460, - "src": "6071:9:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 432, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "6071:7:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 435, - "initialValue": { - "argumentTypes": null, - "hexValue": "30", - "id": 434, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "6081:1:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "nodeType": "VariableDeclarationStatement", - "src": "6071:11:1" - }, - "loopExpression": { - "expression": { - "argumentTypes": null, - "id": 440, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "UnaryOperation", - "operator": "++", - "prefix": false, - "src": "6102:3:1", - "subExpression": { - "argumentTypes": null, - "id": 439, - "name": "j", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 433, - "src": "6102:1:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 441, - "nodeType": "ExpressionStatement", - "src": "6102:3:1" - }, - "nodeType": "ForStatement", - "src": "6067:231:1" - } - ] - } - } - ] - }, - "documentation": { - "id": 267, - "nodeType": "StructuredDocumentation", - "src": "4408:165:1", - "text": " @dev Registers one spatial asset with external storage 'data' and assigns them to `account`.\n Emits a {SpatialAssetRegistered} event." - }, - "functionSelector": "b22de880", - "id": 464, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "registerSpatialAsset", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 283, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 269, - "mutability": "mutable", - "name": "owner", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 464, - "src": "4608:13:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 268, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "4608:7:1", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 271, - "mutability": "mutable", - "name": "geoDIDId", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 464, - "src": "4623:16:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 270, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "4623:7:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 273, - "mutability": "mutable", - "name": "parentGeoDIDId", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 464, - "src": "4641:22:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 272, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "4641:7:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 276, - "mutability": "mutable", - "name": "childrenGeoDIDIds", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 464, - "src": "4666:34:1", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes32_$dyn_memory_ptr", - "typeString": "bytes32[]" - }, - "typeName": { - "baseType": { - "id": 274, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "4666:7:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "id": 275, - "length": null, - "nodeType": "ArrayTypeName", - "src": "4666:9:1", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes32_$dyn_storage_ptr", - "typeString": "bytes32[]" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 278, - "mutability": "mutable", - "name": "cid", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 464, - "src": "4702:11:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 277, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "4702:7:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 280, - "mutability": "mutable", - "name": "offChainStorage", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 464, - "src": "4715:23:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 279, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "4715:7:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 282, - "mutability": "mutable", - "name": "geoDIDtype", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 464, - "src": "4740:18:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 281, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "4740:7:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "4607:152:1" - }, - "returnParameters": { - "id": 284, - "nodeType": "ParameterList", - "parameters": [], - "src": "4767:0:1" - }, - "scope": 1073, - "src": "4578:1736:1", - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "public" - }, - { - "body": { - "id": 586, - "nodeType": "Block", - "src": "6535:1135:1", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 475, - "name": "DATA_SUPPLIER", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 139, - "src": "6561:13:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 476, - "name": "_msgSender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1666, - "src": "6576:10:1", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_address_payable_$", - "typeString": "function () view returns (address payable)" - } - }, - "id": 477, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "6576:12:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - ], - "id": 474, - "name": "hasRole", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1148, - "src": "6553:7:1", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_bytes32_$_t_address_$returns$_t_bool_$", - "typeString": "function (bytes32,address) view returns (bool)" - } - }, - "id": 478, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "6553:36:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "5370617469616c4173736574733a206d7573742068617665206461746120737570706c69657220726f6c6520746f207265676973746572", - "id": 479, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "6591:57:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_a63f9d7c89af474141c60ef50b69afc5ff92c5a8bca01ae8bf1ad58a8d517343", - "typeString": "literal_string \"SpatialAssets: must have data supplier role to register\"" - }, - "value": "SpatialAssets: must have data supplier role to register" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_a63f9d7c89af474141c60ef50b69afc5ff92c5a8bca01ae8bf1ad58a8d517343", - "typeString": "literal_string \"SpatialAssets: must have data supplier role to register\"" - } - ], - "id": 473, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - -18, - -18 - ], - "referencedDeclaration": -18, - "src": "6545:7:1", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 480, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "6545:104:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 481, - "nodeType": "ExpressionStatement", - "src": "6545:104:1" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 488, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 483, - "name": "_owners", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 145, - "src": "6667:7:1", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_bytes32_$_t_address_$", - "typeString": "mapping(bytes32 => address)" - } - }, - "id": 485, - "indexExpression": { - "argumentTypes": null, - "id": 484, - "name": "geoDIDId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 467, - "src": "6675:8:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "6667:17:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 486, - "name": "_msgSender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1666, - "src": "6688:10:1", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_address_payable_$", - "typeString": "function () view returns (address payable)" - } - }, - "id": 487, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "6688:12:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "src": "6667:33:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "5370617469616c4173736574733a2067656f4449444964206d757374206265206f776e6564206279206974732063726561746f72", - "id": 489, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "6702:54:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_141f85e6f52bf78350257a4ec10be89d97055fa340c7271b03e584c1efa8c841", - "typeString": "literal_string \"SpatialAssets: geoDIDId must be owned by its creator\"" - }, - "value": "SpatialAssets: geoDIDId must be owned by its creator" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_141f85e6f52bf78350257a4ec10be89d97055fa340c7271b03e584c1efa8c841", - "typeString": "literal_string \"SpatialAssets: geoDIDId must be owned by its creator\"" - } - ], - "id": 482, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - -18, - -18 - ], - "referencedDeclaration": -18, - "src": "6659:7:1", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 490, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "6659:98:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 491, - "nodeType": "ExpressionStatement", - "src": "6659:98:1" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 493, - "name": "_canBeParent", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 157, - "src": "6775:12:1", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_bytes32_$_t_bool_$", - "typeString": "mapping(bytes32 => bool)" - } - }, - "id": 495, - "indexExpression": { - "argumentTypes": null, - "id": 494, - "name": "geoDIDId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 467, - "src": "6788:8:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "6775:22:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "5370617469616c4173736574733a2067656f4449444964206d7573742062652061626c6520746f20626520706172656e7420286120436f6c6c656374696f6e29", - "id": 496, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "6799:66:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_35056da795db0b563126e5da17620c63bcd517d6bd90d17a597656966ba83aa1", - "typeString": "literal_string \"SpatialAssets: geoDIDId must be able to be parent (a Collection)\"" - }, - "value": "SpatialAssets: geoDIDId must be able to be parent (a Collection)" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_35056da795db0b563126e5da17620c63bcd517d6bd90d17a597656966ba83aa1", - "typeString": "literal_string \"SpatialAssets: geoDIDId must be able to be parent (a Collection)\"" - } - ], - "id": 492, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - -18, - -18 - ], - "referencedDeclaration": -18, - "src": "6767:7:1", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 497, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "6767:99:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 498, - "nodeType": "ExpressionStatement", - "src": "6767:99:1" - }, - { - "assignments": [ - 500 - ], - "declarations": [ - { - "constant": false, - "id": 500, - "mutability": "mutable", - "name": "childrensLen", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 586, - "src": "6877:20:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 499, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "6877:7:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 503, - "initialValue": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 501, - "name": "childrenGeoDIDIds", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 470, - "src": "6900:17:1", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes32_$dyn_memory_ptr", - "typeString": "bytes32[] memory" - } - }, - "id": 502, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "length", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "6900:24:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "6877:47:1" - }, - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 506, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 504, - "name": "childrensLen", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 500, - "src": "6939:12:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 505, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "6954:1:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "6939:16:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 585, - "nodeType": "IfStatement", - "src": "6935:729:1", - "trueBody": { - "id": 584, - "nodeType": "Block", - "src": "6956:708:1", - "statements": [ - { - "body": { - "id": 582, - "nodeType": "Block", - "src": "7010:644:1", - "statements": [ - { - "assignments": [ - 518 - ], - "declarations": [ - { - "constant": false, - "id": 518, - "mutability": "mutable", - "name": "childrenGeoDID", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 582, - "src": "7028:22:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 517, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "7028:7:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 522, - "initialValue": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 519, - "name": "childrenGeoDIDIds", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 470, - "src": "7053:17:1", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes32_$dyn_memory_ptr", - "typeString": "bytes32[] memory" - } - }, - "id": 521, - "indexExpression": { - "argumentTypes": null, - "id": 520, - "name": "j", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 508, - "src": "7071:1:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "7053:20:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "7028:45:1" - }, - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "id": 535, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 530, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 523, - "name": "_owners", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 145, - "src": "7095:7:1", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_bytes32_$_t_address_$", - "typeString": "mapping(bytes32 => address)" - } - }, - "id": 525, - "indexExpression": { - "argumentTypes": null, - "id": 524, - "name": "childrenGeoDID", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 518, - "src": "7103:14:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "7095:23:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "30", - "id": 528, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "7130:1:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - } - ], - "id": 527, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "7122:7:1", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": { - "id": 526, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "7122:7:1", - "typeDescriptions": { - "typeIdentifier": null, - "typeString": null - } - } - }, - "id": 529, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "7122:10:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "src": "7095:37:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "BinaryOperation", - "operator": "&&", - "rightExpression": { - "argumentTypes": null, - "id": 534, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "UnaryOperation", - "operator": "!", - "prefix": true, - "src": "7136:27:1", - "subExpression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 531, - "name": "_hasParent", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 153, - "src": "7137:10:1", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_bytes32_$_t_bool_$", - "typeString": "mapping(bytes32 => bool)" - } - }, - "id": 533, - "indexExpression": { - "argumentTypes": null, - "id": 532, - "name": "childrenGeoDID", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 518, - "src": "7148:14:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "7137:26:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "src": "7095:68:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "id": 567, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 563, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 556, - "name": "_owners", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 145, - "src": "7376:7:1", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_bytes32_$_t_address_$", - "typeString": "mapping(bytes32 => address)" - } - }, - "id": 558, - "indexExpression": { - "argumentTypes": null, - "id": 557, - "name": "childrenGeoDID", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 518, - "src": "7384:14:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "7376:23:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "30", - "id": 561, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "7411:1:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - } - ], - "id": 560, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "7403:7:1", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": { - "id": 559, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "7403:7:1", - "typeDescriptions": { - "typeIdentifier": null, - "typeString": null - } - } - }, - "id": 562, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "7403:10:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "src": "7376:37:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "BinaryOperation", - "operator": "&&", - "rightExpression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 564, - "name": "_hasParent", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 153, - "src": "7417:10:1", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_bytes32_$_t_bool_$", - "typeString": "mapping(bytes32 => bool)" - } - }, - "id": 566, - "indexExpression": { - "argumentTypes": null, - "id": 565, - "name": "childrenGeoDID", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 518, - "src": "7428:14:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "7417:26:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "src": "7376:67:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": { - "id": 579, - "nodeType": "Block", - "src": "7544:96:1", - "statements": [ - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 575, - "name": "geoDIDId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 467, - "src": "7596:8:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "id": 576, - "name": "childrenGeoDID", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 518, - "src": "7606:14:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - ], - "id": 574, - "name": "ChildrenErrorNoExistence", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 127, - "src": "7571:24:1", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_bytes32_$_t_bytes32_$returns$__$", - "typeString": "function (bytes32,bytes32)" - } - }, - "id": 577, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "7571:50:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 578, - "nodeType": "EmitStatement", - "src": "7566:55:1" - } - ] - }, - "id": 580, - "nodeType": "IfStatement", - "src": "7372:268:1", - "trueBody": { - "id": 573, - "nodeType": "Block", - "src": "7444:94:1", - "statements": [ - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 569, - "name": "geoDIDId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 467, - "src": "7494:8:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "id": 570, - "name": "childrenGeoDID", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 518, - "src": "7504:14:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - ], - "id": 568, - "name": "ChildrenErrorHasParent", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 134, - "src": "7471:22:1", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_bytes32_$_t_bytes32_$returns$__$", - "typeString": "function (bytes32,bytes32)" - } - }, - "id": 571, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "7471:48:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 572, - "nodeType": "EmitStatement", - "src": "7466:53:1" - } - ] - } - }, - "id": 581, - "nodeType": "IfStatement", - "src": "7091:549:1", - "trueBody": { - "id": 555, - "nodeType": "Block", - "src": "7165:201:1", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 540, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 536, - "name": "_hasParent", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 153, - "src": "7187:10:1", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_bytes32_$_t_bool_$", - "typeString": "mapping(bytes32 => bool)" - } - }, - "id": 538, - "indexExpression": { - "argumentTypes": null, - "id": 537, - "name": "childrenGeoDID", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 518, - "src": "7198:14:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "7187:26:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "hexValue": "74727565", - "id": 539, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "7216:4:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "src": "7187:33:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "id": 541, - "nodeType": "ExpressionStatement", - "src": "7187:33:1" - }, - { - "expression": { - "argumentTypes": null, - "id": 548, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 542, - "name": "_root", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 161, - "src": "7242:5:1", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_bytes32_$_t_bytes32_$", - "typeString": "mapping(bytes32 => bytes32)" - } - }, - "id": 544, - "indexExpression": { - "argumentTypes": null, - "id": 543, - "name": "childrenGeoDID", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 518, - "src": "7248:14:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "7242:21:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 545, - "name": "_root", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 161, - "src": "7266:5:1", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_bytes32_$_t_bytes32_$", - "typeString": "mapping(bytes32 => bytes32)" - } - }, - "id": 547, - "indexExpression": { - "argumentTypes": null, - "id": 546, - "name": "geoDIDId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 467, - "src": "7272:8:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "7266:15:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "src": "7242:39:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "id": 549, - "nodeType": "ExpressionStatement", - "src": "7242:39:1" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 551, - "name": "geoDIDId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 467, - "src": "7322:8:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "id": 552, - "name": "childrenGeoDID", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 518, - "src": "7332:14:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - ], - "id": 550, - "name": "ChildrenAdded", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 99, - "src": "7308:13:1", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_bytes32_$_t_bytes32_$returns$__$", - "typeString": "function (bytes32,bytes32)" - } - }, - "id": 553, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "7308:39:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 554, - "nodeType": "EmitStatement", - "src": "7303:44:1" - } - ] - } - } - ] - }, - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 513, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 511, - "name": "j", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 508, - "src": "6987:1:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<", - "rightExpression": { - "argumentTypes": null, - "id": 512, - "name": "childrensLen", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 500, - "src": "6991:12:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "6987:16:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "id": 583, - "initializationExpression": { - "assignments": [ - 508 - ], - "declarations": [ - { - "constant": false, - "id": 508, - "mutability": "mutable", - "name": "j", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 583, - "src": "6974:9:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 507, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "6974:7:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 510, - "initialValue": { - "argumentTypes": null, - "hexValue": "30", - "id": 509, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "6984:1:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "nodeType": "VariableDeclarationStatement", - "src": "6974:11:1" - }, - "loopExpression": { - "expression": { - "argumentTypes": null, - "id": 515, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "UnaryOperation", - "operator": "++", - "prefix": false, - "src": "7005:3:1", - "subExpression": { - "argumentTypes": null, - "id": 514, - "name": "j", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 508, - "src": "7005:1:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 516, - "nodeType": "ExpressionStatement", - "src": "7005:3:1" - }, - "nodeType": "ForStatement", - "src": "6970:684:1" - } - ] - } - } - ] - }, - "documentation": { - "id": 465, - "nodeType": "StructuredDocumentation", - "src": "6321:120:1", - "text": " @dev Adds children GeoDIDs to an already existent geoDID\n Emits a {ChildrenAdded} event." - }, - "functionSelector": "bdabcf63", - "id": 587, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "addChildrenGeoDIDs", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 471, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 467, - "mutability": "mutable", - "name": "geoDIDId", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 587, - "src": "6474:16:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 466, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "6474:7:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 470, - "mutability": "mutable", - "name": "childrenGeoDIDIds", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 587, - "src": "6492:34:1", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes32_$dyn_memory_ptr", - "typeString": "bytes32[]" - }, - "typeName": { - "baseType": { - "id": 468, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "6492:7:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "id": 469, - "length": null, - "nodeType": "ArrayTypeName", - "src": "6492:9:1", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes32_$dyn_storage_ptr", - "typeString": "bytes32[]" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "6473:54:1" - }, - "returnParameters": { - "id": 472, - "nodeType": "ParameterList", - "parameters": [], - "src": "6535:0:1" - }, - "scope": 1073, - "src": "6446:1224:1", - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "public" - }, - { - "body": { - "id": 660, - "nodeType": "Block", - "src": "7872:681:1", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 597, - "name": "DATA_SUPPLIER", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 139, - "src": "7898:13:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 598, - "name": "_msgSender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1666, - "src": "7913:10:1", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_address_payable_$", - "typeString": "function () view returns (address payable)" - } - }, - "id": 599, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "7913:12:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - ], - "id": 596, - "name": "hasRole", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1148, - "src": "7890:7:1", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_bytes32_$_t_address_$returns$_t_bool_$", - "typeString": "function (bytes32,address) view returns (bool)" - } - }, - "id": 600, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "7890:36:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "5370617469616c4173736574733a206d7573742068617665206461746120737570706c69657220726f6c6520746f207265676973746572", - "id": 601, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "7928:57:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_a63f9d7c89af474141c60ef50b69afc5ff92c5a8bca01ae8bf1ad58a8d517343", - "typeString": "literal_string \"SpatialAssets: must have data supplier role to register\"" - }, - "value": "SpatialAssets: must have data supplier role to register" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_a63f9d7c89af474141c60ef50b69afc5ff92c5a8bca01ae8bf1ad58a8d517343", - "typeString": "literal_string \"SpatialAssets: must have data supplier role to register\"" - } - ], - "id": 595, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - -18, - -18 - ], - "referencedDeclaration": -18, - "src": "7882:7:1", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 602, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "7882:104:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 603, - "nodeType": "ExpressionStatement", - "src": "7882:104:1" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 610, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 605, - "name": "_owners", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 145, - "src": "8004:7:1", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_bytes32_$_t_address_$", - "typeString": "mapping(bytes32 => address)" - } - }, - "id": 607, - "indexExpression": { - "argumentTypes": null, - "id": 606, - "name": "geoDIDId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 590, - "src": "8012:8:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "8004:17:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 608, - "name": "_msgSender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1666, - "src": "8025:10:1", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_address_payable_$", - "typeString": "function () view returns (address payable)" - } - }, - "id": 609, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "8025:12:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "src": "8004:33:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "5370617469616c4173736574733a2067656f4449444964206d757374206265206f776e6564206279206974732063726561746f72", - "id": 611, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "8039:54:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_141f85e6f52bf78350257a4ec10be89d97055fa340c7271b03e584c1efa8c841", - "typeString": "literal_string \"SpatialAssets: geoDIDId must be owned by its creator\"" - }, - "value": "SpatialAssets: geoDIDId must be owned by its creator" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_141f85e6f52bf78350257a4ec10be89d97055fa340c7271b03e584c1efa8c841", - "typeString": "literal_string \"SpatialAssets: geoDIDId must be owned by its creator\"" - } - ], - "id": 604, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - -18, - -18 - ], - "referencedDeclaration": -18, - "src": "7996:7:1", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 612, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "7996:98:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 613, - "nodeType": "ExpressionStatement", - "src": "7996:98:1" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 622, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 615, - "name": "_owners", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 145, - "src": "8112:7:1", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_bytes32_$_t_address_$", - "typeString": "mapping(bytes32 => address)" - } - }, - "id": 617, - "indexExpression": { - "argumentTypes": null, - "id": 616, - "name": "parentGeoDIDId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 592, - "src": "8120:14:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "8112:23:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "30", - "id": 620, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "8147:1:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - } - ], - "id": 619, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "8139:7:1", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": { - "id": 618, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "8139:7:1", - "typeDescriptions": { - "typeIdentifier": null, - "typeString": null - } - } - }, - "id": 621, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "8139:10:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "src": "8112:37:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "5370617469616c4173736574733a20706172656e7447656f444944496420646f6573206e6f74206578697374", - "id": 623, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "8151:46:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_37628363356dfe049fe1dfb95b31ae659423f88203c2d0589d12bc6e2efba5fb", - "typeString": "literal_string \"SpatialAssets: parentGeoDIDId does not exist\"" - }, - "value": "SpatialAssets: parentGeoDIDId does not exist" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_37628363356dfe049fe1dfb95b31ae659423f88203c2d0589d12bc6e2efba5fb", - "typeString": "literal_string \"SpatialAssets: parentGeoDIDId does not exist\"" - } - ], - "id": 614, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - -18, - -18 - ], - "referencedDeclaration": -18, - "src": "8104:7:1", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 624, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "8104:94:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 625, - "nodeType": "ExpressionStatement", - "src": "8104:94:1" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 630, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "UnaryOperation", - "operator": "!", - "prefix": true, - "src": "8216:21:1", - "subExpression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 627, - "name": "_hasParent", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 153, - "src": "8217:10:1", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_bytes32_$_t_bool_$", - "typeString": "mapping(bytes32 => bool)" - } - }, - "id": 629, - "indexExpression": { - "argumentTypes": null, - "id": 628, - "name": "geoDIDId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 590, - "src": "8228:8:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "8217:20:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "5370617469616c4173736574733a2067656f444944496420616c726561647920686173206120706172656e74", - "id": 631, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "8239:46:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_365c191fc2e3b7185ac24986ce31e56094d1588c72dcea7a382fe58e00565569", - "typeString": "literal_string \"SpatialAssets: geoDIDId already has a parent\"" - }, - "value": "SpatialAssets: geoDIDId already has a parent" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_365c191fc2e3b7185ac24986ce31e56094d1588c72dcea7a382fe58e00565569", - "typeString": "literal_string \"SpatialAssets: geoDIDId already has a parent\"" - } - ], - "id": 626, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - -18, - -18 - ], - "referencedDeclaration": -18, - "src": "8208:7:1", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 632, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "8208:78:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 633, - "nodeType": "ExpressionStatement", - "src": "8208:78:1" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 635, - "name": "_canBeParent", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 157, - "src": "8304:12:1", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_bytes32_$_t_bool_$", - "typeString": "mapping(bytes32 => bool)" - } - }, - "id": 637, - "indexExpression": { - "argumentTypes": null, - "id": 636, - "name": "parentGeoDIDId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 592, - "src": "8317:14:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "8304:28:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "5370617469616c4173736574733a20706172656e7447656f4449444964206d7573742062652061626c6520746f20626520706172656e7420286120436f6c6c656374696f6e29", - "id": 638, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "8334:72:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_2fc4c9e1419e4474d6293c8f8fe90b0fca69366a562a1be7a551c73fee1d2c1d", - "typeString": "literal_string \"SpatialAssets: parentGeoDIDId must be able to be parent (a Collection)\"" - }, - "value": "SpatialAssets: parentGeoDIDId must be able to be parent (a Collection)" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_2fc4c9e1419e4474d6293c8f8fe90b0fca69366a562a1be7a551c73fee1d2c1d", - "typeString": "literal_string \"SpatialAssets: parentGeoDIDId must be able to be parent (a Collection)\"" - } - ], - "id": 634, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - -18, - -18 - ], - "referencedDeclaration": -18, - "src": "8296:7:1", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 639, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "8296:111:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 640, - "nodeType": "ExpressionStatement", - "src": "8296:111:1" - }, - { - "expression": { - "argumentTypes": null, - "id": 645, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 641, - "name": "_hasParent", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 153, - "src": "8418:10:1", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_bytes32_$_t_bool_$", - "typeString": "mapping(bytes32 => bool)" - } - }, - "id": 643, - "indexExpression": { - "argumentTypes": null, - "id": 642, - "name": "geoDIDId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 590, - "src": "8429:8:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "8418:20:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "hexValue": "74727565", - "id": 644, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "8441:4:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "src": "8418:27:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "id": 646, - "nodeType": "ExpressionStatement", - "src": "8418:27:1" - }, - { - "expression": { - "argumentTypes": null, - "id": 653, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 647, - "name": "_root", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 161, - "src": "8455:5:1", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_bytes32_$_t_bytes32_$", - "typeString": "mapping(bytes32 => bytes32)" - } - }, - "id": 649, - "indexExpression": { - "argumentTypes": null, - "id": 648, - "name": "geoDIDId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 590, - "src": "8461:8:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "8455:15:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 650, - "name": "_root", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 161, - "src": "8473:5:1", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_bytes32_$_t_bytes32_$", - "typeString": "mapping(bytes32 => bytes32)" - } - }, - "id": 652, - "indexExpression": { - "argumentTypes": null, - "id": 651, - "name": "parentGeoDIDId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 592, - "src": "8479:14:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "8473:21:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "src": "8455:39:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "id": 654, - "nodeType": "ExpressionStatement", - "src": "8455:39:1" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 656, - "name": "geoDIDId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 590, - "src": "8521:8:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "id": 657, - "name": "parentGeoDIDId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 592, - "src": "8531:14:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - ], - "id": 655, - "name": "ParentAdded", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 92, - "src": "8509:11:1", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_bytes32_$_t_bytes32_$returns$__$", - "typeString": "function (bytes32,bytes32)" - } - }, - "id": 658, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "8509:37:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 659, - "nodeType": "EmitStatement", - "src": "8504:42:1" - } - ] - }, - "documentation": { - "id": 588, - "nodeType": "StructuredDocumentation", - "src": "7676:117:1", - "text": " @dev Adds a parent GeoDID to an already existent geoDID\n Emits a {ParentAdded} event." - }, - "functionSelector": "f999be89", - "id": 661, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "addParentGeoDID", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 593, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 590, - "mutability": "mutable", - "name": "geoDIDId", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 661, - "src": "7823:16:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 589, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "7823:7:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 592, - "mutability": "mutable", - "name": "parentGeoDIDId", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 661, - "src": "7841:22:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 591, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "7841:7:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "7822:42:1" - }, - "returnParameters": { - "id": 594, - "nodeType": "ParameterList", - "parameters": [], - "src": "7872:0:1" - }, - "scope": 1073, - "src": "7798:755:1", - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "public" - }, - { - "body": { - "id": 774, - "nodeType": "Block", - "src": "8769:1019:1", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 672, - "name": "DATA_SUPPLIER", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 139, - "src": "8795:13:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 673, - "name": "_msgSender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1666, - "src": "8810:10:1", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_address_payable_$", - "typeString": "function () view returns (address payable)" - } - }, - "id": 674, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "8810:12:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - ], - "id": 671, - "name": "hasRole", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1148, - "src": "8787:7:1", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_bytes32_$_t_address_$returns$_t_bool_$", - "typeString": "function (bytes32,address) view returns (bool)" - } - }, - "id": 675, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "8787:36:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "5370617469616c4173736574733a206d7573742068617665206461746120737570706c69657220726f6c6520746f207265676973746572", - "id": 676, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "8825:57:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_a63f9d7c89af474141c60ef50b69afc5ff92c5a8bca01ae8bf1ad58a8d517343", - "typeString": "literal_string \"SpatialAssets: must have data supplier role to register\"" - }, - "value": "SpatialAssets: must have data supplier role to register" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_a63f9d7c89af474141c60ef50b69afc5ff92c5a8bca01ae8bf1ad58a8d517343", - "typeString": "literal_string \"SpatialAssets: must have data supplier role to register\"" - } - ], - "id": 670, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - -18, - -18 - ], - "referencedDeclaration": -18, - "src": "8779:7:1", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 677, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "8779:104:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 678, - "nodeType": "ExpressionStatement", - "src": "8779:104:1" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 685, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 680, - "name": "_owners", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 145, - "src": "8901:7:1", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_bytes32_$_t_address_$", - "typeString": "mapping(bytes32 => address)" - } - }, - "id": 682, - "indexExpression": { - "argumentTypes": null, - "id": 681, - "name": "geoDIDId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 664, - "src": "8909:8:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "8901:17:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 683, - "name": "_msgSender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1666, - "src": "8922:10:1", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_address_payable_$", - "typeString": "function () view returns (address payable)" - } - }, - "id": 684, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "8922:12:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "src": "8901:33:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "5370617469616c4173736574733a206964206d757374206e6f74206861766520616e206f776e657220796574", - "id": 686, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "8936:46:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_a2ba2ebfc38e548fefdb3c30fe605533706b9d98e3015ed81adb67a22d6cd33c", - "typeString": "literal_string \"SpatialAssets: id must not have an owner yet\"" - }, - "value": "SpatialAssets: id must not have an owner yet" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_a2ba2ebfc38e548fefdb3c30fe605533706b9d98e3015ed81adb67a22d6cd33c", - "typeString": "literal_string \"SpatialAssets: id must not have an owner yet\"" - } - ], - "id": 679, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - -18, - -18 - ], - "referencedDeclaration": -18, - "src": "8893:7:1", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 687, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "8893:90:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 688, - "nodeType": "ExpressionStatement", - "src": "8893:90:1" - }, - { - "assignments": [ - 690 - ], - "declarations": [ - { - "constant": false, - "id": 690, - "mutability": "mutable", - "name": "childrensLen", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 774, - "src": "8994:20:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 689, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "8994:7:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 693, - "initialValue": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 691, - "name": "childrenGeoDIDIds", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 667, - "src": "9017:17:1", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes32_$dyn_memory_ptr", - "typeString": "bytes32[] memory" - } - }, - "id": 692, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "length", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "9017:24:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "8994:47:1" - }, - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 696, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 694, - "name": "childrensLen", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 690, - "src": "9056:12:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 695, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "9071:1:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "9056:16:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 773, - "nodeType": "IfStatement", - "src": "9052:730:1", - "trueBody": { - "id": 772, - "nodeType": "Block", - "src": "9073:709:1", - "statements": [ - { - "body": { - "id": 770, - "nodeType": "Block", - "src": "9127:645:1", - "statements": [ - { - "assignments": [ - 708 - ], - "declarations": [ - { - "constant": false, - "id": 708, - "mutability": "mutable", - "name": "childrenGeoDID", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 770, - "src": "9145:22:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 707, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "9145:7:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 712, - "initialValue": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 709, - "name": "childrenGeoDIDIds", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 667, - "src": "9170:17:1", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes32_$dyn_memory_ptr", - "typeString": "bytes32[] memory" - } - }, - "id": 711, - "indexExpression": { - "argumentTypes": null, - "id": 710, - "name": "j", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 698, - "src": "9188:1:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "9170:20:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "9145:45:1" - }, - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "id": 724, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 720, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 713, - "name": "_owners", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 145, - "src": "9212:7:1", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_bytes32_$_t_address_$", - "typeString": "mapping(bytes32 => address)" - } - }, - "id": 715, - "indexExpression": { - "argumentTypes": null, - "id": 714, - "name": "childrenGeoDID", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 708, - "src": "9220:14:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "9212:23:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "30", - "id": 718, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "9247:1:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - } - ], - "id": 717, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "9239:7:1", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": { - "id": 716, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "9239:7:1", - "typeDescriptions": { - "typeIdentifier": null, - "typeString": null - } - } - }, - "id": 719, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9239:10:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "src": "9212:37:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "BinaryOperation", - "operator": "&&", - "rightExpression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 721, - "name": "_hasParent", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 153, - "src": "9253:10:1", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_bytes32_$_t_bool_$", - "typeString": "mapping(bytes32 => bool)" - } - }, - "id": 723, - "indexExpression": { - "argumentTypes": null, - "id": 722, - "name": "childrenGeoDID", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 708, - "src": "9264:14:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "9253:26:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "src": "9212:67:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "id": 755, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 750, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 743, - "name": "_owners", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 145, - "src": "9494:7:1", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_bytes32_$_t_address_$", - "typeString": "mapping(bytes32 => address)" - } - }, - "id": 745, - "indexExpression": { - "argumentTypes": null, - "id": 744, - "name": "childrenGeoDID", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 708, - "src": "9502:14:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "9494:23:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "30", - "id": 748, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "9529:1:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - } - ], - "id": 747, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "9521:7:1", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": { - "id": 746, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "9521:7:1", - "typeDescriptions": { - "typeIdentifier": null, - "typeString": null - } - } - }, - "id": 749, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9521:10:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "src": "9494:37:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "BinaryOperation", - "operator": "&&", - "rightExpression": { - "argumentTypes": null, - "id": 754, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "UnaryOperation", - "operator": "!", - "prefix": true, - "src": "9535:27:1", - "subExpression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 751, - "name": "_hasParent", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 153, - "src": "9536:10:1", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_bytes32_$_t_bool_$", - "typeString": "mapping(bytes32 => bool)" - } - }, - "id": 753, - "indexExpression": { - "argumentTypes": null, - "id": 752, - "name": "childrenGeoDID", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 708, - "src": "9547:14:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "9536:26:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "src": "9494:68:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": { - "id": 767, - "nodeType": "Block", - "src": "9662:96:1", - "statements": [ - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 763, - "name": "geoDIDId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 664, - "src": "9714:8:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "id": 764, - "name": "childrenGeoDID", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 708, - "src": "9724:14:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - ], - "id": 762, - "name": "ChildrenErrorNoExistence", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 127, - "src": "9689:24:1", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_bytes32_$_t_bytes32_$returns$__$", - "typeString": "function (bytes32,bytes32)" - } - }, - "id": 765, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9689:50:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 766, - "nodeType": "EmitStatement", - "src": "9684:55:1" - } - ] - }, - "id": 768, - "nodeType": "IfStatement", - "src": "9490:268:1", - "trueBody": { - "id": 761, - "nodeType": "Block", - "src": "9563:93:1", - "statements": [ - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 757, - "name": "geoDIDId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 664, - "src": "9612:8:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "id": 758, - "name": "childrenGeoDID", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 708, - "src": "9622:14:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - ], - "id": 756, - "name": "ChildrenErrorNoParent", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 120, - "src": "9590:21:1", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_bytes32_$_t_bytes32_$returns$__$", - "typeString": "function (bytes32,bytes32)" - } - }, - "id": 759, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9590:47:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 760, - "nodeType": "EmitStatement", - "src": "9585:52:1" - } - ] - } - }, - "id": 769, - "nodeType": "IfStatement", - "src": "9208:550:1", - "trueBody": { - "id": 742, - "nodeType": "Block", - "src": "9281:203:1", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 729, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 725, - "name": "_hasParent", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 153, - "src": "9303:10:1", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_bytes32_$_t_bool_$", - "typeString": "mapping(bytes32 => bool)" - } - }, - "id": 727, - "indexExpression": { - "argumentTypes": null, - "id": 726, - "name": "childrenGeoDID", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 708, - "src": "9314:14:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "9303:26:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "hexValue": "66616c7365", - "id": 728, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "9332:5:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "false" - }, - "src": "9303:34:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "id": 730, - "nodeType": "ExpressionStatement", - "src": "9303:34:1" - }, - { - "expression": { - "argumentTypes": null, - "id": 735, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 731, - "name": "_root", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 161, - "src": "9359:5:1", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_bytes32_$_t_bytes32_$", - "typeString": "mapping(bytes32 => bytes32)" - } - }, - "id": 733, - "indexExpression": { - "argumentTypes": null, - "id": 732, - "name": "childrenGeoDID", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 708, - "src": "9365:14:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "9359:21:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 734, - "name": "childrenGeoDID", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 708, - "src": "9383:14:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "src": "9359:38:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "id": 736, - "nodeType": "ExpressionStatement", - "src": "9359:38:1" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 738, - "name": "geoDIDId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 664, - "src": "9440:8:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "id": 739, - "name": "childrenGeoDID", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 708, - "src": "9450:14:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - ], - "id": 737, - "name": "ChildrenRemoved", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 113, - "src": "9424:15:1", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_bytes32_$_t_bytes32_$returns$__$", - "typeString": "function (bytes32,bytes32)" - } - }, - "id": 740, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9424:41:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 741, - "nodeType": "EmitStatement", - "src": "9419:46:1" - } - ] - } - } - ] - }, - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 703, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 701, - "name": "j", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 698, - "src": "9104:1:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<", - "rightExpression": { - "argumentTypes": null, - "id": 702, - "name": "childrensLen", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 690, - "src": "9108:12:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "9104:16:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "id": 771, - "initializationExpression": { - "assignments": [ - 698 - ], - "declarations": [ - { - "constant": false, - "id": 698, - "mutability": "mutable", - "name": "j", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 771, - "src": "9091:9:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 697, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "9091:7:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 700, - "initialValue": { - "argumentTypes": null, - "hexValue": "30", - "id": 699, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "9101:1:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "nodeType": "VariableDeclarationStatement", - "src": "9091:11:1" - }, - "loopExpression": { - "expression": { - "argumentTypes": null, - "id": 705, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "UnaryOperation", - "operator": "++", - "prefix": false, - "src": "9122:3:1", - "subExpression": { - "argumentTypes": null, - "id": 704, - "name": "j", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 698, - "src": "9122:1:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 706, - "nodeType": "ExpressionStatement", - "src": "9122:3:1" - }, - "nodeType": "ForStatement", - "src": "9087:685:1" - } - ] - } - } - ] - }, - "documentation": { - "id": 662, - "nodeType": "StructuredDocumentation", - "src": "8564:108:1", - "text": " @dev Removes childrenGeoDIDs from a geoDID\n Emits a {ChildrenRemoved} event." - }, - "functionSelector": "a8f904b5", - "id": 775, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "removeChildrenGeoDIDs", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 668, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 664, - "mutability": "mutable", - "name": "geoDIDId", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 775, - "src": "8708:16:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 663, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "8708:7:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 667, - "mutability": "mutable", - "name": "childrenGeoDIDIds", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 775, - "src": "8726:34:1", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes32_$dyn_memory_ptr", - "typeString": "bytes32[]" - }, - "typeName": { - "baseType": { - "id": 665, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "8726:7:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "id": 666, - "length": null, - "nodeType": "ArrayTypeName", - "src": "8726:9:1", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes32_$dyn_storage_ptr", - "typeString": "bytes32[]" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "8707:54:1" - }, - "returnParameters": { - "id": 669, - "nodeType": "ParameterList", - "parameters": [], - "src": "8769:0:1" - }, - "scope": 1073, - "src": "8677:1111:1", - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "public" - }, - { - "body": { - "id": 838, - "nodeType": "Block", - "src": "10000:576:1", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 785, - "name": "DATA_SUPPLIER", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 139, - "src": "10026:13:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 786, - "name": "_msgSender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1666, - "src": "10041:10:1", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_address_payable_$", - "typeString": "function () view returns (address payable)" - } - }, - "id": 787, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10041:12:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - ], - "id": 784, - "name": "hasRole", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1148, - "src": "10018:7:1", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_bytes32_$_t_address_$returns$_t_bool_$", - "typeString": "function (bytes32,address) view returns (bool)" - } - }, - "id": 788, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10018:36:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "5370617469616c4173736574733a206d7573742068617665206461746120737570706c69657220726f6c6520746f207265676973746572", - "id": 789, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "10056:57:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_a63f9d7c89af474141c60ef50b69afc5ff92c5a8bca01ae8bf1ad58a8d517343", - "typeString": "literal_string \"SpatialAssets: must have data supplier role to register\"" - }, - "value": "SpatialAssets: must have data supplier role to register" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_a63f9d7c89af474141c60ef50b69afc5ff92c5a8bca01ae8bf1ad58a8d517343", - "typeString": "literal_string \"SpatialAssets: must have data supplier role to register\"" - } - ], - "id": 783, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - -18, - -18 - ], - "referencedDeclaration": -18, - "src": "10010:7:1", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 790, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10010:104:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 791, - "nodeType": "ExpressionStatement", - "src": "10010:104:1" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 798, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 793, - "name": "_owners", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 145, - "src": "10132:7:1", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_bytes32_$_t_address_$", - "typeString": "mapping(bytes32 => address)" - } - }, - "id": 795, - "indexExpression": { - "argumentTypes": null, - "id": 794, - "name": "geoDIDId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 778, - "src": "10140:8:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "10132:17:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 796, - "name": "_msgSender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1666, - "src": "10153:10:1", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_address_payable_$", - "typeString": "function () view returns (address payable)" - } - }, - "id": 797, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10153:12:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "src": "10132:33:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "5370617469616c4173736574733a206964206d757374206e6f74206861766520616e206f776e657220796574", - "id": 799, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "10167:46:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_a2ba2ebfc38e548fefdb3c30fe605533706b9d98e3015ed81adb67a22d6cd33c", - "typeString": "literal_string \"SpatialAssets: id must not have an owner yet\"" - }, - "value": "SpatialAssets: id must not have an owner yet" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_a2ba2ebfc38e548fefdb3c30fe605533706b9d98e3015ed81adb67a22d6cd33c", - "typeString": "literal_string \"SpatialAssets: id must not have an owner yet\"" - } - ], - "id": 792, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - -18, - -18 - ], - "referencedDeclaration": -18, - "src": "10124:7:1", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 800, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10124:90:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 801, - "nodeType": "ExpressionStatement", - "src": "10124:90:1" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 810, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 803, - "name": "_owners", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 145, - "src": "10232:7:1", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_bytes32_$_t_address_$", - "typeString": "mapping(bytes32 => address)" - } - }, - "id": 805, - "indexExpression": { - "argumentTypes": null, - "id": 804, - "name": "parentGeoDIDId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 780, - "src": "10240:14:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "10232:23:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "30", - "id": 808, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "10267:1:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - } - ], - "id": 807, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "10259:7:1", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": { - "id": 806, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "10259:7:1", - "typeDescriptions": { - "typeIdentifier": null, - "typeString": null - } - } - }, - "id": 809, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10259:10:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "src": "10232:37:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "5370617469616c4173736574733a2047656f44494420746f2062652072656d6f76656420617320706172656e7420646f6573206e6f74206578697374", - "id": 811, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "10271:62:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_64e6913217981af21a3600f4e8d0d455b10cb50ec24445db6949f4566f751285", - "typeString": "literal_string \"SpatialAssets: GeoDID to be removed as parent does not exist\"" - }, - "value": "SpatialAssets: GeoDID to be removed as parent does not exist" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_64e6913217981af21a3600f4e8d0d455b10cb50ec24445db6949f4566f751285", - "typeString": "literal_string \"SpatialAssets: GeoDID to be removed as parent does not exist\"" - } - ], - "id": 802, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - -18, - -18 - ], - "referencedDeclaration": -18, - "src": "10224:7:1", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 812, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10224:110:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 813, - "nodeType": "ExpressionStatement", - "src": "10224:110:1" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 815, - "name": "_hasParent", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 153, - "src": "10352:10:1", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_bytes32_$_t_bool_$", - "typeString": "mapping(bytes32 => bool)" - } - }, - "id": 817, - "indexExpression": { - "argumentTypes": null, - "id": 816, - "name": "geoDIDId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 778, - "src": "10363:8:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "10352:20:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "5370617469616c4173736574733a2047656f44494420646f6573206e6f742068617665206120706172656e7420746f2072656d6f7665", - "id": 818, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "10374:56:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_2ab9bcfb707615a94d108c25ede9d65af23320dbf20a245340508dfbee304ef0", - "typeString": "literal_string \"SpatialAssets: GeoDID does not have a parent to remove\"" - }, - "value": "SpatialAssets: GeoDID does not have a parent to remove" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_2ab9bcfb707615a94d108c25ede9d65af23320dbf20a245340508dfbee304ef0", - "typeString": "literal_string \"SpatialAssets: GeoDID does not have a parent to remove\"" - } - ], - "id": 814, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - -18, - -18 - ], - "referencedDeclaration": -18, - "src": "10344:7:1", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 819, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10344:87:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 820, - "nodeType": "ExpressionStatement", - "src": "10344:87:1" - }, - { - "expression": { - "argumentTypes": null, - "id": 825, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 821, - "name": "_hasParent", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 153, - "src": "10442:10:1", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_bytes32_$_t_bool_$", - "typeString": "mapping(bytes32 => bool)" - } - }, - "id": 823, - "indexExpression": { - "argumentTypes": null, - "id": 822, - "name": "geoDIDId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 778, - "src": "10453:8:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "10442:20:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "hexValue": "66616c7365", - "id": 824, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "10465:5:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "false" - }, - "src": "10442:28:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "id": 826, - "nodeType": "ExpressionStatement", - "src": "10442:28:1" - }, - { - "expression": { - "argumentTypes": null, - "id": 831, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 827, - "name": "_root", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 161, - "src": "10480:5:1", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_bytes32_$_t_bytes32_$", - "typeString": "mapping(bytes32 => bytes32)" - } - }, - "id": 829, - "indexExpression": { - "argumentTypes": null, - "id": 828, - "name": "geoDIDId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 778, - "src": "10486:8:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "10480:15:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 830, - "name": "geoDIDId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 778, - "src": "10498:8:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "src": "10480:26:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "id": 832, - "nodeType": "ExpressionStatement", - "src": "10480:26:1" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 834, - "name": "geoDIDId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 778, - "src": "10544:8:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "id": 835, - "name": "parentGeoDIDId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 780, - "src": "10554:14:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - ], - "id": 833, - "name": "ParentRemoved", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 106, - "src": "10530:13:1", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_bytes32_$_t_bytes32_$returns$__$", - "typeString": "function (bytes32,bytes32)" - } - }, - "id": 836, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10530:39:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 837, - "nodeType": "EmitStatement", - "src": "10525:44:1" - } - ] - }, - "documentation": { - "id": 776, - "nodeType": "StructuredDocumentation", - "src": "9796:122:1", - "text": " @dev Removes a parent GeoDID from an already existent geoDID\n Emits a {ParentAdded} event." - }, - "functionSelector": "7c1c6c27", - "id": 839, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "removeParentGeoDID", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 781, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 778, - "mutability": "mutable", - "name": "geoDIDId", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 839, - "src": "9951:16:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 777, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "9951:7:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 780, - "mutability": "mutable", - "name": "parentGeoDIDId", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 839, - "src": "9969:22:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 779, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "9969:7:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "9950:42:1" - }, - "returnParameters": { - "id": 782, - "nodeType": "ParameterList", - "parameters": [], - "src": "10000:0:1" - }, - "scope": 1073, - "src": "9923:653:1", - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "public" - }, - { - "body": { - "id": 980, - "nodeType": "Block", - "src": "10732:1164:1", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 854, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 849, - "name": "_owners", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 145, - "src": "10763:7:1", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_bytes32_$_t_address_$", - "typeString": "mapping(bytes32 => address)" - } - }, - "id": 851, - "indexExpression": { - "argumentTypes": null, - "id": 850, - "name": "geoDIDId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 842, - "src": "10771:8:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "10763:17:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 852, - "name": "_msgSender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1666, - "src": "10784:10:1", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_address_payable_$", - "typeString": "function () view returns (address payable)" - } - }, - "id": 853, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10784:12:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "src": "10763:33:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "5370617469616c4173736574733a2063616c6c6572206973206e6f74206f776e6572206f6620746865205370617469616c204173736574", - "id": 855, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "10797:57:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_9236a874bf5a6a62bd70349ebeda081a8e8ed50334b7a53f944cd4f8601c274c", - "typeString": "literal_string \"SpatialAssets: caller is not owner of the Spatial Asset\"" - }, - "value": "SpatialAssets: caller is not owner of the Spatial Asset" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_9236a874bf5a6a62bd70349ebeda081a8e8ed50334b7a53f944cd4f8601c274c", - "typeString": "literal_string \"SpatialAssets: caller is not owner of the Spatial Asset\"" - } - ], - "id": 848, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - -18, - -18 - ], - "referencedDeclaration": -18, - "src": "10742:7:1", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 856, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10742:122:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 857, - "nodeType": "ExpressionStatement", - "src": "10742:122:1" - }, - { - "expression": { - "argumentTypes": null, - "id": 865, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 858, - "name": "_owners", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 145, - "src": "10874:7:1", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_bytes32_$_t_address_$", - "typeString": "mapping(bytes32 => address)" - } - }, - "id": 860, - "indexExpression": { - "argumentTypes": null, - "id": 859, - "name": "geoDIDId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 842, - "src": "10882:8:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "10874:17:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "30", - "id": 863, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "10902:1:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - } - ], - "id": 862, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "10894:7:1", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": { - "id": 861, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "10894:7:1", - "typeDescriptions": { - "typeIdentifier": null, - "typeString": null - } - } - }, - "id": 864, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10894:10:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "src": "10874:30:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 866, - "nodeType": "ExpressionStatement", - "src": "10874:30:1" - }, - { - "expression": { - "argumentTypes": null, - "id": 871, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 867, - "name": "_externalStorage", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 165, - "src": "10914:16:1", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_bytes32_$_t_bytes32_$", - "typeString": "mapping(bytes32 => bytes32)" - } - }, - "id": 869, - "indexExpression": { - "argumentTypes": null, - "id": 868, - "name": "geoDIDId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 842, - "src": "10931:8:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "10914:26:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "hexValue": "", - "id": 870, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "10943:2:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", - "typeString": "literal_string \"\"" - }, - "value": "" - }, - "src": "10914:31:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "id": 872, - "nodeType": "ExpressionStatement", - "src": "10914:31:1" - }, - { - "expression": { - "argumentTypes": null, - "id": 877, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 873, - "name": "_cids", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 149, - "src": "10955:5:1", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_bytes32_$_t_bytes32_$", - "typeString": "mapping(bytes32 => bytes32)" - } - }, - "id": 875, - "indexExpression": { - "argumentTypes": null, - "id": 874, - "name": "geoDIDId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 842, - "src": "10961:8:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "10955:15:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "hexValue": "", - "id": 876, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "10973:2:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", - "typeString": "literal_string \"\"" - }, - "value": "" - }, - "src": "10955:20:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "id": 878, - "nodeType": "ExpressionStatement", - "src": "10955:20:1" - }, - { - "expression": { - "argumentTypes": null, - "id": 883, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 879, - "name": "_hasParent", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 153, - "src": "10985:10:1", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_bytes32_$_t_bool_$", - "typeString": "mapping(bytes32 => bool)" - } - }, - "id": 881, - "indexExpression": { - "argumentTypes": null, - "id": 880, - "name": "geoDIDId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 842, - "src": "10996:8:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "10985:20:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "hexValue": "66616c7365", - "id": 882, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "11008:5:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "false" - }, - "src": "10985:28:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "id": 884, - "nodeType": "ExpressionStatement", - "src": "10985:28:1" - }, - { - "expression": { - "argumentTypes": null, - "id": 889, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 885, - "name": "_root", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 161, - "src": "11023:5:1", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_bytes32_$_t_bytes32_$", - "typeString": "mapping(bytes32 => bytes32)" - } - }, - "id": 887, - "indexExpression": { - "argumentTypes": null, - "id": 886, - "name": "geoDIDId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 842, - "src": "11029:8:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "11023:15:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "hexValue": "", - "id": 888, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "11041:2:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", - "typeString": "literal_string \"\"" - }, - "value": "" - }, - "src": "11023:20:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "id": 890, - "nodeType": "ExpressionStatement", - "src": "11023:20:1" - }, - { - "assignments": [ - 892 - ], - "declarations": [ - { - "constant": false, - "id": 892, - "mutability": "mutable", - "name": "childrensLen", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 980, - "src": "11054:20:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 891, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "11054:7:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 895, - "initialValue": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 893, - "name": "childrenToRemove", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 845, - "src": "11077:16:1", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes32_$dyn_memory_ptr", - "typeString": "bytes32[] memory" - } - }, - "id": 894, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "length", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "11077:23:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "11054:46:1" - }, - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 898, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 896, - "name": "childrensLen", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 892, - "src": "11115:12:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 897, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "11130:1:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "11115:16:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 975, - "nodeType": "IfStatement", - "src": "11111:730:1", - "trueBody": { - "id": 974, - "nodeType": "Block", - "src": "11132:709:1", - "statements": [ - { - "body": { - "id": 972, - "nodeType": "Block", - "src": "11186:645:1", - "statements": [ - { - "assignments": [ - 910 - ], - "declarations": [ - { - "constant": false, - "id": 910, - "mutability": "mutable", - "name": "childrenGeoDID", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 972, - "src": "11204:22:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 909, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "11204:7:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 914, - "initialValue": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 911, - "name": "childrenToRemove", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 845, - "src": "11229:16:1", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes32_$dyn_memory_ptr", - "typeString": "bytes32[] memory" - } - }, - "id": 913, - "indexExpression": { - "argumentTypes": null, - "id": 912, - "name": "j", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 900, - "src": "11246:1:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "11229:19:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "11204:44:1" - }, - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "id": 926, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 922, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 915, - "name": "_owners", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 145, - "src": "11270:7:1", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_bytes32_$_t_address_$", - "typeString": "mapping(bytes32 => address)" - } - }, - "id": 917, - "indexExpression": { - "argumentTypes": null, - "id": 916, - "name": "childrenGeoDID", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 910, - "src": "11278:14:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "11270:23:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "30", - "id": 920, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "11305:1:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - } - ], - "id": 919, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "11297:7:1", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": { - "id": 918, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "11297:7:1", - "typeDescriptions": { - "typeIdentifier": null, - "typeString": null - } - } - }, - "id": 921, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "11297:10:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "src": "11270:37:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "BinaryOperation", - "operator": "&&", - "rightExpression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 923, - "name": "_hasParent", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 153, - "src": "11311:10:1", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_bytes32_$_t_bool_$", - "typeString": "mapping(bytes32 => bool)" - } - }, - "id": 925, - "indexExpression": { - "argumentTypes": null, - "id": 924, - "name": "childrenGeoDID", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 910, - "src": "11322:14:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "11311:26:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "src": "11270:67:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "id": 957, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 952, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 945, - "name": "_owners", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 145, - "src": "11553:7:1", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_bytes32_$_t_address_$", - "typeString": "mapping(bytes32 => address)" - } - }, - "id": 947, - "indexExpression": { - "argumentTypes": null, - "id": 946, - "name": "childrenGeoDID", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 910, - "src": "11561:14:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "11553:23:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "30", - "id": 950, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "11588:1:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - } - ], - "id": 949, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "11580:7:1", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": { - "id": 948, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "11580:7:1", - "typeDescriptions": { - "typeIdentifier": null, - "typeString": null - } - } - }, - "id": 951, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "11580:10:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "src": "11553:37:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "BinaryOperation", - "operator": "&&", - "rightExpression": { - "argumentTypes": null, - "id": 956, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "UnaryOperation", - "operator": "!", - "prefix": true, - "src": "11594:27:1", - "subExpression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 953, - "name": "_hasParent", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 153, - "src": "11595:10:1", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_bytes32_$_t_bool_$", - "typeString": "mapping(bytes32 => bool)" - } - }, - "id": 955, - "indexExpression": { - "argumentTypes": null, - "id": 954, - "name": "childrenGeoDID", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 910, - "src": "11606:14:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "11595:26:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "src": "11553:68:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": { - "id": 969, - "nodeType": "Block", - "src": "11721:96:1", - "statements": [ - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 965, - "name": "geoDIDId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 842, - "src": "11773:8:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "id": 966, - "name": "childrenGeoDID", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 910, - "src": "11783:14:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - ], - "id": 964, - "name": "ChildrenErrorNoExistence", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 127, - "src": "11748:24:1", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_bytes32_$_t_bytes32_$returns$__$", - "typeString": "function (bytes32,bytes32)" - } - }, - "id": 967, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "11748:50:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 968, - "nodeType": "EmitStatement", - "src": "11743:55:1" - } - ] - }, - "id": 970, - "nodeType": "IfStatement", - "src": "11549:268:1", - "trueBody": { - "id": 963, - "nodeType": "Block", - "src": "11622:93:1", - "statements": [ - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 959, - "name": "geoDIDId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 842, - "src": "11671:8:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "id": 960, - "name": "childrenGeoDID", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 910, - "src": "11681:14:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - ], - "id": 958, - "name": "ChildrenErrorNoParent", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 120, - "src": "11649:21:1", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_bytes32_$_t_bytes32_$returns$__$", - "typeString": "function (bytes32,bytes32)" - } - }, - "id": 961, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "11649:47:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 962, - "nodeType": "EmitStatement", - "src": "11644:52:1" - } - ] - } - }, - "id": 971, - "nodeType": "IfStatement", - "src": "11266:551:1", - "trueBody": { - "id": 944, - "nodeType": "Block", - "src": "11339:203:1", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 931, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 927, - "name": "_hasParent", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 153, - "src": "11361:10:1", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_bytes32_$_t_bool_$", - "typeString": "mapping(bytes32 => bool)" - } - }, - "id": 929, - "indexExpression": { - "argumentTypes": null, - "id": 928, - "name": "childrenGeoDID", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 910, - "src": "11372:14:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "11361:26:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "hexValue": "66616c7365", - "id": 930, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "11390:5:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "false" - }, - "src": "11361:34:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "id": 932, - "nodeType": "ExpressionStatement", - "src": "11361:34:1" - }, - { - "expression": { - "argumentTypes": null, - "id": 937, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 933, - "name": "_root", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 161, - "src": "11417:5:1", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_bytes32_$_t_bytes32_$", - "typeString": "mapping(bytes32 => bytes32)" - } - }, - "id": 935, - "indexExpression": { - "argumentTypes": null, - "id": 934, - "name": "childrenGeoDID", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 910, - "src": "11423:14:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "11417:21:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 936, - "name": "childrenGeoDID", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 910, - "src": "11441:14:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "src": "11417:38:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "id": 938, - "nodeType": "ExpressionStatement", - "src": "11417:38:1" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 940, - "name": "geoDIDId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 842, - "src": "11498:8:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "id": 941, - "name": "childrenGeoDID", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 910, - "src": "11508:14:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - ], - "id": 939, - "name": "ChildrenRemoved", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 113, - "src": "11482:15:1", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_bytes32_$_t_bytes32_$returns$__$", - "typeString": "function (bytes32,bytes32)" - } - }, - "id": 942, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "11482:41:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 943, - "nodeType": "EmitStatement", - "src": "11477:46:1" - } - ] - } - } - ] - }, - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 905, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 903, - "name": "j", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 900, - "src": "11163:1:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<", - "rightExpression": { - "argumentTypes": null, - "id": 904, - "name": "childrensLen", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 892, - "src": "11167:12:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "11163:16:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "id": 973, - "initializationExpression": { - "assignments": [ - 900 - ], - "declarations": [ - { - "constant": false, - "id": 900, - "mutability": "mutable", - "name": "j", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 973, - "src": "11150:9:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 899, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "11150:7:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 902, - "initialValue": { - "argumentTypes": null, - "hexValue": "30", - "id": 901, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "11160:1:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "nodeType": "VariableDeclarationStatement", - "src": "11150:11:1" - }, - "loopExpression": { - "expression": { - "argumentTypes": null, - "id": 907, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "UnaryOperation", - "operator": "++", - "prefix": false, - "src": "11181:3:1", - "subExpression": { - "argumentTypes": null, - "id": 906, - "name": "j", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 900, - "src": "11181:1:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 908, - "nodeType": "ExpressionStatement", - "src": "11181:3:1" - }, - "nodeType": "ForStatement", - "src": "11146:685:1" - } - ] - } - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 977, - "name": "geoDIDId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 842, - "src": "11880:8:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - ], - "id": 976, - "name": "SpatialAssetDeactivated", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 85, - "src": "11856:23:1", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_bytes32_$returns$__$", - "typeString": "function (bytes32)" - } - }, - "id": 978, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "11856:33:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 979, - "nodeType": "EmitStatement", - "src": "11851:38:1" - } - ] - }, - "documentation": { - "id": 840, - "nodeType": "StructuredDocumentation", - "src": "10582:52:1", - "text": " @dev De-registers a spatial asset" - }, - "functionSelector": "0e437b1c", - "id": 981, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "deactivateSpatialAsset", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 846, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 842, - "mutability": "mutable", - "name": "geoDIDId", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 981, - "src": "10672:16:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 841, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "10672:7:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 845, - "mutability": "mutable", - "name": "childrenToRemove", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 981, - "src": "10690:33:1", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes32_$dyn_memory_ptr", - "typeString": "bytes32[]" - }, - "typeName": { - "baseType": { - "id": 843, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "10690:7:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "id": 844, - "length": null, - "nodeType": "ArrayTypeName", - "src": "10690:9:1", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes32_$dyn_storage_ptr", - "typeString": "bytes32[]" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "10671:53:1" - }, - "returnParameters": { - "id": 847, - "nodeType": "ParameterList", - "parameters": [], - "src": "10732:0:1" - }, - "scope": 1073, - "src": "10640:1256:1", - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "public" - }, - { - "body": { - "id": 991, - "nodeType": "Block", - "src": "12027:30:1", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 989, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 987, - "name": "_uri", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 141, - "src": "12037:4:1", - "typeDescriptions": { - "typeIdentifier": "t_string_storage", - "typeString": "string storage ref" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 988, - "name": "newuri", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 984, - "src": "12044:6:1", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - }, - "src": "12037:13:1", - "typeDescriptions": { - "typeIdentifier": "t_string_storage", - "typeString": "string storage ref" - } - }, - "id": 990, - "nodeType": "ExpressionStatement", - "src": "12037:13:1" - } - ] - }, - "documentation": { - "id": 982, - "nodeType": "StructuredDocumentation", - "src": "11904:70:1", - "text": " @dev Sets a new URI for all the spatial asset types" - }, - "id": 992, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "_setURI", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 985, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 984, - "mutability": "mutable", - "name": "newuri", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 992, - "src": "11996:20:1", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 983, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "11996:6:1", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "11995:22:1" - }, - "returnParameters": { - "id": 986, - "nodeType": "ParameterList", - "parameters": [], - "src": "12027:0:1" - }, - "scope": 1073, - "src": "11979:78:1", - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "internal" - }, - { - "body": { - "id": 1003, - "nodeType": "Block", - "src": "12124:35:1", - "statements": [ - { - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 999, - "name": "_owners", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 145, - "src": "12141:7:1", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_bytes32_$_t_address_$", - "typeString": "mapping(bytes32 => address)" - } - }, - "id": 1001, - "indexExpression": { - "argumentTypes": null, - "id": 1000, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 994, - "src": "12149:2:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "12141:11:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "functionReturnParameters": 998, - "id": 1002, - "nodeType": "Return", - "src": "12134:18:1" - } - ] - }, - "documentation": null, - "functionSelector": "1dc2a7b0", - "id": 1004, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "idToOwner", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 995, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 994, - "mutability": "mutable", - "name": "id", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1004, - "src": "12082:10:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 993, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "12082:7:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "12081:12:1" - }, - "returnParameters": { - "id": 998, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 997, - "mutability": "mutable", - "name": "", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1004, - "src": "12115:7:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 996, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "12115:7:1", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "12114:9:1" - }, - "scope": 1073, - "src": "12063:96:1", - "stateMutability": "view", - "virtual": false, - "visibility": "public" - }, - { - "body": { - "id": 1015, - "nodeType": "Block", - "src": "12224:33:1", - "statements": [ - { - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 1011, - "name": "_cids", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 149, - "src": "12241:5:1", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_bytes32_$_t_bytes32_$", - "typeString": "mapping(bytes32 => bytes32)" - } - }, - "id": 1013, - "indexExpression": { - "argumentTypes": null, - "id": 1012, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1006, - "src": "12247:2:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "12241:9:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "functionReturnParameters": 1010, - "id": 1014, - "nodeType": "Return", - "src": "12234:16:1" - } - ] - }, - "documentation": null, - "functionSelector": "c66f70cc", - "id": 1016, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "idToCid", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 1007, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1006, - "mutability": "mutable", - "name": "id", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1016, - "src": "12182:10:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 1005, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "12182:7:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "12181:12:1" - }, - "returnParameters": { - "id": 1010, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1009, - "mutability": "mutable", - "name": "", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1016, - "src": "12215:7:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 1008, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "12215:7:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "12214:9:1" - }, - "scope": 1073, - "src": "12165:92:1", - "stateMutability": "view", - "virtual": false, - "visibility": "public" - }, - { - "body": { - "id": 1027, - "nodeType": "Block", - "src": "12327:40:1", - "statements": [ - { - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 1023, - "name": "_canBeParent", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 157, - "src": "12344:12:1", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_bytes32_$_t_bool_$", - "typeString": "mapping(bytes32 => bool)" - } - }, - "id": 1025, - "indexExpression": { - "argumentTypes": null, - "id": 1024, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1018, - "src": "12357:2:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "12344:16:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "functionReturnParameters": 1022, - "id": 1026, - "nodeType": "Return", - "src": "12337:23:1" - } - ] - }, - "documentation": null, - "functionSelector": "0bfa194d", - "id": 1028, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "idToCanBeParent", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 1019, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1018, - "mutability": "mutable", - "name": "id", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1028, - "src": "12288:10:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 1017, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "12288:7:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "12287:12:1" - }, - "returnParameters": { - "id": 1022, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1021, - "mutability": "mutable", - "name": "", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1028, - "src": "12321:4:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 1020, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "12321:4:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "12320:6:1" - }, - "scope": 1073, - "src": "12263:104:1", - "stateMutability": "view", - "virtual": false, - "visibility": "public" - }, - { - "body": { - "id": 1039, - "nodeType": "Block", - "src": "12435:38:1", - "statements": [ - { - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 1035, - "name": "_hasParent", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 153, - "src": "12452:10:1", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_bytes32_$_t_bool_$", - "typeString": "mapping(bytes32 => bool)" - } - }, - "id": 1037, - "indexExpression": { - "argumentTypes": null, - "id": 1036, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1030, - "src": "12463:2:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "12452:14:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "functionReturnParameters": 1034, - "id": 1038, - "nodeType": "Return", - "src": "12445:21:1" - } - ] - }, - "documentation": null, - "functionSelector": "092e9f25", - "id": 1040, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "idToHasParent", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 1031, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1030, - "mutability": "mutable", - "name": "id", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1040, - "src": "12396:10:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 1029, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "12396:7:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "12395:12:1" - }, - "returnParameters": { - "id": 1034, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1033, - "mutability": "mutable", - "name": "", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1040, - "src": "12429:4:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 1032, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "12429:4:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "12428:6:1" - }, - "scope": 1073, - "src": "12373:100:1", - "stateMutability": "view", - "virtual": false, - "visibility": "public" - }, - { - "body": { - "id": 1051, - "nodeType": "Block", - "src": "12550:44:1", - "statements": [ - { - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 1047, - "name": "_externalStorage", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 165, - "src": "12567:16:1", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_bytes32_$_t_bytes32_$", - "typeString": "mapping(bytes32 => bytes32)" - } - }, - "id": 1049, - "indexExpression": { - "argumentTypes": null, - "id": 1048, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1042, - "src": "12584:2:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "12567:20:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "functionReturnParameters": 1046, - "id": 1050, - "nodeType": "Return", - "src": "12560:27:1" - } - ] - }, - "documentation": null, - "functionSelector": "84f42912", - "id": 1052, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "idToExternalStorage", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 1043, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1042, - "mutability": "mutable", - "name": "id", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1052, - "src": "12508:10:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 1041, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "12508:7:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "12507:12:1" - }, - "returnParameters": { - "id": 1046, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1045, - "mutability": "mutable", - "name": "", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1052, - "src": "12541:7:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 1044, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "12541:7:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "12540:9:1" - }, - "scope": 1073, - "src": "12479:115:1", - "stateMutability": "view", - "virtual": false, - "visibility": "public" - }, - { - "body": { - "id": 1063, - "nodeType": "Block", - "src": "12677:57:1", - "statements": [ - { - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 1059, - "name": "_allowedStorages", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 169, - "src": "12694:16:1", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_bytes32_$_t_bool_$", - "typeString": "mapping(bytes32 => bool)" - } - }, - "id": 1061, - "indexExpression": { - "argumentTypes": null, - "id": 1060, - "name": "offChainStorage", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1054, - "src": "12711:15:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "12694:33:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "functionReturnParameters": 1058, - "id": 1062, - "nodeType": "Return", - "src": "12687:40:1" - } - ] - }, - "documentation": null, - "functionSelector": "8d0a9bff", - "id": 1064, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "allowedStorages", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 1055, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1054, - "mutability": "mutable", - "name": "offChainStorage", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1064, - "src": "12625:23:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 1053, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "12625:7:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "12624:25:1" - }, - "returnParameters": { - "id": 1058, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1057, - "mutability": "mutable", - "name": "", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1064, - "src": "12671:4:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 1056, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "12671:4:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "12670:6:1" - }, - "scope": 1073, - "src": "12600:134:1", - "stateMutability": "view", - "virtual": false, - "visibility": "public" - }, - { - "body": { - "id": 1071, - "nodeType": "Block", - "src": "12791:28:1", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 1069, - "name": "_uri", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 141, - "src": "12808:4:1", - "typeDescriptions": { - "typeIdentifier": "t_string_storage", - "typeString": "string storage ref" - } - }, - "functionReturnParameters": 1068, - "id": 1070, - "nodeType": "Return", - "src": "12801:11:1" - } - ] - }, - "documentation": null, - "functionSelector": "eac989f8", - "id": 1072, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "uri", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 1065, - "nodeType": "ParameterList", - "parameters": [], - "src": "12752:2:1" - }, - "returnParameters": { - "id": 1068, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1067, - "mutability": "mutable", - "name": "", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1072, - "src": "12776:13:1", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 1066, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "12776:6:1", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "12775:15:1" - }, - "scope": 1073, - "src": "12740:79:1", - "stateMutability": "view", - "virtual": false, - "visibility": "public" - } - ], - "scope": 1074, - "src": "539:12282:1" - } - ], - "src": "42:12780:1" - }, - "legacyAST": { - "attributes": { - "absolutePath": "/Users/jaredchilders/Astral/astralprotocol/packages/contracts/contracts/SpatialAssets.sol", - "exportedSymbols": { - "SpatialAssets": [ - 1073 - ] - }, - "license": "APACHE OR MIT" - }, - "children": [ - { - "attributes": { - "literals": [ - "solidity", - "^", - "0.6", - ".0" - ] - }, - "id": 58, - "name": "PragmaDirective", - "src": "42:23:1" - }, - { - "attributes": { - "SourceUnit": 1360, - "absolutePath": "@openzeppelin/contracts/access/AccessControl.sol", - "file": "@openzeppelin/contracts/access/AccessControl.sol", - "scope": 1074, - "symbolAliases": [ - null - ], - "unitAlias": "" - }, - "id": 59, - "name": "ImportDirective", - "src": "67:58:1" - }, - { - "attributes": { - "SourceUnit": 1077, - "absolutePath": "@openzeppelin/contracts/GSN/Context.sol", - "file": "@openzeppelin/contracts/GSN/Context.sol", - "scope": 1074, - "symbolAliases": [ - null - ], - "unitAlias": "" - }, - "id": 60, - "name": "ImportDirective", - "src": "126:49:1" - }, - { - "attributes": { - "abstract": false, - "contractDependencies": [ - 1359, - 1678 - ], - "contractKind": "contract", - "fullyImplemented": true, - "linearizedBaseContracts": [ - 1073, - 1359, - 1678 - ], - "name": "SpatialAssets", - "scope": 1074 - }, - "children": [ - { - "attributes": { - "text": " @dev {SpatialAssets} registry\n This contract uses {AccessControl} to lock permissioned functions using the\n different roles - head to its documentation for details.\n The account that deploys the contract will be granted the 'DATA_SUPPLIER' as well as the default admin role, which will let it grant\n 'DATA_SUPPLIER' roles to other accounts" - }, - "id": 61, - "name": "StructuredDocumentation", - "src": "177:361:1" - }, - { - "attributes": { - "arguments": null - }, - "children": [ - { - "attributes": { - "contractScope": null, - "name": "Context", - "referencedDeclaration": 1678, - "type": "contract Context" - }, - "id": 62, - "name": "UserDefinedTypeName", - "src": "565:7:1" - } - ], - "id": 63, - "name": "InheritanceSpecifier", - "src": "565:7:1" - }, - { - "attributes": { - "arguments": null - }, - "children": [ - { - "attributes": { - "contractScope": null, - "name": "AccessControl", - "referencedDeclaration": 1359, - "type": "contract AccessControl" - }, - "id": 64, - "name": "UserDefinedTypeName", - "src": "574:13:1" - } - ], - "id": 65, - "name": "InheritanceSpecifier", - "src": "574:13:1" - }, - { - "attributes": { - "anonymous": false, - "name": "SpatialAssetRegistered" - }, - "children": [ - { - "attributes": { - "text": " @dev Emitted when Spatial Assets of id `id` are transferred to `to``." - }, - "id": 66, - "name": "StructuredDocumentation", - "src": "594:88:1" - }, - { - "children": [ - { - "attributes": { - "constant": false, - "indexed": true, - "mutability": "mutable", - "name": "to", - "overrides": null, - "scope": 80, - "stateVariable": false, - "storageLocation": "default", - "type": "address", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "address", - "stateMutability": "nonpayable", - "type": "address" - }, - "id": 67, - "name": "ElementaryTypeName", - "src": "716:7:1" - } - ], - "id": 68, - "name": "VariableDeclaration", - "src": "716:18:1" - }, - { - "attributes": { - "constant": false, - "indexed": true, - "mutability": "mutable", - "name": "geoDIDId", - "overrides": null, - "scope": 80, - "stateVariable": false, - "storageLocation": "default", - "type": "bytes32", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "bytes32", - "type": "bytes32" - }, - "id": 69, - "name": "ElementaryTypeName", - "src": "736:7:1" - } - ], - "id": 70, - "name": "VariableDeclaration", - "src": "736:24:1" - }, - { - "attributes": { - "constant": false, - "indexed": true, - "mutability": "mutable", - "name": "cid", - "overrides": null, - "scope": 80, - "stateVariable": false, - "storageLocation": "default", - "type": "bytes32", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "bytes32", - "type": "bytes32" - }, - "id": 71, - "name": "ElementaryTypeName", - "src": "762:7:1" - } - ], - "id": 72, - "name": "VariableDeclaration", - "src": "762:19:1" - }, - { - "attributes": { - "constant": false, - "indexed": false, - "mutability": "mutable", - "name": "offChainStorage", - "overrides": null, - "scope": 80, - "stateVariable": false, - "storageLocation": "default", - "type": "bytes32", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "bytes32", - "type": "bytes32" - }, - "id": 73, - "name": "ElementaryTypeName", - "src": "783:7:1" - } - ], - "id": 74, - "name": "VariableDeclaration", - "src": "783:23:1" - }, - { - "attributes": { - "constant": false, - "indexed": false, - "mutability": "mutable", - "name": "root", - "overrides": null, - "scope": 80, - "stateVariable": false, - "storageLocation": "default", - "type": "bytes32", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "bytes32", - "type": "bytes32" - }, - "id": 75, - "name": "ElementaryTypeName", - "src": "808:7:1" - } - ], - "id": 76, - "name": "VariableDeclaration", - "src": "808:12:1" - }, - { - "attributes": { - "constant": false, - "indexed": false, - "mutability": "mutable", - "name": "canBeParent", - "overrides": null, - "scope": 80, - "stateVariable": false, - "storageLocation": "default", - "type": "bool", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "bool", - "type": "bool" - }, - "id": 77, - "name": "ElementaryTypeName", - "src": "822:4:1" - } - ], - "id": 78, - "name": "VariableDeclaration", - "src": "822:16:1" - } - ], - "id": 79, - "name": "ParameterList", - "src": "715:124:1" - } - ], - "id": 80, - "name": "EventDefinition", - "src": "687:153:1" - }, - { - "attributes": { - "anonymous": false, - "name": "SpatialAssetDeactivated" - }, - "children": [ - { - "attributes": { - "text": " @dev Emitted when Spatial Assets of id `id` are deactivated." - }, - "id": 81, - "name": "StructuredDocumentation", - "src": "846:79:1" - }, - { - "children": [ - { - "attributes": { - "constant": false, - "indexed": true, - "mutability": "mutable", - "name": "geoDIDId", - "overrides": null, - "scope": 85, - "stateVariable": false, - "storageLocation": "default", - "type": "bytes32", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "bytes32", - "type": "bytes32" - }, - "id": 82, - "name": "ElementaryTypeName", - "src": "960:7:1" - } - ], - "id": 83, - "name": "VariableDeclaration", - "src": "960:24:1" - } - ], - "id": 84, - "name": "ParameterList", - "src": "959:26:1" - } - ], - "id": 85, - "name": "EventDefinition", - "src": "930:56:1" - }, - { - "attributes": { - "anonymous": false, - "name": "ParentAdded" - }, - "children": [ - { - "attributes": { - "text": " @dev Emitted when a parent geodid is added to a node" - }, - "id": 86, - "name": "StructuredDocumentation", - "src": "992:71:1" - }, - { - "children": [ - { - "attributes": { - "constant": false, - "indexed": true, - "mutability": "mutable", - "name": "geoDIDId", - "overrides": null, - "scope": 92, - "stateVariable": false, - "storageLocation": "default", - "type": "bytes32", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "bytes32", - "type": "bytes32" - }, - "id": 87, - "name": "ElementaryTypeName", - "src": "1086:7:1" - } - ], - "id": 88, - "name": "VariableDeclaration", - "src": "1086:24:1" - }, - { - "attributes": { - "constant": false, - "indexed": true, - "mutability": "mutable", - "name": "parentGeoDIDId", - "overrides": null, - "scope": 92, - "stateVariable": false, - "storageLocation": "default", - "type": "bytes32", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "bytes32", - "type": "bytes32" - }, - "id": 89, - "name": "ElementaryTypeName", - "src": "1112:7:1" - } - ], - "id": 90, - "name": "VariableDeclaration", - "src": "1112:30:1" - } - ], - "id": 91, - "name": "ParameterList", - "src": "1085:58:1" - } - ], - "id": 92, - "name": "EventDefinition", - "src": "1068:76:1" - }, - { - "attributes": { - "anonymous": false, - "name": "ChildrenAdded" - }, - "children": [ - { - "attributes": { - "text": " @dev Emitted when a children geodid is added to a node" - }, - "id": 93, - "name": "StructuredDocumentation", - "src": "1150:73:1" - }, - { - "children": [ - { - "attributes": { - "constant": false, - "indexed": true, - "mutability": "mutable", - "name": "geoDIDId", - "overrides": null, - "scope": 99, - "stateVariable": false, - "storageLocation": "default", - "type": "bytes32", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "bytes32", - "type": "bytes32" - }, - "id": 94, - "name": "ElementaryTypeName", - "src": "1248:7:1" - } - ], - "id": 95, - "name": "VariableDeclaration", - "src": "1248:24:1" - }, - { - "attributes": { - "constant": false, - "indexed": true, - "mutability": "mutable", - "name": "childrenGeoDIDId", - "overrides": null, - "scope": 99, - "stateVariable": false, - "storageLocation": "default", - "type": "bytes32", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "bytes32", - "type": "bytes32" - }, - "id": 96, - "name": "ElementaryTypeName", - "src": "1274:7:1" - } - ], - "id": 97, - "name": "VariableDeclaration", - "src": "1274:32:1" - } - ], - "id": 98, - "name": "ParameterList", - "src": "1247:60:1" - } - ], - "id": 99, - "name": "EventDefinition", - "src": "1228:80:1" - }, - { - "attributes": { - "anonymous": false, - "name": "ParentRemoved" - }, - "children": [ - { - "attributes": { - "text": " @dev Emitted when a parent geodid is removed from a node" - }, - "id": 100, - "name": "StructuredDocumentation", - "src": "1314:75:1" - }, - { - "children": [ - { - "attributes": { - "constant": false, - "indexed": true, - "mutability": "mutable", - "name": "geoDIDId", - "overrides": null, - "scope": 106, - "stateVariable": false, - "storageLocation": "default", - "type": "bytes32", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "bytes32", - "type": "bytes32" - }, - "id": 101, - "name": "ElementaryTypeName", - "src": "1414:7:1" - } - ], - "id": 102, - "name": "VariableDeclaration", - "src": "1414:24:1" - }, - { - "attributes": { - "constant": false, - "indexed": true, - "mutability": "mutable", - "name": "parentGeoDIDId", - "overrides": null, - "scope": 106, - "stateVariable": false, - "storageLocation": "default", - "type": "bytes32", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "bytes32", - "type": "bytes32" - }, - "id": 103, - "name": "ElementaryTypeName", - "src": "1440:7:1" - } - ], - "id": 104, - "name": "VariableDeclaration", - "src": "1440:30:1" - } - ], - "id": 105, - "name": "ParameterList", - "src": "1413:58:1" - } - ], - "id": 106, - "name": "EventDefinition", - "src": "1394:78:1" - }, - { - "attributes": { - "anonymous": false, - "name": "ChildrenRemoved" - }, - "children": [ - { - "attributes": { - "text": " @dev Emitted when a children geodid is removed from a node" - }, - "id": 107, - "name": "StructuredDocumentation", - "src": "1478:77:1" - }, - { - "children": [ - { - "attributes": { - "constant": false, - "indexed": true, - "mutability": "mutable", - "name": "geoDIDId", - "overrides": null, - "scope": 113, - "stateVariable": false, - "storageLocation": "default", - "type": "bytes32", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "bytes32", - "type": "bytes32" - }, - "id": 108, - "name": "ElementaryTypeName", - "src": "1582:7:1" - } - ], - "id": 109, - "name": "VariableDeclaration", - "src": "1582:24:1" - }, - { - "attributes": { - "constant": false, - "indexed": true, - "mutability": "mutable", - "name": "childrenGeoDIDId", - "overrides": null, - "scope": 113, - "stateVariable": false, - "storageLocation": "default", - "type": "bytes32", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "bytes32", - "type": "bytes32" - }, - "id": 110, - "name": "ElementaryTypeName", - "src": "1608:7:1" - } - ], - "id": 111, - "name": "VariableDeclaration", - "src": "1608:32:1" - } - ], - "id": 112, - "name": "ParameterList", - "src": "1581:60:1" - } - ], - "id": 113, - "name": "EventDefinition", - "src": "1560:82:1" - }, - { - "attributes": { - "anonymous": false, - "name": "ChildrenErrorNoParent" - }, - "children": [ - { - "attributes": { - "text": " @dev Emitted when a children geodid does not have a parent when trying to remove it from a parent" - }, - "id": 114, - "name": "StructuredDocumentation", - "src": "1653:116:1" - }, - { - "children": [ - { - "attributes": { - "constant": false, - "indexed": true, - "mutability": "mutable", - "name": "geoDIDId", - "overrides": null, - "scope": 120, - "stateVariable": false, - "storageLocation": "default", - "type": "bytes32", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "bytes32", - "type": "bytes32" - }, - "id": 115, - "name": "ElementaryTypeName", - "src": "1802:7:1" - } - ], - "id": 116, - "name": "VariableDeclaration", - "src": "1802:24:1" - }, - { - "attributes": { - "constant": false, - "indexed": true, - "mutability": "mutable", - "name": "childrenGeoDIDId", - "overrides": null, - "scope": 120, - "stateVariable": false, - "storageLocation": "default", - "type": "bytes32", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "bytes32", - "type": "bytes32" - }, - "id": 117, - "name": "ElementaryTypeName", - "src": "1828:7:1" - } - ], - "id": 118, - "name": "VariableDeclaration", - "src": "1828:32:1" - } - ], - "id": 119, - "name": "ParameterList", - "src": "1801:60:1" - } - ], - "id": 120, - "name": "EventDefinition", - "src": "1774:88:1" - }, - { - "attributes": { - "anonymous": false, - "name": "ChildrenErrorNoExistence" - }, - "children": [ - { - "attributes": { - "text": " @dev Emitted when a children geodid does not exist" - }, - "id": 121, - "name": "StructuredDocumentation", - "src": "1873:69:1" - }, - { - "children": [ - { - "attributes": { - "constant": false, - "indexed": true, - "mutability": "mutable", - "name": "geoDIDId", - "overrides": null, - "scope": 127, - "stateVariable": false, - "storageLocation": "default", - "type": "bytes32", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "bytes32", - "type": "bytes32" - }, - "id": 122, - "name": "ElementaryTypeName", - "src": "1978:7:1" - } - ], - "id": 123, - "name": "VariableDeclaration", - "src": "1978:24:1" - }, - { - "attributes": { - "constant": false, - "indexed": true, - "mutability": "mutable", - "name": "childrenGeoDIDId", - "overrides": null, - "scope": 127, - "stateVariable": false, - "storageLocation": "default", - "type": "bytes32", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "bytes32", - "type": "bytes32" - }, - "id": 124, - "name": "ElementaryTypeName", - "src": "2004:7:1" - } - ], - "id": 125, - "name": "VariableDeclaration", - "src": "2004:32:1" - } - ], - "id": 126, - "name": "ParameterList", - "src": "1977:60:1" - } - ], - "id": 127, - "name": "EventDefinition", - "src": "1947:91:1" - }, - { - "attributes": { - "anonymous": false, - "name": "ChildrenErrorHasParent" - }, - "children": [ - { - "attributes": { - "text": " @dev Emitted when a children geodid already has a parent but shouldn't have" - }, - "id": 128, - "name": "StructuredDocumentation", - "src": "2049:94:1" - }, - { - "children": [ - { - "attributes": { - "constant": false, - "indexed": true, - "mutability": "mutable", - "name": "geoDIDId", - "overrides": null, - "scope": 134, - "stateVariable": false, - "storageLocation": "default", - "type": "bytes32", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "bytes32", - "type": "bytes32" - }, - "id": 129, - "name": "ElementaryTypeName", - "src": "2177:7:1" - } - ], - "id": 130, - "name": "VariableDeclaration", - "src": "2177:24:1" - }, - { - "attributes": { - "constant": false, - "indexed": true, - "mutability": "mutable", - "name": "childrenGeoDIDId", - "overrides": null, - "scope": 134, - "stateVariable": false, - "storageLocation": "default", - "type": "bytes32", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "bytes32", - "type": "bytes32" - }, - "id": 131, - "name": "ElementaryTypeName", - "src": "2203:7:1" - } - ], - "id": 132, - "name": "VariableDeclaration", - "src": "2203:32:1" - } - ], - "id": 133, - "name": "ParameterList", - "src": "2176:60:1" - } - ], - "id": 134, - "name": "EventDefinition", - "src": "2148:89:1" - }, - { - "attributes": { - "constant": true, - "functionSelector": "9969879b", - "mutability": "constant", - "name": "DATA_SUPPLIER", - "overrides": null, - "scope": 1073, - "stateVariable": true, - "storageLocation": "default", - "type": "bytes32", - "visibility": "public" - }, - "children": [ - { - "attributes": { - "name": "bytes32", - "type": "bytes32" - }, - "id": 135, - "name": "ElementaryTypeName", - "src": "2244:7:1" - }, - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": true, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [ - null - ], - "tryCall": false, - "type": "bytes32", - "type_conversion": false - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_b90ec3213bc54b34738ca7ad785b7e6275742931f3ddfa147171c27090643f3f", - "typeString": "literal_string \"DATA_SUPPLIER\"" - } - ], - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": -8, - "type": "function (bytes memory) pure returns (bytes32)", - "value": "keccak256" - }, - "id": 136, - "name": "Identifier", - "src": "2284:9:1" - }, - { - "attributes": { - "argumentTypes": null, - "hexvalue": "444154415f535550504c494552", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "subdenomination": null, - "token": "string", - "type": "literal_string \"DATA_SUPPLIER\"", - "value": "DATA_SUPPLIER" - }, - "id": 137, - "name": "Literal", - "src": "2294:15:1" - } - ], - "id": 138, - "name": "FunctionCall", - "src": "2284:26:1" - } - ], - "id": 139, - "name": "VariableDeclaration", - "src": "2244:66:1" - }, - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "_uri", - "overrides": null, - "scope": 1073, - "stateVariable": true, - "storageLocation": "default", - "type": "string", - "value": null, - "visibility": "private" - }, - "children": [ - { - "attributes": { - "name": "string", - "type": "string" - }, - "id": 140, - "name": "ElementaryTypeName", - "src": "2317:6:1" - } - ], - "id": 141, - "name": "VariableDeclaration", - "src": "2317:19:1" - }, - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "_owners", - "overrides": null, - "scope": 1073, - "stateVariable": true, - "storageLocation": "default", - "type": "mapping(bytes32 => address)", - "value": null, - "visibility": "private" - }, - "children": [ - { - "attributes": { - "type": "mapping(bytes32 => address)" - }, - "children": [ - { - "attributes": { - "name": "bytes32", - "type": "bytes32" - }, - "id": 142, - "name": "ElementaryTypeName", - "src": "2395:7:1" - }, - { - "attributes": { - "name": "address", - "stateMutability": "nonpayable", - "type": "address" - }, - "id": 143, - "name": "ElementaryTypeName", - "src": "2406:7:1" - } - ], - "id": 144, - "name": "Mapping", - "src": "2386:28:1" - } - ], - "id": 145, - "name": "VariableDeclaration", - "src": "2386:44:1" - }, - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "_cids", - "overrides": null, - "scope": 1073, - "stateVariable": true, - "storageLocation": "default", - "type": "mapping(bytes32 => bytes32)", - "value": null, - "visibility": "private" - }, - "children": [ - { - "attributes": { - "type": "mapping(bytes32 => bytes32)" - }, - "children": [ - { - "attributes": { - "name": "bytes32", - "type": "bytes32" - }, - "id": 146, - "name": "ElementaryTypeName", - "src": "2486:7:1" - }, - { - "attributes": { - "name": "bytes32", - "type": "bytes32" - }, - "id": 147, - "name": "ElementaryTypeName", - "src": "2497:7:1" - } - ], - "id": 148, - "name": "Mapping", - "src": "2477:28:1" - } - ], - "id": 149, - "name": "VariableDeclaration", - "src": "2477:42:1" - }, - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "_hasParent", - "overrides": null, - "scope": 1073, - "stateVariable": true, - "storageLocation": "default", - "type": "mapping(bytes32 => bool)", - "value": null, - "visibility": "private" - }, - "children": [ - { - "attributes": { - "type": "mapping(bytes32 => bool)" - }, - "children": [ - { - "attributes": { - "name": "bytes32", - "type": "bytes32" - }, - "id": 150, - "name": "ElementaryTypeName", - "src": "2585:7:1" - }, - { - "attributes": { - "name": "bool", - "type": "bool" - }, - "id": 151, - "name": "ElementaryTypeName", - "src": "2596:4:1" - } - ], - "id": 152, - "name": "Mapping", - "src": "2576:25:1" - } - ], - "id": 153, - "name": "VariableDeclaration", - "src": "2576:44:1" - }, - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "_canBeParent", - "overrides": null, - "scope": 1073, - "stateVariable": true, - "storageLocation": "default", - "type": "mapping(bytes32 => bool)", - "value": null, - "visibility": "private" - }, - "children": [ - { - "attributes": { - "type": "mapping(bytes32 => bool)" - }, - "children": [ - { - "attributes": { - "name": "bytes32", - "type": "bytes32" - }, - "id": 154, - "name": "ElementaryTypeName", - "src": "2684:7:1" - }, - { - "attributes": { - "name": "bool", - "type": "bool" - }, - "id": 155, - "name": "ElementaryTypeName", - "src": "2695:4:1" - } - ], - "id": 156, - "name": "Mapping", - "src": "2675:25:1" - } - ], - "id": 157, - "name": "VariableDeclaration", - "src": "2675:46:1" - }, - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "_root", - "overrides": null, - "scope": 1073, - "stateVariable": true, - "storageLocation": "default", - "type": "mapping(bytes32 => bytes32)", - "value": null, - "visibility": "private" - }, - "children": [ - { - "attributes": { - "type": "mapping(bytes32 => bytes32)" - }, - "children": [ - { - "attributes": { - "name": "bytes32", - "type": "bytes32" - }, - "id": 158, - "name": "ElementaryTypeName", - "src": "2785:7:1" - }, - { - "attributes": { - "name": "bytes32", - "type": "bytes32" - }, - "id": 159, - "name": "ElementaryTypeName", - "src": "2796:7:1" - } - ], - "id": 160, - "name": "Mapping", - "src": "2776:28:1" - } - ], - "id": 161, - "name": "VariableDeclaration", - "src": "2776:42:1" - }, - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "_externalStorage", - "overrides": null, - "scope": 1073, - "stateVariable": true, - "storageLocation": "default", - "type": "mapping(bytes32 => bytes32)", - "value": null, - "visibility": "private" - }, - "children": [ - { - "attributes": { - "type": "mapping(bytes32 => bytes32)" - }, - "children": [ - { - "attributes": { - "name": "bytes32", - "type": "bytes32" - }, - "id": 162, - "name": "ElementaryTypeName", - "src": "2891:7:1" - }, - { - "attributes": { - "name": "bytes32", - "type": "bytes32" - }, - "id": 163, - "name": "ElementaryTypeName", - "src": "2902:7:1" - } - ], - "id": 164, - "name": "Mapping", - "src": "2882:28:1" - } - ], - "id": 165, - "name": "VariableDeclaration", - "src": "2882:53:1" - }, - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "_allowedStorages", - "overrides": null, - "scope": 1073, - "stateVariable": true, - "storageLocation": "default", - "type": "mapping(bytes32 => bool)", - "value": null, - "visibility": "private" - }, - "children": [ - { - "attributes": { - "type": "mapping(bytes32 => bool)" - }, - "children": [ - { - "attributes": { - "name": "bytes32", - "type": "bytes32" - }, - "id": 166, - "name": "ElementaryTypeName", - "src": "2995:7:1" - }, - { - "attributes": { - "name": "bool", - "type": "bool" - }, - "id": 167, - "name": "ElementaryTypeName", - "src": "3006:4:1" - } - ], - "id": 168, - "name": "Mapping", - "src": "2986:25:1" - } - ], - "id": 169, - "name": "VariableDeclaration", - "src": "2986:50:1" - }, - { - "attributes": { - "implemented": true, - "isConstructor": true, - "kind": "constructor", - "modifiers": [ - null - ], - "name": "", - "overrides": null, - "scope": 1073, - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "public" - }, - "children": [ - { - "attributes": { - "text": " @dev Grants `DEFAULT_ADMIN_ROLE`, `DATA_SUPPLIER` to the account that\n deploys the contract." - }, - "id": 170, - "name": "StructuredDocumentation", - "src": "3044:117:1" - }, - { - "children": [ - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "uri", - "overrides": null, - "scope": 192, - "stateVariable": false, - "storageLocation": "memory", - "type": "string", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "string", - "type": "string" - }, - "id": 171, - "name": "ElementaryTypeName", - "src": "3178:6:1" - } - ], - "id": 172, - "name": "VariableDeclaration", - "src": "3178:17:1" - } - ], - "id": 173, - "name": "ParameterList", - "src": "3177:19:1" - }, - { - "attributes": { - "parameters": [ - null - ] - }, - "children": [], - "id": 174, - "name": "ParameterList", - "src": "3204:0:1" - }, - { - "children": [ - { - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [ - null - ], - "tryCall": false, - "type": "tuple()", - "type_conversion": false - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - ], - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 992, - "type": "function (string memory)", - "value": "_setURI" - }, - "id": 175, - "name": "Identifier", - "src": "3214:7:1" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 172, - "type": "string memory", - "value": "uri" - }, - "id": 176, - "name": "Identifier", - "src": "3222:3:1" - } - ], - "id": 177, - "name": "FunctionCall", - "src": "3214:12:1" - } - ], - "id": 178, - "name": "ExpressionStatement", - "src": "3214:12:1" - }, - { - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [ - null - ], - "tryCall": false, - "type": "tuple()", - "type_conversion": false - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - ], - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 1285, - "type": "function (bytes32,address)", - "value": "_setupRole" - }, - "id": 179, - "name": "Identifier", - "src": "3236:10:1" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 1102, - "type": "bytes32", - "value": "DEFAULT_ADMIN_ROLE" - }, - "id": 180, - "name": "Identifier", - "src": "3247:18:1" - }, - { - "attributes": { - "argumentTypes": null, - "arguments": [ - null - ], - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [ - null - ], - "tryCall": false, - "type": "address payable", - "type_conversion": false - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - null - ], - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 1666, - "type": "function () view returns (address payable)", - "value": "_msgSender" - }, - "id": 181, - "name": "Identifier", - "src": "3267:10:1" - } - ], - "id": 182, - "name": "FunctionCall", - "src": "3267:12:1" - } - ], - "id": 183, - "name": "FunctionCall", - "src": "3236:44:1" - } - ], - "id": 184, - "name": "ExpressionStatement", - "src": "3236:44:1" - }, - { - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [ - null - ], - "tryCall": false, - "type": "tuple()", - "type_conversion": false - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - ], - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 1285, - "type": "function (bytes32,address)", - "value": "_setupRole" - }, - "id": 185, - "name": "Identifier", - "src": "3290:10:1" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 139, - "type": "bytes32", - "value": "DATA_SUPPLIER" - }, - "id": 186, - "name": "Identifier", - "src": "3301:13:1" - }, - { - "attributes": { - "argumentTypes": null, - "arguments": [ - null - ], - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [ - null - ], - "tryCall": false, - "type": "address payable", - "type_conversion": false - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - null - ], - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 1666, - "type": "function () view returns (address payable)", - "value": "_msgSender" - }, - "id": 187, - "name": "Identifier", - "src": "3316:10:1" - } - ], - "id": 188, - "name": "FunctionCall", - "src": "3316:12:1" - } - ], - "id": 189, - "name": "FunctionCall", - "src": "3290:39:1" - } - ], - "id": 190, - "name": "ExpressionStatement", - "src": "3290:39:1" - } - ], - "id": 191, - "name": "Block", - "src": "3204:133:1" - } - ], - "id": 192, - "name": "FunctionDefinition", - "src": "3166:171:1" - }, - { - "attributes": { - "functionSelector": "c44e96a0", - "implemented": true, - "isConstructor": false, - "kind": "function", - "modifiers": [ - null - ], - "name": "registerRole", - "overrides": null, - "scope": 1073, - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "public" - }, - "children": [ - { - "attributes": { - "text": " @dev Registers a new user with the ability to register a spatial asset." - }, - "id": 193, - "name": "StructuredDocumentation", - "src": "3343:90:1" - }, - { - "attributes": { - "parameters": [ - null - ] - }, - "children": [], - "id": 194, - "name": "ParameterList", - "src": "3459:2:1" - }, - { - "attributes": { - "parameters": [ - null - ] - }, - "children": [], - "id": 195, - "name": "ParameterList", - "src": "3469:0:1" - }, - { - "children": [ - { - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [ - null - ], - "tryCall": false, - "type": "tuple()", - "type_conversion": false - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_ad6e74c880a0a8789cc0999bb5807e042142eac3ba8cd1a8f038e7ac1c7b18f3", - "typeString": "literal_string \"SpatialAssets: must not have a DATA_SUPPLIER role yet\"" - } - ], - "overloadedDeclarations": [ - -18, - -18 - ], - "referencedDeclaration": -18, - "type": "function (bool,string memory) pure", - "value": "require" - }, - "id": 196, - "name": "Identifier", - "src": "3479:7:1" - }, - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": "!", - "prefix": true, - "type": "bool" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [ - null - ], - "tryCall": false, - "type": "bool", - "type_conversion": false - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - ], - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 1148, - "type": "function (bytes32,address) view returns (bool)", - "value": "hasRole" - }, - "id": 197, - "name": "Identifier", - "src": "3488:7:1" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 139, - "type": "bytes32", - "value": "DATA_SUPPLIER" - }, - "id": 198, - "name": "Identifier", - "src": "3496:13:1" - }, - { - "attributes": { - "argumentTypes": null, - "arguments": [ - null - ], - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [ - null - ], - "tryCall": false, - "type": "address payable", - "type_conversion": false - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - null - ], - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 1666, - "type": "function () view returns (address payable)", - "value": "_msgSender" - }, - "id": 199, - "name": "Identifier", - "src": "3511:10:1" - } - ], - "id": 200, - "name": "FunctionCall", - "src": "3511:12:1" - } - ], - "id": 201, - "name": "FunctionCall", - "src": "3488:36:1" - } - ], - "id": 202, - "name": "UnaryOperation", - "src": "3487:37:1" - }, - { - "attributes": { - "argumentTypes": null, - "hexvalue": "5370617469616c4173736574733a206d757374206e6f742068617665206120444154415f535550504c49455220726f6c6520796574", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "subdenomination": null, - "token": "string", - "type": "literal_string \"SpatialAssets: must not have a DATA_SUPPLIER role yet\"", - "value": "SpatialAssets: must not have a DATA_SUPPLIER role yet" - }, - "id": 203, - "name": "Literal", - "src": "3526:55:1" - } - ], - "id": 204, - "name": "FunctionCall", - "src": "3479:103:1" - } - ], - "id": 205, - "name": "ExpressionStatement", - "src": "3479:103:1" - }, - { - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [ - null - ], - "tryCall": false, - "type": "tuple()", - "type_conversion": false - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - ], - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 1285, - "type": "function (bytes32,address)", - "value": "_setupRole" - }, - "id": 206, - "name": "Identifier", - "src": "3592:10:1" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 139, - "type": "bytes32", - "value": "DATA_SUPPLIER" - }, - "id": 207, - "name": "Identifier", - "src": "3603:13:1" - }, - { - "attributes": { - "argumentTypes": null, - "arguments": [ - null - ], - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [ - null - ], - "tryCall": false, - "type": "address payable", - "type_conversion": false - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - null - ], - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 1666, - "type": "function () view returns (address payable)", - "value": "_msgSender" - }, - "id": 208, - "name": "Identifier", - "src": "3618:10:1" - } - ], - "id": 209, - "name": "FunctionCall", - "src": "3618:12:1" - } - ], - "id": 210, - "name": "FunctionCall", - "src": "3592:39:1" - } - ], - "id": 211, - "name": "ExpressionStatement", - "src": "3592:39:1" - } - ], - "id": 212, - "name": "Block", - "src": "3469:169:1" - } - ], - "id": 213, - "name": "FunctionDefinition", - "src": "3438:200:1" - }, - { - "attributes": { - "functionSelector": "6e7a6f4b", - "implemented": true, - "isConstructor": false, - "kind": "function", - "modifiers": [ - null - ], - "name": "enableStorage", - "overrides": null, - "scope": 1073, - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "public" - }, - "children": [ - { - "attributes": { - "text": " @dev Registers a new storage that can accept GeoDID document creation" - }, - "id": 214, - "name": "StructuredDocumentation", - "src": "3644:88:1" - }, - { - "children": [ - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "offChainStorage", - "overrides": null, - "scope": 244, - "stateVariable": false, - "storageLocation": "default", - "type": "bytes32", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "bytes32", - "type": "bytes32" - }, - "id": 215, - "name": "ElementaryTypeName", - "src": "3760:7:1" - } - ], - "id": 216, - "name": "VariableDeclaration", - "src": "3760:23:1" - } - ], - "id": 217, - "name": "ParameterList", - "src": "3759:25:1" - }, - { - "attributes": { - "parameters": [ - null - ] - }, - "children": [], - "id": 218, - "name": "ParameterList", - "src": "3792:0:1" - }, - { - "children": [ - { - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [ - null - ], - "tryCall": false, - "type": "tuple()", - "type_conversion": false - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_217cfcce26face481fde3359afaf9f2136dc9bfd5af0a63745f2341a24673a9f", - "typeString": "literal_string \"SpatialAssets: must have admin role to edit allowed offchain storages\"" - } - ], - "overloadedDeclarations": [ - -18, - -18 - ], - "referencedDeclaration": -18, - "type": "function (bool,string memory) pure", - "value": "require" - }, - "id": 219, - "name": "Identifier", - "src": "3802:7:1" - }, - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [ - null - ], - "tryCall": false, - "type": "bool", - "type_conversion": false - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - ], - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 1148, - "type": "function (bytes32,address) view returns (bool)", - "value": "hasRole" - }, - "id": 220, - "name": "Identifier", - "src": "3810:7:1" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 1102, - "type": "bytes32", - "value": "DEFAULT_ADMIN_ROLE" - }, - "id": 221, - "name": "Identifier", - "src": "3818:18:1" - }, - { - "attributes": { - "argumentTypes": null, - "arguments": [ - null - ], - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [ - null - ], - "tryCall": false, - "type": "address payable", - "type_conversion": false - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - null - ], - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 1666, - "type": "function () view returns (address payable)", - "value": "_msgSender" - }, - "id": 222, - "name": "Identifier", - "src": "3838:10:1" - } - ], - "id": 223, - "name": "FunctionCall", - "src": "3838:12:1" - } - ], - "id": 224, - "name": "FunctionCall", - "src": "3810:41:1" - }, - { - "attributes": { - "argumentTypes": null, - "hexvalue": "5370617469616c4173736574733a206d75737420686176652061646d696e20726f6c6520746f206564697420616c6c6f776564206f6666636861696e2073746f7261676573", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "subdenomination": null, - "token": "string", - "type": "literal_string \"SpatialAssets: must have admin role to edit allowed offchain storages\"", - "value": "SpatialAssets: must have admin role to edit allowed offchain storages" - }, - "id": 225, - "name": "Literal", - "src": "3853:71:1" - } - ], - "id": 226, - "name": "FunctionCall", - "src": "3802:123:1" - } - ], - "id": 227, - "name": "ExpressionStatement", - "src": "3802:123:1" - }, - { - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [ - null - ], - "tryCall": false, - "type": "tuple()", - "type_conversion": false - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_8fee17d368687c80e4deac3f133d29733581706ec6213898eb6c5db439fb45d7", - "typeString": "literal_string \"SpatialAssets: storage must not be active yet\"" - } - ], - "overloadedDeclarations": [ - -18, - -18 - ], - "referencedDeclaration": -18, - "type": "function (bool,string memory) pure", - "value": "require" - }, - "id": 228, - "name": "Identifier", - "src": "3935:7:1" - }, - { - "attributes": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": "==", - "type": "bool" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "type": "bool" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 169, - "type": "mapping(bytes32 => bool)", - "value": "_allowedStorages" - }, - "id": 229, - "name": "Identifier", - "src": "3943:16:1" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 216, - "type": "bytes32", - "value": "offChainStorage" - }, - "id": 230, - "name": "Identifier", - "src": "3960:15:1" - } - ], - "id": 231, - "name": "IndexAccess", - "src": "3943:33:1" - }, - { - "attributes": { - "argumentTypes": null, - "hexvalue": "66616c7365", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "subdenomination": null, - "token": "bool", - "type": "bool", - "value": "false" - }, - "id": 232, - "name": "Literal", - "src": "3979:5:1" - } - ], - "id": 233, - "name": "BinaryOperation", - "src": "3943:41:1" - }, - { - "attributes": { - "argumentTypes": null, - "hexvalue": "5370617469616c4173736574733a2073746f72616765206d757374206e6f742062652061637469766520796574", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "subdenomination": null, - "token": "string", - "type": "literal_string \"SpatialAssets: storage must not be active yet\"", - "value": "SpatialAssets: storage must not be active yet" - }, - "id": 234, - "name": "Literal", - "src": "3986:47:1" - } - ], - "id": 235, - "name": "FunctionCall", - "src": "3935:99:1" - } - ], - "id": 236, - "name": "ExpressionStatement", - "src": "3935:99:1" - }, - { - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": "=", - "type": "bool" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "type": "bool" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 169, - "type": "mapping(bytes32 => bool)", - "value": "_allowedStorages" - }, - "id": 237, - "name": "Identifier", - "src": "4044:16:1" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 216, - "type": "bytes32", - "value": "offChainStorage" - }, - "id": 238, - "name": "Identifier", - "src": "4061:15:1" - } - ], - "id": 239, - "name": "IndexAccess", - "src": "4044:33:1" - }, - { - "attributes": { - "argumentTypes": null, - "hexvalue": "74727565", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "subdenomination": null, - "token": "bool", - "type": "bool", - "value": "true" - }, - "id": 240, - "name": "Literal", - "src": "4080:4:1" - } - ], - "id": 241, - "name": "Assignment", - "src": "4044:40:1" - } - ], - "id": 242, - "name": "ExpressionStatement", - "src": "4044:40:1" - } - ], - "id": 243, - "name": "Block", - "src": "3792:299:1" - } - ], - "id": 244, - "name": "FunctionDefinition", - "src": "3737:354:1" - }, - { - "attributes": { - "functionSelector": "fd52c0d5", - "implemented": true, - "isConstructor": false, - "kind": "function", - "modifiers": [ - null - ], - "name": "disableStorage", - "overrides": null, - "scope": 1073, - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "public" - }, - "children": [ - { - "attributes": { - "text": " @dev Disables an existing storage" - }, - "id": 245, - "name": "StructuredDocumentation", - "src": "4097:52:1" - }, - { - "children": [ - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "offChainStorage", - "overrides": null, - "scope": 266, - "stateVariable": false, - "storageLocation": "default", - "type": "bytes32", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "bytes32", - "type": "bytes32" - }, - "id": 246, - "name": "ElementaryTypeName", - "src": "4178:7:1" - } - ], - "id": 247, - "name": "VariableDeclaration", - "src": "4178:23:1" - } - ], - "id": 248, - "name": "ParameterList", - "src": "4177:25:1" - }, - { - "attributes": { - "parameters": [ - null - ] - }, - "children": [], - "id": 249, - "name": "ParameterList", - "src": "4210:0:1" - }, - { - "children": [ - { - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [ - null - ], - "tryCall": false, - "type": "tuple()", - "type_conversion": false - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_217cfcce26face481fde3359afaf9f2136dc9bfd5af0a63745f2341a24673a9f", - "typeString": "literal_string \"SpatialAssets: must have admin role to edit allowed offchain storages\"" - } - ], - "overloadedDeclarations": [ - -18, - -18 - ], - "referencedDeclaration": -18, - "type": "function (bool,string memory) pure", - "value": "require" - }, - "id": 250, - "name": "Identifier", - "src": "4220:7:1" - }, - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [ - null - ], - "tryCall": false, - "type": "bool", - "type_conversion": false - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - ], - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 1148, - "type": "function (bytes32,address) view returns (bool)", - "value": "hasRole" - }, - "id": 251, - "name": "Identifier", - "src": "4228:7:1" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 1102, - "type": "bytes32", - "value": "DEFAULT_ADMIN_ROLE" - }, - "id": 252, - "name": "Identifier", - "src": "4236:18:1" - }, - { - "attributes": { - "argumentTypes": null, - "arguments": [ - null - ], - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [ - null - ], - "tryCall": false, - "type": "address payable", - "type_conversion": false - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - null - ], - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 1666, - "type": "function () view returns (address payable)", - "value": "_msgSender" - }, - "id": 253, - "name": "Identifier", - "src": "4256:10:1" - } - ], - "id": 254, - "name": "FunctionCall", - "src": "4256:12:1" - } - ], - "id": 255, - "name": "FunctionCall", - "src": "4228:41:1" - }, - { - "attributes": { - "argumentTypes": null, - "hexvalue": "5370617469616c4173736574733a206d75737420686176652061646d696e20726f6c6520746f206564697420616c6c6f776564206f6666636861696e2073746f7261676573", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "subdenomination": null, - "token": "string", - "type": "literal_string \"SpatialAssets: must have admin role to edit allowed offchain storages\"", - "value": "SpatialAssets: must have admin role to edit allowed offchain storages" - }, - "id": 256, - "name": "Literal", - "src": "4271:71:1" - } - ], - "id": 257, - "name": "FunctionCall", - "src": "4220:123:1" - } - ], - "id": 258, - "name": "ExpressionStatement", - "src": "4220:123:1" - }, - { - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": "=", - "type": "bool" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "type": "bool" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 169, - "type": "mapping(bytes32 => bool)", - "value": "_allowedStorages" - }, - "id": 259, - "name": "Identifier", - "src": "4353:16:1" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 247, - "type": "bytes32", - "value": "offChainStorage" - }, - "id": 260, - "name": "Identifier", - "src": "4370:15:1" - } - ], - "id": 261, - "name": "IndexAccess", - "src": "4353:33:1" - }, - { - "attributes": { - "argumentTypes": null, - "hexvalue": "66616c7365", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "subdenomination": null, - "token": "bool", - "type": "bool", - "value": "false" - }, - "id": 262, - "name": "Literal", - "src": "4389:5:1" - } - ], - "id": 263, - "name": "Assignment", - "src": "4353:41:1" - } - ], - "id": 264, - "name": "ExpressionStatement", - "src": "4353:41:1" - } - ], - "id": 265, - "name": "Block", - "src": "4210:191:1" - } - ], - "id": 266, - "name": "FunctionDefinition", - "src": "4154:247:1" - }, - { - "attributes": { - "functionSelector": "b22de880", - "implemented": true, - "isConstructor": false, - "kind": "function", - "modifiers": [ - null - ], - "name": "registerSpatialAsset", - "overrides": null, - "scope": 1073, - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "public" - }, - "children": [ - { - "attributes": { - "text": " @dev Registers one spatial asset with external storage 'data' and assigns them to `account`.\n Emits a {SpatialAssetRegistered} event." - }, - "id": 267, - "name": "StructuredDocumentation", - "src": "4408:165:1" - }, - { - "children": [ - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "owner", - "overrides": null, - "scope": 464, - "stateVariable": false, - "storageLocation": "default", - "type": "address", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "address", - "stateMutability": "nonpayable", - "type": "address" - }, - "id": 268, - "name": "ElementaryTypeName", - "src": "4608:7:1" - } - ], - "id": 269, - "name": "VariableDeclaration", - "src": "4608:13:1" - }, - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "geoDIDId", - "overrides": null, - "scope": 464, - "stateVariable": false, - "storageLocation": "default", - "type": "bytes32", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "bytes32", - "type": "bytes32" - }, - "id": 270, - "name": "ElementaryTypeName", - "src": "4623:7:1" - } - ], - "id": 271, - "name": "VariableDeclaration", - "src": "4623:16:1" - }, - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "parentGeoDIDId", - "overrides": null, - "scope": 464, - "stateVariable": false, - "storageLocation": "default", - "type": "bytes32", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "bytes32", - "type": "bytes32" - }, - "id": 272, - "name": "ElementaryTypeName", - "src": "4641:7:1" - } - ], - "id": 273, - "name": "VariableDeclaration", - "src": "4641:22:1" - }, - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "childrenGeoDIDIds", - "overrides": null, - "scope": 464, - "stateVariable": false, - "storageLocation": "memory", - "type": "bytes32[]", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "length": null, - "type": "bytes32[]" - }, - "children": [ - { - "attributes": { - "name": "bytes32", - "type": "bytes32" - }, - "id": 274, - "name": "ElementaryTypeName", - "src": "4666:7:1" - } - ], - "id": 275, - "name": "ArrayTypeName", - "src": "4666:9:1" - } - ], - "id": 276, - "name": "VariableDeclaration", - "src": "4666:34:1" - }, - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "cid", - "overrides": null, - "scope": 464, - "stateVariable": false, - "storageLocation": "default", - "type": "bytes32", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "bytes32", - "type": "bytes32" - }, - "id": 277, - "name": "ElementaryTypeName", - "src": "4702:7:1" - } - ], - "id": 278, - "name": "VariableDeclaration", - "src": "4702:11:1" - }, - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "offChainStorage", - "overrides": null, - "scope": 464, - "stateVariable": false, - "storageLocation": "default", - "type": "bytes32", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "bytes32", - "type": "bytes32" - }, - "id": 279, - "name": "ElementaryTypeName", - "src": "4715:7:1" - } - ], - "id": 280, - "name": "VariableDeclaration", - "src": "4715:23:1" - }, - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "geoDIDtype", - "overrides": null, - "scope": 464, - "stateVariable": false, - "storageLocation": "default", - "type": "uint256", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "uint256", - "type": "uint256" - }, - "id": 281, - "name": "ElementaryTypeName", - "src": "4740:7:1" - } - ], - "id": 282, - "name": "VariableDeclaration", - "src": "4740:18:1" - } - ], - "id": 283, - "name": "ParameterList", - "src": "4607:152:1" - }, - { - "attributes": { - "parameters": [ - null - ] - }, - "children": [], - "id": 284, - "name": "ParameterList", - "src": "4767:0:1" - }, - { - "children": [ - { - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [ - null - ], - "tryCall": false, - "type": "tuple()", - "type_conversion": false - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_a63f9d7c89af474141c60ef50b69afc5ff92c5a8bca01ae8bf1ad58a8d517343", - "typeString": "literal_string \"SpatialAssets: must have data supplier role to register\"" - } - ], - "overloadedDeclarations": [ - -18, - -18 - ], - "referencedDeclaration": -18, - "type": "function (bool,string memory) pure", - "value": "require" - }, - "id": 285, - "name": "Identifier", - "src": "4777:7:1" - }, - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [ - null - ], - "tryCall": false, - "type": "bool", - "type_conversion": false - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - ], - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 1148, - "type": "function (bytes32,address) view returns (bool)", - "value": "hasRole" - }, - "id": 286, - "name": "Identifier", - "src": "4785:7:1" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 139, - "type": "bytes32", - "value": "DATA_SUPPLIER" - }, - "id": 287, - "name": "Identifier", - "src": "4793:13:1" - }, - { - "attributes": { - "argumentTypes": null, - "arguments": [ - null - ], - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [ - null - ], - "tryCall": false, - "type": "address payable", - "type_conversion": false - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - null - ], - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 1666, - "type": "function () view returns (address payable)", - "value": "_msgSender" - }, - "id": 288, - "name": "Identifier", - "src": "4808:10:1" - } - ], - "id": 289, - "name": "FunctionCall", - "src": "4808:12:1" - } - ], - "id": 290, - "name": "FunctionCall", - "src": "4785:36:1" - }, - { - "attributes": { - "argumentTypes": null, - "hexvalue": "5370617469616c4173736574733a206d7573742068617665206461746120737570706c69657220726f6c6520746f207265676973746572", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "subdenomination": null, - "token": "string", - "type": "literal_string \"SpatialAssets: must have data supplier role to register\"", - "value": "SpatialAssets: must have data supplier role to register" - }, - "id": 291, - "name": "Literal", - "src": "4823:57:1" - } - ], - "id": 292, - "name": "FunctionCall", - "src": "4777:104:1" - } - ], - "id": 293, - "name": "ExpressionStatement", - "src": "4777:104:1" - }, - { - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [ - null - ], - "tryCall": false, - "type": "tuple()", - "type_conversion": false - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_0ae99bd2d2bc928ba974a4c0584b94117dc577f73fe645d1eace2711f12192a2", - "typeString": "literal_string \"SpatialAssets: storage must be allowed\"" - } - ], - "overloadedDeclarations": [ - -18, - -18 - ], - "referencedDeclaration": -18, - "type": "function (bool,string memory) pure", - "value": "require" - }, - "id": 294, - "name": "Identifier", - "src": "4891:7:1" - }, - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [ - null - ], - "tryCall": false, - "type": "bool", - "type_conversion": false - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - ], - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 1064, - "type": "function (bytes32) view returns (bool)", - "value": "allowedStorages" - }, - "id": 295, - "name": "Identifier", - "src": "4899:15:1" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 280, - "type": "bytes32", - "value": "offChainStorage" - }, - "id": 296, - "name": "Identifier", - "src": "4915:15:1" - } - ], - "id": 297, - "name": "FunctionCall", - "src": "4899:32:1" - }, - { - "attributes": { - "argumentTypes": null, - "hexvalue": "5370617469616c4173736574733a2073746f72616765206d75737420626520616c6c6f776564", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "subdenomination": null, - "token": "string", - "type": "literal_string \"SpatialAssets: storage must be allowed\"", - "value": "SpatialAssets: storage must be allowed" - }, - "id": 298, - "name": "Literal", - "src": "4933:40:1" - } - ], - "id": 299, - "name": "FunctionCall", - "src": "4891:83:1" - } - ], - "id": 300, - "name": "ExpressionStatement", - "src": "4891:83:1" - }, - { - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [ - null - ], - "tryCall": false, - "type": "tuple()", - "type_conversion": false - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_a2ba2ebfc38e548fefdb3c30fe605533706b9d98e3015ed81adb67a22d6cd33c", - "typeString": "literal_string \"SpatialAssets: id must not have an owner yet\"" - } - ], - "overloadedDeclarations": [ - -18, - -18 - ], - "referencedDeclaration": -18, - "type": "function (bool,string memory) pure", - "value": "require" - }, - "id": 301, - "name": "Identifier", - "src": "4984:7:1" - }, - { - "attributes": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": "==", - "type": "bool" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "type": "address" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 145, - "type": "mapping(bytes32 => address)", - "value": "_owners" - }, - "id": 302, - "name": "Identifier", - "src": "4992:7:1" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 271, - "type": "bytes32", - "value": "geoDIDId" - }, - "id": 303, - "name": "Identifier", - "src": "5000:8:1" - } - ], - "id": 304, - "name": "IndexAccess", - "src": "4992:17:1" - }, - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": true, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [ - null - ], - "tryCall": false, - "type": "address payable", - "type_conversion": true - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - } - ], - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "type": "type(address)" - }, - "children": [ - { - "attributes": { - "name": "address", - "type": null - }, - "id": 305, - "name": "ElementaryTypeName", - "src": "5013:7:1" - } - ], - "id": 306, - "name": "ElementaryTypeNameExpression", - "src": "5013:7:1" - }, - { - "attributes": { - "argumentTypes": null, - "hexvalue": "30", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "subdenomination": null, - "token": "number", - "type": "int_const 0", - "value": "0" - }, - "id": 307, - "name": "Literal", - "src": "5021:1:1" - } - ], - "id": 308, - "name": "FunctionCall", - "src": "5013:10:1" - } - ], - "id": 309, - "name": "BinaryOperation", - "src": "4992:31:1" - }, - { - "attributes": { - "argumentTypes": null, - "hexvalue": "5370617469616c4173736574733a206964206d757374206e6f74206861766520616e206f776e657220796574", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "subdenomination": null, - "token": "string", - "type": "literal_string \"SpatialAssets: id must not have an owner yet\"", - "value": "SpatialAssets: id must not have an owner yet" - }, - "id": 310, - "name": "Literal", - "src": "5025:46:1" - } - ], - "id": 311, - "name": "FunctionCall", - "src": "4984:88:1" - } - ], - "id": 312, - "name": "ExpressionStatement", - "src": "4984:88:1" - }, - { - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [ - null - ], - "tryCall": false, - "type": "tuple()", - "type_conversion": false - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_e674447e79034d68bd1c7f2aa0a8d31190ad751eb2b878eced3a014448a54daa", - "typeString": "literal_string \"Spatial Assets: wrong geodidtype\"" - } - ], - "overloadedDeclarations": [ - -18, - -18 - ], - "referencedDeclaration": -18, - "type": "function (bool,string memory) pure", - "value": "require" - }, - "id": 313, - "name": "Identifier", - "src": "5082:7:1" - }, - { - "attributes": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": "||", - "type": "bool" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": "==", - "type": "bool" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 282, - "type": "uint256", - "value": "geoDIDtype" - }, - "id": 314, - "name": "Identifier", - "src": "5090:10:1" - }, - { - "attributes": { - "argumentTypes": null, - "hexvalue": "30", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "subdenomination": null, - "token": "number", - "type": "int_const 0", - "value": "0" - }, - "id": 315, - "name": "Literal", - "src": "5105:1:1" - } - ], - "id": 316, - "name": "BinaryOperation", - "src": "5090:16:1" - }, - { - "attributes": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": "==", - "type": "bool" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 282, - "type": "uint256", - "value": "geoDIDtype" - }, - "id": 317, - "name": "Identifier", - "src": "5110:10:1" - }, - { - "attributes": { - "argumentTypes": null, - "hexvalue": "31", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "subdenomination": null, - "token": "number", - "type": "int_const 1", - "value": "1" - }, - "id": 318, - "name": "Literal", - "src": "5124:1:1" - } - ], - "id": 319, - "name": "BinaryOperation", - "src": "5110:15:1" - } - ], - "id": 320, - "name": "BinaryOperation", - "src": "5090:35:1" - }, - { - "attributes": { - "argumentTypes": null, - "hexvalue": "5370617469616c204173736574733a2077726f6e672067656f64696474797065", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "subdenomination": null, - "token": "string", - "type": "literal_string \"Spatial Assets: wrong geodidtype\"", - "value": "Spatial Assets: wrong geodidtype" - }, - "id": 321, - "name": "Literal", - "src": "5127:34:1" - } - ], - "id": 322, - "name": "FunctionCall", - "src": "5082:80:1" - } - ], - "id": 323, - "name": "ExpressionStatement", - "src": "5082:80:1" - }, - { - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": "=", - "type": "bytes32" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "type": "bytes32" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 149, - "type": "mapping(bytes32 => bytes32)", - "value": "_cids" - }, - "id": 324, - "name": "Identifier", - "src": "5173:5:1" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 271, - "type": "bytes32", - "value": "geoDIDId" - }, - "id": 325, - "name": "Identifier", - "src": "5179:8:1" - } - ], - "id": 326, - "name": "IndexAccess", - "src": "5173:15:1" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 278, - "type": "bytes32", - "value": "cid" - }, - "id": 327, - "name": "Identifier", - "src": "5190:3:1" - } - ], - "id": 328, - "name": "Assignment", - "src": "5173:20:1" - } - ], - "id": 329, - "name": "ExpressionStatement", - "src": "5173:20:1" - }, - { - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": "=", - "type": "address" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "type": "address" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 145, - "type": "mapping(bytes32 => address)", - "value": "_owners" - }, - "id": 330, - "name": "Identifier", - "src": "5203:7:1" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 271, - "type": "bytes32", - "value": "geoDIDId" - }, - "id": 331, - "name": "Identifier", - "src": "5211:8:1" - } - ], - "id": 332, - "name": "IndexAccess", - "src": "5203:17:1" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 269, - "type": "address", - "value": "owner" - }, - "id": 333, - "name": "Identifier", - "src": "5223:5:1" - } - ], - "id": 334, - "name": "Assignment", - "src": "5203:25:1" - } - ], - "id": 335, - "name": "ExpressionStatement", - "src": "5203:25:1" - }, - { - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": "=", - "type": "bytes32" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "type": "bytes32" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 165, - "type": "mapping(bytes32 => bytes32)", - "value": "_externalStorage" - }, - "id": 336, - "name": "Identifier", - "src": "5238:16:1" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 271, - "type": "bytes32", - "value": "geoDIDId" - }, - "id": 337, - "name": "Identifier", - "src": "5255:8:1" - } - ], - "id": 338, - "name": "IndexAccess", - "src": "5238:26:1" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 280, - "type": "bytes32", - "value": "offChainStorage" - }, - "id": 339, - "name": "Identifier", - "src": "5267:15:1" - } - ], - "id": 340, - "name": "Assignment", - "src": "5238:44:1" - } - ], - "id": 341, - "name": "ExpressionStatement", - "src": "5238:44:1" - }, - { - "children": [ - { - "attributes": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": "==", - "type": "bool" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 282, - "type": "uint256", - "value": "geoDIDtype" - }, - "id": 342, - "name": "Identifier", - "src": "5297:10:1" - }, - { - "attributes": { - "argumentTypes": null, - "hexvalue": "30", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "subdenomination": null, - "token": "number", - "type": "int_const 0", - "value": "0" - }, - "id": 343, - "name": "Literal", - "src": "5311:1:1" - } - ], - "id": 344, - "name": "BinaryOperation", - "src": "5297:15:1" - }, - { - "children": [ - { - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": "=", - "type": "bool" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "type": "bool" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 157, - "type": "mapping(bytes32 => bool)", - "value": "_canBeParent" - }, - "id": 345, - "name": "Identifier", - "src": "5328:12:1" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 271, - "type": "bytes32", - "value": "geoDIDId" - }, - "id": 346, - "name": "Identifier", - "src": "5341:8:1" - } - ], - "id": 347, - "name": "IndexAccess", - "src": "5328:22:1" - }, - { - "attributes": { - "argumentTypes": null, - "hexvalue": "74727565", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "subdenomination": null, - "token": "bool", - "type": "bool", - "value": "true" - }, - "id": 348, - "name": "Literal", - "src": "5353:4:1" - } - ], - "id": 349, - "name": "Assignment", - "src": "5328:29:1" - } - ], - "id": 350, - "name": "ExpressionStatement", - "src": "5328:29:1" - } - ], - "id": 351, - "name": "Block", - "src": "5314:54:1" - }, - { - "attributes": { - "falseBody": null - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": "==", - "type": "bool" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 282, - "type": "uint256", - "value": "geoDIDtype" - }, - "id": 352, - "name": "Identifier", - "src": "5378:10:1" - }, - { - "attributes": { - "argumentTypes": null, - "hexvalue": "31", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "subdenomination": null, - "token": "number", - "type": "int_const 1", - "value": "1" - }, - "id": 353, - "name": "Literal", - "src": "5392:1:1" - } - ], - "id": 354, - "name": "BinaryOperation", - "src": "5378:15:1" - }, - { - "children": [ - { - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": "=", - "type": "bool" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "type": "bool" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 157, - "type": "mapping(bytes32 => bool)", - "value": "_canBeParent" - }, - "id": 355, - "name": "Identifier", - "src": "5409:12:1" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 271, - "type": "bytes32", - "value": "geoDIDId" - }, - "id": 356, - "name": "Identifier", - "src": "5422:8:1" - } - ], - "id": 357, - "name": "IndexAccess", - "src": "5409:22:1" - }, - { - "attributes": { - "argumentTypes": null, - "hexvalue": "66616c7365", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "subdenomination": null, - "token": "bool", - "type": "bool", - "value": "false" - }, - "id": 358, - "name": "Literal", - "src": "5434:5:1" - } - ], - "id": 359, - "name": "Assignment", - "src": "5409:30:1" - } - ], - "id": 360, - "name": "ExpressionStatement", - "src": "5409:30:1" - } - ], - "id": 361, - "name": "Block", - "src": "5395:55:1" - } - ], - "id": 362, - "name": "IfStatement", - "src": "5374:76:1" - } - ], - "id": 363, - "name": "IfStatement", - "src": "5293:157:1" - }, - { - "children": [ - { - "attributes": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": "==", - "type": "bool" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 273, - "type": "bytes32", - "value": "parentGeoDIDId" - }, - "id": 364, - "name": "Identifier", - "src": "5464:14:1" - }, - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": true, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [ - null - ], - "tryCall": false, - "type": "bytes32", - "type_conversion": true - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - } - ], - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "type": "type(bytes32)" - }, - "children": [ - { - "attributes": { - "name": "bytes32", - "type": null - }, - "id": 365, - "name": "ElementaryTypeName", - "src": "5482:7:1" - } - ], - "id": 366, - "name": "ElementaryTypeNameExpression", - "src": "5482:7:1" - }, - { - "attributes": { - "argumentTypes": null, - "hexvalue": "30", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "subdenomination": null, - "token": "number", - "type": "int_const 0", - "value": "0" - }, - "id": 367, - "name": "Literal", - "src": "5490:1:1" - } - ], - "id": 368, - "name": "FunctionCall", - "src": "5482:10:1" - } - ], - "id": 369, - "name": "BinaryOperation", - "src": "5464:28:1" - }, - { - "children": [ - { - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": "=", - "type": "bool" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "type": "bool" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 153, - "type": "mapping(bytes32 => bool)", - "value": "_hasParent" - }, - "id": 370, - "name": "Identifier", - "src": "5508:10:1" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 271, - "type": "bytes32", - "value": "geoDIDId" - }, - "id": 371, - "name": "Identifier", - "src": "5519:8:1" - } - ], - "id": 372, - "name": "IndexAccess", - "src": "5508:20:1" - }, - { - "attributes": { - "argumentTypes": null, - "hexvalue": "66616c7365", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "subdenomination": null, - "token": "bool", - "type": "bool", - "value": "false" - }, - "id": 373, - "name": "Literal", - "src": "5531:5:1" - } - ], - "id": 374, - "name": "Assignment", - "src": "5508:28:1" - } - ], - "id": 375, - "name": "ExpressionStatement", - "src": "5508:28:1" - }, - { - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": "=", - "type": "bytes32" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "type": "bytes32" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 161, - "type": "mapping(bytes32 => bytes32)", - "value": "_root" - }, - "id": 376, - "name": "Identifier", - "src": "5550:5:1" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 271, - "type": "bytes32", - "value": "geoDIDId" - }, - "id": 377, - "name": "Identifier", - "src": "5556:8:1" - } - ], - "id": 378, - "name": "IndexAccess", - "src": "5550:15:1" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 271, - "type": "bytes32", - "value": "geoDIDId" - }, - "id": 379, - "name": "Identifier", - "src": "5568:8:1" - } - ], - "id": 380, - "name": "Assignment", - "src": "5550:26:1" - } - ], - "id": 381, - "name": "ExpressionStatement", - "src": "5550:26:1" - }, - { - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [ - null - ], - "tryCall": false, - "type": "tuple()", - "type_conversion": false - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - ], - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 80, - "type": "function (address,bytes32,bytes32,bytes32,bytes32,bool)", - "value": "SpatialAssetRegistered" - }, - "id": 382, - "name": "Identifier", - "src": "5591:22:1" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 269, - "type": "address", - "value": "owner" - }, - "id": 383, - "name": "Identifier", - "src": "5614:5:1" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 271, - "type": "bytes32", - "value": "geoDIDId" - }, - "id": 384, - "name": "Identifier", - "src": "5621:8:1" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 278, - "type": "bytes32", - "value": "cid" - }, - "id": 385, - "name": "Identifier", - "src": "5631:3:1" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 280, - "type": "bytes32", - "value": "offChainStorage" - }, - "id": 386, - "name": "Identifier", - "src": "5636:15:1" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 271, - "type": "bytes32", - "value": "geoDIDId" - }, - "id": 387, - "name": "Identifier", - "src": "5653:8:1" - }, - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "type": "bool" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 157, - "type": "mapping(bytes32 => bool)", - "value": "_canBeParent" - }, - "id": 388, - "name": "Identifier", - "src": "5663:12:1" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 271, - "type": "bytes32", - "value": "geoDIDId" - }, - "id": 389, - "name": "Identifier", - "src": "5676:8:1" - } - ], - "id": 390, - "name": "IndexAccess", - "src": "5663:22:1" - } - ], - "id": 391, - "name": "FunctionCall", - "src": "5591:95:1" - } - ], - "id": 392, - "name": "EmitStatement", - "src": "5586:100:1" - } - ], - "id": 393, - "name": "Block", - "src": "5494:203:1" - }, - { - "children": [ - { - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": "=", - "type": "bool" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "type": "bool" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 153, - "type": "mapping(bytes32 => bool)", - "value": "_hasParent" - }, - "id": 394, - "name": "Identifier", - "src": "5717:10:1" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 271, - "type": "bytes32", - "value": "geoDIDId" - }, - "id": 395, - "name": "Identifier", - "src": "5728:8:1" - } - ], - "id": 396, - "name": "IndexAccess", - "src": "5717:20:1" - }, - { - "attributes": { - "argumentTypes": null, - "hexvalue": "74727565", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "subdenomination": null, - "token": "bool", - "type": "bool", - "value": "true" - }, - "id": 397, - "name": "Literal", - "src": "5740:4:1" - } - ], - "id": 398, - "name": "Assignment", - "src": "5717:27:1" - } - ], - "id": 399, - "name": "ExpressionStatement", - "src": "5717:27:1" - }, - { - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [ - null - ], - "tryCall": false, - "type": "tuple()", - "type_conversion": false - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - ], - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 80, - "type": "function (address,bytes32,bytes32,bytes32,bytes32,bool)", - "value": "SpatialAssetRegistered" - }, - "id": 400, - "name": "Identifier", - "src": "5763:22:1" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 269, - "type": "address", - "value": "owner" - }, - "id": 401, - "name": "Identifier", - "src": "5786:5:1" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 271, - "type": "bytes32", - "value": "geoDIDId" - }, - "id": 402, - "name": "Identifier", - "src": "5793:8:1" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 278, - "type": "bytes32", - "value": "cid" - }, - "id": 403, - "name": "Identifier", - "src": "5803:3:1" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 280, - "type": "bytes32", - "value": "offChainStorage" - }, - "id": 404, - "name": "Identifier", - "src": "5808:15:1" - }, - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "type": "bytes32" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 161, - "type": "mapping(bytes32 => bytes32)", - "value": "_root" - }, - "id": 405, - "name": "Identifier", - "src": "5825:5:1" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 273, - "type": "bytes32", - "value": "parentGeoDIDId" - }, - "id": 406, - "name": "Identifier", - "src": "5831:14:1" - } - ], - "id": 407, - "name": "IndexAccess", - "src": "5825:21:1" - }, - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "type": "bool" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 157, - "type": "mapping(bytes32 => bool)", - "value": "_canBeParent" - }, - "id": 408, - "name": "Identifier", - "src": "5848:12:1" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 271, - "type": "bytes32", - "value": "geoDIDId" - }, - "id": 409, - "name": "Identifier", - "src": "5861:8:1" - } - ], - "id": 410, - "name": "IndexAccess", - "src": "5848:22:1" - } - ], - "id": 411, - "name": "FunctionCall", - "src": "5763:108:1" - } - ], - "id": 412, - "name": "EmitStatement", - "src": "5758:113:1" - }, - { - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [ - null - ], - "tryCall": false, - "type": "tuple()", - "type_conversion": false - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - ], - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 92, - "type": "function (bytes32,bytes32)", - "value": "ParentAdded" - }, - "id": 413, - "name": "Identifier", - "src": "5890:11:1" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 271, - "type": "bytes32", - "value": "geoDIDId" - }, - "id": 414, - "name": "Identifier", - "src": "5902:8:1" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 273, - "type": "bytes32", - "value": "parentGeoDIDId" - }, - "id": 415, - "name": "Identifier", - "src": "5912:14:1" - } - ], - "id": 416, - "name": "FunctionCall", - "src": "5890:37:1" - } - ], - "id": 417, - "name": "EmitStatement", - "src": "5885:42:1" - } - ], - "id": 418, - "name": "Block", - "src": "5703:235:1" - } - ], - "id": 419, - "name": "IfStatement", - "src": "5460:478:1" - }, - { - "attributes": { - "assignments": [ - 421 - ] - }, - "children": [ - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "childrensLen", - "overrides": null, - "scope": 463, - "stateVariable": false, - "storageLocation": "default", - "type": "uint256", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "uint256", - "type": "uint256" - }, - "id": 420, - "name": "ElementaryTypeName", - "src": "5948:7:1" - } - ], - "id": 421, - "name": "VariableDeclaration", - "src": "5948:20:1" - }, - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "member_name": "length", - "referencedDeclaration": null, - "type": "uint256" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 276, - "type": "bytes32[] memory", - "value": "childrenGeoDIDIds" - }, - "id": 422, - "name": "Identifier", - "src": "5971:17:1" - } - ], - "id": 423, - "name": "MemberAccess", - "src": "5971:24:1" - } - ], - "id": 424, - "name": "VariableDeclarationStatement", - "src": "5948:47:1" - }, - { - "attributes": { - "falseBody": null - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": "&&", - "type": "bool" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": ">", - "type": "bool" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 421, - "type": "uint256", - "value": "childrensLen" - }, - "id": 425, - "name": "Identifier", - "src": "6010:12:1" - }, - { - "attributes": { - "argumentTypes": null, - "hexvalue": "30", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "subdenomination": null, - "token": "number", - "type": "int_const 0", - "value": "0" - }, - "id": 426, - "name": "Literal", - "src": "6025:1:1" - } - ], - "id": 427, - "name": "BinaryOperation", - "src": "6010:16:1" - }, - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "type": "bool" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 157, - "type": "mapping(bytes32 => bool)", - "value": "_canBeParent" - }, - "id": 428, - "name": "Identifier", - "src": "6030:12:1" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 271, - "type": "bytes32", - "value": "geoDIDId" - }, - "id": 429, - "name": "Identifier", - "src": "6043:8:1" - } - ], - "id": 430, - "name": "IndexAccess", - "src": "6030:22:1" - } - ], - "id": 431, - "name": "BinaryOperation", - "src": "6010:42:1" - }, - { - "children": [ - { - "children": [ - { - "attributes": { - "assignments": [ - 433 - ] - }, - "children": [ - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "j", - "overrides": null, - "scope": 460, - "stateVariable": false, - "storageLocation": "default", - "type": "uint256", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "uint256", - "type": "uint256" - }, - "id": 432, - "name": "ElementaryTypeName", - "src": "6071:7:1" - } - ], - "id": 433, - "name": "VariableDeclaration", - "src": "6071:9:1" - }, - { - "attributes": { - "argumentTypes": null, - "hexvalue": "30", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "subdenomination": null, - "token": "number", - "type": "int_const 0", - "value": "0" - }, - "id": 434, - "name": "Literal", - "src": "6081:1:1" - } - ], - "id": 435, - "name": "VariableDeclarationStatement", - "src": "6071:11:1" - }, - { - "attributes": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": "<", - "type": "bool" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 433, - "type": "uint256", - "value": "j" - }, - "id": 436, - "name": "Identifier", - "src": "6084:1:1" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 421, - "type": "uint256", - "value": "childrensLen" - }, - "id": 437, - "name": "Identifier", - "src": "6088:12:1" - } - ], - "id": 438, - "name": "BinaryOperation", - "src": "6084:16:1" - }, - { - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": "++", - "prefix": false, - "type": "uint256" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 433, - "type": "uint256", - "value": "j" - }, - "id": 439, - "name": "Identifier", - "src": "6102:1:1" - } - ], - "id": 440, - "name": "UnaryOperation", - "src": "6102:3:1" - } - ], - "id": 441, - "name": "ExpressionStatement", - "src": "6102:3:1" - }, - { - "children": [ - { - "attributes": { - "assignments": [ - 443 - ] - }, - "children": [ - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "childrenGeoDID", - "overrides": null, - "scope": 459, - "stateVariable": false, - "storageLocation": "default", - "type": "bytes32", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "bytes32", - "type": "bytes32" - }, - "id": 442, - "name": "ElementaryTypeName", - "src": "6125:7:1" - } - ], - "id": 443, - "name": "VariableDeclaration", - "src": "6125:22:1" - }, - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "type": "bytes32" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 276, - "type": "bytes32[] memory", - "value": "childrenGeoDIDIds" - }, - "id": 444, - "name": "Identifier", - "src": "6150:17:1" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 433, - "type": "uint256", - "value": "j" - }, - "id": 445, - "name": "Identifier", - "src": "6168:1:1" - } - ], - "id": 446, - "name": "IndexAccess", - "src": "6150:20:1" - } - ], - "id": 447, - "name": "VariableDeclarationStatement", - "src": "6125:45:1" - }, - { - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": "=", - "type": "bool" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "type": "bool" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 153, - "type": "mapping(bytes32 => bool)", - "value": "_hasParent" - }, - "id": 448, - "name": "Identifier", - "src": "6188:10:1" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 443, - "type": "bytes32", - "value": "childrenGeoDID" - }, - "id": 449, - "name": "Identifier", - "src": "6199:14:1" - } - ], - "id": 450, - "name": "IndexAccess", - "src": "6188:26:1" - }, - { - "attributes": { - "argumentTypes": null, - "hexvalue": "74727565", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "subdenomination": null, - "token": "bool", - "type": "bool", - "value": "true" - }, - "id": 451, - "name": "Literal", - "src": "6217:4:1" - } - ], - "id": 452, - "name": "Assignment", - "src": "6188:33:1" - } - ], - "id": 453, - "name": "ExpressionStatement", - "src": "6188:33:1" - }, - { - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [ - null - ], - "tryCall": false, - "type": "tuple()", - "type_conversion": false - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - ], - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 99, - "type": "function (bytes32,bytes32)", - "value": "ChildrenAdded" - }, - "id": 454, - "name": "Identifier", - "src": "6244:13:1" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 271, - "type": "bytes32", - "value": "geoDIDId" - }, - "id": 455, - "name": "Identifier", - "src": "6258:8:1" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 443, - "type": "bytes32", - "value": "childrenGeoDID" - }, - "id": 456, - "name": "Identifier", - "src": "6268:14:1" - } - ], - "id": 457, - "name": "FunctionCall", - "src": "6244:39:1" - } - ], - "id": 458, - "name": "EmitStatement", - "src": "6239:44:1" - } - ], - "id": 459, - "name": "Block", - "src": "6107:191:1" - } - ], - "id": 460, - "name": "ForStatement", - "src": "6067:231:1" - } - ], - "id": 461, - "name": "Block", - "src": "6053:255:1" - } - ], - "id": 462, - "name": "IfStatement", - "src": "6006:302:1" - } - ], - "id": 463, - "name": "Block", - "src": "4767:1547:1" - } - ], - "id": 464, - "name": "FunctionDefinition", - "src": "4578:1736:1" - }, - { - "attributes": { - "functionSelector": "bdabcf63", - "implemented": true, - "isConstructor": false, - "kind": "function", - "modifiers": [ - null - ], - "name": "addChildrenGeoDIDs", - "overrides": null, - "scope": 1073, - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "public" - }, - "children": [ - { - "attributes": { - "text": " @dev Adds children GeoDIDs to an already existent geoDID\n Emits a {ChildrenAdded} event." - }, - "id": 465, - "name": "StructuredDocumentation", - "src": "6321:120:1" - }, - { - "children": [ - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "geoDIDId", - "overrides": null, - "scope": 587, - "stateVariable": false, - "storageLocation": "default", - "type": "bytes32", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "bytes32", - "type": "bytes32" - }, - "id": 466, - "name": "ElementaryTypeName", - "src": "6474:7:1" - } - ], - "id": 467, - "name": "VariableDeclaration", - "src": "6474:16:1" - }, - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "childrenGeoDIDIds", - "overrides": null, - "scope": 587, - "stateVariable": false, - "storageLocation": "memory", - "type": "bytes32[]", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "length": null, - "type": "bytes32[]" - }, - "children": [ - { - "attributes": { - "name": "bytes32", - "type": "bytes32" - }, - "id": 468, - "name": "ElementaryTypeName", - "src": "6492:7:1" - } - ], - "id": 469, - "name": "ArrayTypeName", - "src": "6492:9:1" - } - ], - "id": 470, - "name": "VariableDeclaration", - "src": "6492:34:1" - } - ], - "id": 471, - "name": "ParameterList", - "src": "6473:54:1" - }, - { - "attributes": { - "parameters": [ - null - ] - }, - "children": [], - "id": 472, - "name": "ParameterList", - "src": "6535:0:1" - }, - { - "children": [ - { - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [ - null - ], - "tryCall": false, - "type": "tuple()", - "type_conversion": false - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_a63f9d7c89af474141c60ef50b69afc5ff92c5a8bca01ae8bf1ad58a8d517343", - "typeString": "literal_string \"SpatialAssets: must have data supplier role to register\"" - } - ], - "overloadedDeclarations": [ - -18, - -18 - ], - "referencedDeclaration": -18, - "type": "function (bool,string memory) pure", - "value": "require" - }, - "id": 473, - "name": "Identifier", - "src": "6545:7:1" - }, - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [ - null - ], - "tryCall": false, - "type": "bool", - "type_conversion": false - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - ], - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 1148, - "type": "function (bytes32,address) view returns (bool)", - "value": "hasRole" - }, - "id": 474, - "name": "Identifier", - "src": "6553:7:1" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 139, - "type": "bytes32", - "value": "DATA_SUPPLIER" - }, - "id": 475, - "name": "Identifier", - "src": "6561:13:1" - }, - { - "attributes": { - "argumentTypes": null, - "arguments": [ - null - ], - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [ - null - ], - "tryCall": false, - "type": "address payable", - "type_conversion": false - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - null - ], - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 1666, - "type": "function () view returns (address payable)", - "value": "_msgSender" - }, - "id": 476, - "name": "Identifier", - "src": "6576:10:1" - } - ], - "id": 477, - "name": "FunctionCall", - "src": "6576:12:1" - } - ], - "id": 478, - "name": "FunctionCall", - "src": "6553:36:1" - }, - { - "attributes": { - "argumentTypes": null, - "hexvalue": "5370617469616c4173736574733a206d7573742068617665206461746120737570706c69657220726f6c6520746f207265676973746572", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "subdenomination": null, - "token": "string", - "type": "literal_string \"SpatialAssets: must have data supplier role to register\"", - "value": "SpatialAssets: must have data supplier role to register" - }, - "id": 479, - "name": "Literal", - "src": "6591:57:1" - } - ], - "id": 480, - "name": "FunctionCall", - "src": "6545:104:1" - } - ], - "id": 481, - "name": "ExpressionStatement", - "src": "6545:104:1" - }, - { - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [ - null - ], - "tryCall": false, - "type": "tuple()", - "type_conversion": false - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_141f85e6f52bf78350257a4ec10be89d97055fa340c7271b03e584c1efa8c841", - "typeString": "literal_string \"SpatialAssets: geoDIDId must be owned by its creator\"" - } - ], - "overloadedDeclarations": [ - -18, - -18 - ], - "referencedDeclaration": -18, - "type": "function (bool,string memory) pure", - "value": "require" - }, - "id": 482, - "name": "Identifier", - "src": "6659:7:1" - }, - { - "attributes": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": "==", - "type": "bool" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "type": "address" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 145, - "type": "mapping(bytes32 => address)", - "value": "_owners" - }, - "id": 483, - "name": "Identifier", - "src": "6667:7:1" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 467, - "type": "bytes32", - "value": "geoDIDId" - }, - "id": 484, - "name": "Identifier", - "src": "6675:8:1" - } - ], - "id": 485, - "name": "IndexAccess", - "src": "6667:17:1" - }, - { - "attributes": { - "argumentTypes": null, - "arguments": [ - null - ], - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [ - null - ], - "tryCall": false, - "type": "address payable", - "type_conversion": false - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - null - ], - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 1666, - "type": "function () view returns (address payable)", - "value": "_msgSender" - }, - "id": 486, - "name": "Identifier", - "src": "6688:10:1" - } - ], - "id": 487, - "name": "FunctionCall", - "src": "6688:12:1" - } - ], - "id": 488, - "name": "BinaryOperation", - "src": "6667:33:1" - }, - { - "attributes": { - "argumentTypes": null, - "hexvalue": "5370617469616c4173736574733a2067656f4449444964206d757374206265206f776e6564206279206974732063726561746f72", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "subdenomination": null, - "token": "string", - "type": "literal_string \"SpatialAssets: geoDIDId must be owned by its creator\"", - "value": "SpatialAssets: geoDIDId must be owned by its creator" - }, - "id": 489, - "name": "Literal", - "src": "6702:54:1" - } - ], - "id": 490, - "name": "FunctionCall", - "src": "6659:98:1" - } - ], - "id": 491, - "name": "ExpressionStatement", - "src": "6659:98:1" - }, - { - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [ - null - ], - "tryCall": false, - "type": "tuple()", - "type_conversion": false - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_35056da795db0b563126e5da17620c63bcd517d6bd90d17a597656966ba83aa1", - "typeString": "literal_string \"SpatialAssets: geoDIDId must be able to be parent (a Collection)\"" - } - ], - "overloadedDeclarations": [ - -18, - -18 - ], - "referencedDeclaration": -18, - "type": "function (bool,string memory) pure", - "value": "require" - }, - "id": 492, - "name": "Identifier", - "src": "6767:7:1" - }, - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "type": "bool" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 157, - "type": "mapping(bytes32 => bool)", - "value": "_canBeParent" - }, - "id": 493, - "name": "Identifier", - "src": "6775:12:1" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 467, - "type": "bytes32", - "value": "geoDIDId" - }, - "id": 494, - "name": "Identifier", - "src": "6788:8:1" - } - ], - "id": 495, - "name": "IndexAccess", - "src": "6775:22:1" - }, - { - "attributes": { - "argumentTypes": null, - "hexvalue": "5370617469616c4173736574733a2067656f4449444964206d7573742062652061626c6520746f20626520706172656e7420286120436f6c6c656374696f6e29", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "subdenomination": null, - "token": "string", - "type": "literal_string \"SpatialAssets: geoDIDId must be able to be parent (a Collection)\"", - "value": "SpatialAssets: geoDIDId must be able to be parent (a Collection)" - }, - "id": 496, - "name": "Literal", - "src": "6799:66:1" - } - ], - "id": 497, - "name": "FunctionCall", - "src": "6767:99:1" - } - ], - "id": 498, - "name": "ExpressionStatement", - "src": "6767:99:1" - }, - { - "attributes": { - "assignments": [ - 500 - ] - }, - "children": [ - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "childrensLen", - "overrides": null, - "scope": 586, - "stateVariable": false, - "storageLocation": "default", - "type": "uint256", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "uint256", - "type": "uint256" - }, - "id": 499, - "name": "ElementaryTypeName", - "src": "6877:7:1" - } - ], - "id": 500, - "name": "VariableDeclaration", - "src": "6877:20:1" - }, - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "member_name": "length", - "referencedDeclaration": null, - "type": "uint256" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 470, - "type": "bytes32[] memory", - "value": "childrenGeoDIDIds" - }, - "id": 501, - "name": "Identifier", - "src": "6900:17:1" - } - ], - "id": 502, - "name": "MemberAccess", - "src": "6900:24:1" - } - ], - "id": 503, - "name": "VariableDeclarationStatement", - "src": "6877:47:1" - }, - { - "attributes": { - "falseBody": null - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": ">", - "type": "bool" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 500, - "type": "uint256", - "value": "childrensLen" - }, - "id": 504, - "name": "Identifier", - "src": "6939:12:1" - }, - { - "attributes": { - "argumentTypes": null, - "hexvalue": "30", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "subdenomination": null, - "token": "number", - "type": "int_const 0", - "value": "0" - }, - "id": 505, - "name": "Literal", - "src": "6954:1:1" - } - ], - "id": 506, - "name": "BinaryOperation", - "src": "6939:16:1" - }, - { - "children": [ - { - "children": [ - { - "attributes": { - "assignments": [ - 508 - ] - }, - "children": [ - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "j", - "overrides": null, - "scope": 583, - "stateVariable": false, - "storageLocation": "default", - "type": "uint256", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "uint256", - "type": "uint256" - }, - "id": 507, - "name": "ElementaryTypeName", - "src": "6974:7:1" - } - ], - "id": 508, - "name": "VariableDeclaration", - "src": "6974:9:1" - }, - { - "attributes": { - "argumentTypes": null, - "hexvalue": "30", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "subdenomination": null, - "token": "number", - "type": "int_const 0", - "value": "0" - }, - "id": 509, - "name": "Literal", - "src": "6984:1:1" - } - ], - "id": 510, - "name": "VariableDeclarationStatement", - "src": "6974:11:1" - }, - { - "attributes": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": "<", - "type": "bool" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 508, - "type": "uint256", - "value": "j" - }, - "id": 511, - "name": "Identifier", - "src": "6987:1:1" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 500, - "type": "uint256", - "value": "childrensLen" - }, - "id": 512, - "name": "Identifier", - "src": "6991:12:1" - } - ], - "id": 513, - "name": "BinaryOperation", - "src": "6987:16:1" - }, - { - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": "++", - "prefix": false, - "type": "uint256" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 508, - "type": "uint256", - "value": "j" - }, - "id": 514, - "name": "Identifier", - "src": "7005:1:1" - } - ], - "id": 515, - "name": "UnaryOperation", - "src": "7005:3:1" - } - ], - "id": 516, - "name": "ExpressionStatement", - "src": "7005:3:1" - }, - { - "children": [ - { - "attributes": { - "assignments": [ - 518 - ] - }, - "children": [ - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "childrenGeoDID", - "overrides": null, - "scope": 582, - "stateVariable": false, - "storageLocation": "default", - "type": "bytes32", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "bytes32", - "type": "bytes32" - }, - "id": 517, - "name": "ElementaryTypeName", - "src": "7028:7:1" - } - ], - "id": 518, - "name": "VariableDeclaration", - "src": "7028:22:1" - }, - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "type": "bytes32" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 470, - "type": "bytes32[] memory", - "value": "childrenGeoDIDIds" - }, - "id": 519, - "name": "Identifier", - "src": "7053:17:1" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 508, - "type": "uint256", - "value": "j" - }, - "id": 520, - "name": "Identifier", - "src": "7071:1:1" - } - ], - "id": 521, - "name": "IndexAccess", - "src": "7053:20:1" - } - ], - "id": 522, - "name": "VariableDeclarationStatement", - "src": "7028:45:1" - }, - { - "children": [ - { - "attributes": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": "&&", - "type": "bool" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": "!=", - "type": "bool" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "type": "address" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 145, - "type": "mapping(bytes32 => address)", - "value": "_owners" - }, - "id": 523, - "name": "Identifier", - "src": "7095:7:1" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 518, - "type": "bytes32", - "value": "childrenGeoDID" - }, - "id": 524, - "name": "Identifier", - "src": "7103:14:1" - } - ], - "id": 525, - "name": "IndexAccess", - "src": "7095:23:1" - }, - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": true, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [ - null - ], - "tryCall": false, - "type": "address payable", - "type_conversion": true - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - } - ], - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "type": "type(address)" - }, - "children": [ - { - "attributes": { - "name": "address", - "type": null - }, - "id": 526, - "name": "ElementaryTypeName", - "src": "7122:7:1" - } - ], - "id": 527, - "name": "ElementaryTypeNameExpression", - "src": "7122:7:1" - }, - { - "attributes": { - "argumentTypes": null, - "hexvalue": "30", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "subdenomination": null, - "token": "number", - "type": "int_const 0", - "value": "0" - }, - "id": 528, - "name": "Literal", - "src": "7130:1:1" - } - ], - "id": 529, - "name": "FunctionCall", - "src": "7122:10:1" - } - ], - "id": 530, - "name": "BinaryOperation", - "src": "7095:37:1" - }, - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": "!", - "prefix": true, - "type": "bool" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "type": "bool" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 153, - "type": "mapping(bytes32 => bool)", - "value": "_hasParent" - }, - "id": 531, - "name": "Identifier", - "src": "7137:10:1" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 518, - "type": "bytes32", - "value": "childrenGeoDID" - }, - "id": 532, - "name": "Identifier", - "src": "7148:14:1" - } - ], - "id": 533, - "name": "IndexAccess", - "src": "7137:26:1" - } - ], - "id": 534, - "name": "UnaryOperation", - "src": "7136:27:1" - } - ], - "id": 535, - "name": "BinaryOperation", - "src": "7095:68:1" - }, - { - "children": [ - { - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": "=", - "type": "bool" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "type": "bool" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 153, - "type": "mapping(bytes32 => bool)", - "value": "_hasParent" - }, - "id": 536, - "name": "Identifier", - "src": "7187:10:1" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 518, - "type": "bytes32", - "value": "childrenGeoDID" - }, - "id": 537, - "name": "Identifier", - "src": "7198:14:1" - } - ], - "id": 538, - "name": "IndexAccess", - "src": "7187:26:1" - }, - { - "attributes": { - "argumentTypes": null, - "hexvalue": "74727565", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "subdenomination": null, - "token": "bool", - "type": "bool", - "value": "true" - }, - "id": 539, - "name": "Literal", - "src": "7216:4:1" - } - ], - "id": 540, - "name": "Assignment", - "src": "7187:33:1" - } - ], - "id": 541, - "name": "ExpressionStatement", - "src": "7187:33:1" - }, - { - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": "=", - "type": "bytes32" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "type": "bytes32" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 161, - "type": "mapping(bytes32 => bytes32)", - "value": "_root" - }, - "id": 542, - "name": "Identifier", - "src": "7242:5:1" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 518, - "type": "bytes32", - "value": "childrenGeoDID" - }, - "id": 543, - "name": "Identifier", - "src": "7248:14:1" - } - ], - "id": 544, - "name": "IndexAccess", - "src": "7242:21:1" - }, - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "type": "bytes32" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 161, - "type": "mapping(bytes32 => bytes32)", - "value": "_root" - }, - "id": 545, - "name": "Identifier", - "src": "7266:5:1" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 467, - "type": "bytes32", - "value": "geoDIDId" - }, - "id": 546, - "name": "Identifier", - "src": "7272:8:1" - } - ], - "id": 547, - "name": "IndexAccess", - "src": "7266:15:1" - } - ], - "id": 548, - "name": "Assignment", - "src": "7242:39:1" - } - ], - "id": 549, - "name": "ExpressionStatement", - "src": "7242:39:1" - }, - { - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [ - null - ], - "tryCall": false, - "type": "tuple()", - "type_conversion": false - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - ], - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 99, - "type": "function (bytes32,bytes32)", - "value": "ChildrenAdded" - }, - "id": 550, - "name": "Identifier", - "src": "7308:13:1" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 467, - "type": "bytes32", - "value": "geoDIDId" - }, - "id": 551, - "name": "Identifier", - "src": "7322:8:1" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 518, - "type": "bytes32", - "value": "childrenGeoDID" - }, - "id": 552, - "name": "Identifier", - "src": "7332:14:1" - } - ], - "id": 553, - "name": "FunctionCall", - "src": "7308:39:1" - } - ], - "id": 554, - "name": "EmitStatement", - "src": "7303:44:1" - } - ], - "id": 555, - "name": "Block", - "src": "7165:201:1" - }, - { - "children": [ - { - "attributes": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": "&&", - "type": "bool" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": "!=", - "type": "bool" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "type": "address" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 145, - "type": "mapping(bytes32 => address)", - "value": "_owners" - }, - "id": 556, - "name": "Identifier", - "src": "7376:7:1" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 518, - "type": "bytes32", - "value": "childrenGeoDID" - }, - "id": 557, - "name": "Identifier", - "src": "7384:14:1" - } - ], - "id": 558, - "name": "IndexAccess", - "src": "7376:23:1" - }, - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": true, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [ - null - ], - "tryCall": false, - "type": "address payable", - "type_conversion": true - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - } - ], - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "type": "type(address)" - }, - "children": [ - { - "attributes": { - "name": "address", - "type": null - }, - "id": 559, - "name": "ElementaryTypeName", - "src": "7403:7:1" - } - ], - "id": 560, - "name": "ElementaryTypeNameExpression", - "src": "7403:7:1" - }, - { - "attributes": { - "argumentTypes": null, - "hexvalue": "30", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "subdenomination": null, - "token": "number", - "type": "int_const 0", - "value": "0" - }, - "id": 561, - "name": "Literal", - "src": "7411:1:1" - } - ], - "id": 562, - "name": "FunctionCall", - "src": "7403:10:1" - } - ], - "id": 563, - "name": "BinaryOperation", - "src": "7376:37:1" - }, - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "type": "bool" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 153, - "type": "mapping(bytes32 => bool)", - "value": "_hasParent" - }, - "id": 564, - "name": "Identifier", - "src": "7417:10:1" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 518, - "type": "bytes32", - "value": "childrenGeoDID" - }, - "id": 565, - "name": "Identifier", - "src": "7428:14:1" - } - ], - "id": 566, - "name": "IndexAccess", - "src": "7417:26:1" - } - ], - "id": 567, - "name": "BinaryOperation", - "src": "7376:67:1" - }, - { - "children": [ - { - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [ - null - ], - "tryCall": false, - "type": "tuple()", - "type_conversion": false - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - ], - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 134, - "type": "function (bytes32,bytes32)", - "value": "ChildrenErrorHasParent" - }, - "id": 568, - "name": "Identifier", - "src": "7471:22:1" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 467, - "type": "bytes32", - "value": "geoDIDId" - }, - "id": 569, - "name": "Identifier", - "src": "7494:8:1" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 518, - "type": "bytes32", - "value": "childrenGeoDID" - }, - "id": 570, - "name": "Identifier", - "src": "7504:14:1" - } - ], - "id": 571, - "name": "FunctionCall", - "src": "7471:48:1" - } - ], - "id": 572, - "name": "EmitStatement", - "src": "7466:53:1" - } - ], - "id": 573, - "name": "Block", - "src": "7444:94:1" - }, - { - "children": [ - { - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [ - null - ], - "tryCall": false, - "type": "tuple()", - "type_conversion": false - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - ], - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 127, - "type": "function (bytes32,bytes32)", - "value": "ChildrenErrorNoExistence" - }, - "id": 574, - "name": "Identifier", - "src": "7571:24:1" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 467, - "type": "bytes32", - "value": "geoDIDId" - }, - "id": 575, - "name": "Identifier", - "src": "7596:8:1" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 518, - "type": "bytes32", - "value": "childrenGeoDID" - }, - "id": 576, - "name": "Identifier", - "src": "7606:14:1" - } - ], - "id": 577, - "name": "FunctionCall", - "src": "7571:50:1" - } - ], - "id": 578, - "name": "EmitStatement", - "src": "7566:55:1" - } - ], - "id": 579, - "name": "Block", - "src": "7544:96:1" - } - ], - "id": 580, - "name": "IfStatement", - "src": "7372:268:1" - } - ], - "id": 581, - "name": "IfStatement", - "src": "7091:549:1" - } - ], - "id": 582, - "name": "Block", - "src": "7010:644:1" - } - ], - "id": 583, - "name": "ForStatement", - "src": "6970:684:1" - } - ], - "id": 584, - "name": "Block", - "src": "6956:708:1" - } - ], - "id": 585, - "name": "IfStatement", - "src": "6935:729:1" - } - ], - "id": 586, - "name": "Block", - "src": "6535:1135:1" - } - ], - "id": 587, - "name": "FunctionDefinition", - "src": "6446:1224:1" - }, - { - "attributes": { - "functionSelector": "f999be89", - "implemented": true, - "isConstructor": false, - "kind": "function", - "modifiers": [ - null - ], - "name": "addParentGeoDID", - "overrides": null, - "scope": 1073, - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "public" - }, - "children": [ - { - "attributes": { - "text": " @dev Adds a parent GeoDID to an already existent geoDID\n Emits a {ParentAdded} event." - }, - "id": 588, - "name": "StructuredDocumentation", - "src": "7676:117:1" - }, - { - "children": [ - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "geoDIDId", - "overrides": null, - "scope": 661, - "stateVariable": false, - "storageLocation": "default", - "type": "bytes32", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "bytes32", - "type": "bytes32" - }, - "id": 589, - "name": "ElementaryTypeName", - "src": "7823:7:1" - } - ], - "id": 590, - "name": "VariableDeclaration", - "src": "7823:16:1" - }, - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "parentGeoDIDId", - "overrides": null, - "scope": 661, - "stateVariable": false, - "storageLocation": "default", - "type": "bytes32", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "bytes32", - "type": "bytes32" - }, - "id": 591, - "name": "ElementaryTypeName", - "src": "7841:7:1" - } - ], - "id": 592, - "name": "VariableDeclaration", - "src": "7841:22:1" - } - ], - "id": 593, - "name": "ParameterList", - "src": "7822:42:1" - }, - { - "attributes": { - "parameters": [ - null - ] - }, - "children": [], - "id": 594, - "name": "ParameterList", - "src": "7872:0:1" - }, - { - "children": [ - { - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [ - null - ], - "tryCall": false, - "type": "tuple()", - "type_conversion": false - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_a63f9d7c89af474141c60ef50b69afc5ff92c5a8bca01ae8bf1ad58a8d517343", - "typeString": "literal_string \"SpatialAssets: must have data supplier role to register\"" - } - ], - "overloadedDeclarations": [ - -18, - -18 - ], - "referencedDeclaration": -18, - "type": "function (bool,string memory) pure", - "value": "require" - }, - "id": 595, - "name": "Identifier", - "src": "7882:7:1" - }, - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [ - null - ], - "tryCall": false, - "type": "bool", - "type_conversion": false - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - ], - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 1148, - "type": "function (bytes32,address) view returns (bool)", - "value": "hasRole" - }, - "id": 596, - "name": "Identifier", - "src": "7890:7:1" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 139, - "type": "bytes32", - "value": "DATA_SUPPLIER" - }, - "id": 597, - "name": "Identifier", - "src": "7898:13:1" - }, - { - "attributes": { - "argumentTypes": null, - "arguments": [ - null - ], - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [ - null - ], - "tryCall": false, - "type": "address payable", - "type_conversion": false - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - null - ], - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 1666, - "type": "function () view returns (address payable)", - "value": "_msgSender" - }, - "id": 598, - "name": "Identifier", - "src": "7913:10:1" - } - ], - "id": 599, - "name": "FunctionCall", - "src": "7913:12:1" - } - ], - "id": 600, - "name": "FunctionCall", - "src": "7890:36:1" - }, - { - "attributes": { - "argumentTypes": null, - "hexvalue": "5370617469616c4173736574733a206d7573742068617665206461746120737570706c69657220726f6c6520746f207265676973746572", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "subdenomination": null, - "token": "string", - "type": "literal_string \"SpatialAssets: must have data supplier role to register\"", - "value": "SpatialAssets: must have data supplier role to register" - }, - "id": 601, - "name": "Literal", - "src": "7928:57:1" - } - ], - "id": 602, - "name": "FunctionCall", - "src": "7882:104:1" - } - ], - "id": 603, - "name": "ExpressionStatement", - "src": "7882:104:1" - }, - { - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [ - null - ], - "tryCall": false, - "type": "tuple()", - "type_conversion": false - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_141f85e6f52bf78350257a4ec10be89d97055fa340c7271b03e584c1efa8c841", - "typeString": "literal_string \"SpatialAssets: geoDIDId must be owned by its creator\"" - } - ], - "overloadedDeclarations": [ - -18, - -18 - ], - "referencedDeclaration": -18, - "type": "function (bool,string memory) pure", - "value": "require" - }, - "id": 604, - "name": "Identifier", - "src": "7996:7:1" - }, - { - "attributes": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": "==", - "type": "bool" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "type": "address" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 145, - "type": "mapping(bytes32 => address)", - "value": "_owners" - }, - "id": 605, - "name": "Identifier", - "src": "8004:7:1" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 590, - "type": "bytes32", - "value": "geoDIDId" - }, - "id": 606, - "name": "Identifier", - "src": "8012:8:1" - } - ], - "id": 607, - "name": "IndexAccess", - "src": "8004:17:1" - }, - { - "attributes": { - "argumentTypes": null, - "arguments": [ - null - ], - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [ - null - ], - "tryCall": false, - "type": "address payable", - "type_conversion": false - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - null - ], - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 1666, - "type": "function () view returns (address payable)", - "value": "_msgSender" - }, - "id": 608, - "name": "Identifier", - "src": "8025:10:1" - } - ], - "id": 609, - "name": "FunctionCall", - "src": "8025:12:1" - } - ], - "id": 610, - "name": "BinaryOperation", - "src": "8004:33:1" - }, - { - "attributes": { - "argumentTypes": null, - "hexvalue": "5370617469616c4173736574733a2067656f4449444964206d757374206265206f776e6564206279206974732063726561746f72", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "subdenomination": null, - "token": "string", - "type": "literal_string \"SpatialAssets: geoDIDId must be owned by its creator\"", - "value": "SpatialAssets: geoDIDId must be owned by its creator" - }, - "id": 611, - "name": "Literal", - "src": "8039:54:1" - } - ], - "id": 612, - "name": "FunctionCall", - "src": "7996:98:1" - } - ], - "id": 613, - "name": "ExpressionStatement", - "src": "7996:98:1" - }, - { - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [ - null - ], - "tryCall": false, - "type": "tuple()", - "type_conversion": false - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_37628363356dfe049fe1dfb95b31ae659423f88203c2d0589d12bc6e2efba5fb", - "typeString": "literal_string \"SpatialAssets: parentGeoDIDId does not exist\"" - } - ], - "overloadedDeclarations": [ - -18, - -18 - ], - "referencedDeclaration": -18, - "type": "function (bool,string memory) pure", - "value": "require" - }, - "id": 614, - "name": "Identifier", - "src": "8104:7:1" - }, - { - "attributes": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": "!=", - "type": "bool" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "type": "address" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 145, - "type": "mapping(bytes32 => address)", - "value": "_owners" - }, - "id": 615, - "name": "Identifier", - "src": "8112:7:1" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 592, - "type": "bytes32", - "value": "parentGeoDIDId" - }, - "id": 616, - "name": "Identifier", - "src": "8120:14:1" - } - ], - "id": 617, - "name": "IndexAccess", - "src": "8112:23:1" - }, - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": true, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [ - null - ], - "tryCall": false, - "type": "address payable", - "type_conversion": true - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - } - ], - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "type": "type(address)" - }, - "children": [ - { - "attributes": { - "name": "address", - "type": null - }, - "id": 618, - "name": "ElementaryTypeName", - "src": "8139:7:1" - } - ], - "id": 619, - "name": "ElementaryTypeNameExpression", - "src": "8139:7:1" - }, - { - "attributes": { - "argumentTypes": null, - "hexvalue": "30", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "subdenomination": null, - "token": "number", - "type": "int_const 0", - "value": "0" - }, - "id": 620, - "name": "Literal", - "src": "8147:1:1" - } - ], - "id": 621, - "name": "FunctionCall", - "src": "8139:10:1" - } - ], - "id": 622, - "name": "BinaryOperation", - "src": "8112:37:1" - }, - { - "attributes": { - "argumentTypes": null, - "hexvalue": "5370617469616c4173736574733a20706172656e7447656f444944496420646f6573206e6f74206578697374", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "subdenomination": null, - "token": "string", - "type": "literal_string \"SpatialAssets: parentGeoDIDId does not exist\"", - "value": "SpatialAssets: parentGeoDIDId does not exist" - }, - "id": 623, - "name": "Literal", - "src": "8151:46:1" - } - ], - "id": 624, - "name": "FunctionCall", - "src": "8104:94:1" - } - ], - "id": 625, - "name": "ExpressionStatement", - "src": "8104:94:1" - }, - { - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [ - null - ], - "tryCall": false, - "type": "tuple()", - "type_conversion": false - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_365c191fc2e3b7185ac24986ce31e56094d1588c72dcea7a382fe58e00565569", - "typeString": "literal_string \"SpatialAssets: geoDIDId already has a parent\"" - } - ], - "overloadedDeclarations": [ - -18, - -18 - ], - "referencedDeclaration": -18, - "type": "function (bool,string memory) pure", - "value": "require" - }, - "id": 626, - "name": "Identifier", - "src": "8208:7:1" - }, - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": "!", - "prefix": true, - "type": "bool" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "type": "bool" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 153, - "type": "mapping(bytes32 => bool)", - "value": "_hasParent" - }, - "id": 627, - "name": "Identifier", - "src": "8217:10:1" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 590, - "type": "bytes32", - "value": "geoDIDId" - }, - "id": 628, - "name": "Identifier", - "src": "8228:8:1" - } - ], - "id": 629, - "name": "IndexAccess", - "src": "8217:20:1" - } - ], - "id": 630, - "name": "UnaryOperation", - "src": "8216:21:1" - }, - { - "attributes": { - "argumentTypes": null, - "hexvalue": "5370617469616c4173736574733a2067656f444944496420616c726561647920686173206120706172656e74", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "subdenomination": null, - "token": "string", - "type": "literal_string \"SpatialAssets: geoDIDId already has a parent\"", - "value": "SpatialAssets: geoDIDId already has a parent" - }, - "id": 631, - "name": "Literal", - "src": "8239:46:1" - } - ], - "id": 632, - "name": "FunctionCall", - "src": "8208:78:1" - } - ], - "id": 633, - "name": "ExpressionStatement", - "src": "8208:78:1" - }, - { - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [ - null - ], - "tryCall": false, - "type": "tuple()", - "type_conversion": false - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_2fc4c9e1419e4474d6293c8f8fe90b0fca69366a562a1be7a551c73fee1d2c1d", - "typeString": "literal_string \"SpatialAssets: parentGeoDIDId must be able to be parent (a Collection)\"" - } - ], - "overloadedDeclarations": [ - -18, - -18 - ], - "referencedDeclaration": -18, - "type": "function (bool,string memory) pure", - "value": "require" - }, - "id": 634, - "name": "Identifier", - "src": "8296:7:1" - }, - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "type": "bool" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 157, - "type": "mapping(bytes32 => bool)", - "value": "_canBeParent" - }, - "id": 635, - "name": "Identifier", - "src": "8304:12:1" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 592, - "type": "bytes32", - "value": "parentGeoDIDId" - }, - "id": 636, - "name": "Identifier", - "src": "8317:14:1" - } - ], - "id": 637, - "name": "IndexAccess", - "src": "8304:28:1" - }, - { - "attributes": { - "argumentTypes": null, - "hexvalue": "5370617469616c4173736574733a20706172656e7447656f4449444964206d7573742062652061626c6520746f20626520706172656e7420286120436f6c6c656374696f6e29", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "subdenomination": null, - "token": "string", - "type": "literal_string \"SpatialAssets: parentGeoDIDId must be able to be parent (a Collection)\"", - "value": "SpatialAssets: parentGeoDIDId must be able to be parent (a Collection)" - }, - "id": 638, - "name": "Literal", - "src": "8334:72:1" - } - ], - "id": 639, - "name": "FunctionCall", - "src": "8296:111:1" - } - ], - "id": 640, - "name": "ExpressionStatement", - "src": "8296:111:1" - }, - { - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": "=", - "type": "bool" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "type": "bool" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 153, - "type": "mapping(bytes32 => bool)", - "value": "_hasParent" - }, - "id": 641, - "name": "Identifier", - "src": "8418:10:1" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 590, - "type": "bytes32", - "value": "geoDIDId" - }, - "id": 642, - "name": "Identifier", - "src": "8429:8:1" - } - ], - "id": 643, - "name": "IndexAccess", - "src": "8418:20:1" - }, - { - "attributes": { - "argumentTypes": null, - "hexvalue": "74727565", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "subdenomination": null, - "token": "bool", - "type": "bool", - "value": "true" - }, - "id": 644, - "name": "Literal", - "src": "8441:4:1" - } - ], - "id": 645, - "name": "Assignment", - "src": "8418:27:1" - } - ], - "id": 646, - "name": "ExpressionStatement", - "src": "8418:27:1" - }, - { - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": "=", - "type": "bytes32" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "type": "bytes32" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 161, - "type": "mapping(bytes32 => bytes32)", - "value": "_root" - }, - "id": 647, - "name": "Identifier", - "src": "8455:5:1" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 590, - "type": "bytes32", - "value": "geoDIDId" - }, - "id": 648, - "name": "Identifier", - "src": "8461:8:1" - } - ], - "id": 649, - "name": "IndexAccess", - "src": "8455:15:1" - }, - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "type": "bytes32" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 161, - "type": "mapping(bytes32 => bytes32)", - "value": "_root" - }, - "id": 650, - "name": "Identifier", - "src": "8473:5:1" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 592, - "type": "bytes32", - "value": "parentGeoDIDId" - }, - "id": 651, - "name": "Identifier", - "src": "8479:14:1" - } - ], - "id": 652, - "name": "IndexAccess", - "src": "8473:21:1" - } - ], - "id": 653, - "name": "Assignment", - "src": "8455:39:1" - } - ], - "id": 654, - "name": "ExpressionStatement", - "src": "8455:39:1" - }, - { - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [ - null - ], - "tryCall": false, - "type": "tuple()", - "type_conversion": false - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - ], - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 92, - "type": "function (bytes32,bytes32)", - "value": "ParentAdded" - }, - "id": 655, - "name": "Identifier", - "src": "8509:11:1" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 590, - "type": "bytes32", - "value": "geoDIDId" - }, - "id": 656, - "name": "Identifier", - "src": "8521:8:1" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 592, - "type": "bytes32", - "value": "parentGeoDIDId" - }, - "id": 657, - "name": "Identifier", - "src": "8531:14:1" - } - ], - "id": 658, - "name": "FunctionCall", - "src": "8509:37:1" - } - ], - "id": 659, - "name": "EmitStatement", - "src": "8504:42:1" - } - ], - "id": 660, - "name": "Block", - "src": "7872:681:1" - } - ], - "id": 661, - "name": "FunctionDefinition", - "src": "7798:755:1" - }, - { - "attributes": { - "functionSelector": "a8f904b5", - "implemented": true, - "isConstructor": false, - "kind": "function", - "modifiers": [ - null - ], - "name": "removeChildrenGeoDIDs", - "overrides": null, - "scope": 1073, - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "public" - }, - "children": [ - { - "attributes": { - "text": " @dev Removes childrenGeoDIDs from a geoDID\n Emits a {ChildrenRemoved} event." - }, - "id": 662, - "name": "StructuredDocumentation", - "src": "8564:108:1" - }, - { - "children": [ - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "geoDIDId", - "overrides": null, - "scope": 775, - "stateVariable": false, - "storageLocation": "default", - "type": "bytes32", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "bytes32", - "type": "bytes32" - }, - "id": 663, - "name": "ElementaryTypeName", - "src": "8708:7:1" - } - ], - "id": 664, - "name": "VariableDeclaration", - "src": "8708:16:1" - }, - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "childrenGeoDIDIds", - "overrides": null, - "scope": 775, - "stateVariable": false, - "storageLocation": "memory", - "type": "bytes32[]", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "length": null, - "type": "bytes32[]" - }, - "children": [ - { - "attributes": { - "name": "bytes32", - "type": "bytes32" - }, - "id": 665, - "name": "ElementaryTypeName", - "src": "8726:7:1" - } - ], - "id": 666, - "name": "ArrayTypeName", - "src": "8726:9:1" - } - ], - "id": 667, - "name": "VariableDeclaration", - "src": "8726:34:1" - } - ], - "id": 668, - "name": "ParameterList", - "src": "8707:54:1" - }, - { - "attributes": { - "parameters": [ - null - ] - }, - "children": [], - "id": 669, - "name": "ParameterList", - "src": "8769:0:1" - }, - { - "children": [ - { - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [ - null - ], - "tryCall": false, - "type": "tuple()", - "type_conversion": false - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_a63f9d7c89af474141c60ef50b69afc5ff92c5a8bca01ae8bf1ad58a8d517343", - "typeString": "literal_string \"SpatialAssets: must have data supplier role to register\"" - } - ], - "overloadedDeclarations": [ - -18, - -18 - ], - "referencedDeclaration": -18, - "type": "function (bool,string memory) pure", - "value": "require" - }, - "id": 670, - "name": "Identifier", - "src": "8779:7:1" - }, - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [ - null - ], - "tryCall": false, - "type": "bool", - "type_conversion": false - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - ], - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 1148, - "type": "function (bytes32,address) view returns (bool)", - "value": "hasRole" - }, - "id": 671, - "name": "Identifier", - "src": "8787:7:1" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 139, - "type": "bytes32", - "value": "DATA_SUPPLIER" - }, - "id": 672, - "name": "Identifier", - "src": "8795:13:1" - }, - { - "attributes": { - "argumentTypes": null, - "arguments": [ - null - ], - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [ - null - ], - "tryCall": false, - "type": "address payable", - "type_conversion": false - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - null - ], - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 1666, - "type": "function () view returns (address payable)", - "value": "_msgSender" - }, - "id": 673, - "name": "Identifier", - "src": "8810:10:1" - } - ], - "id": 674, - "name": "FunctionCall", - "src": "8810:12:1" - } - ], - "id": 675, - "name": "FunctionCall", - "src": "8787:36:1" - }, - { - "attributes": { - "argumentTypes": null, - "hexvalue": "5370617469616c4173736574733a206d7573742068617665206461746120737570706c69657220726f6c6520746f207265676973746572", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "subdenomination": null, - "token": "string", - "type": "literal_string \"SpatialAssets: must have data supplier role to register\"", - "value": "SpatialAssets: must have data supplier role to register" - }, - "id": 676, - "name": "Literal", - "src": "8825:57:1" - } - ], - "id": 677, - "name": "FunctionCall", - "src": "8779:104:1" - } - ], - "id": 678, - "name": "ExpressionStatement", - "src": "8779:104:1" - }, - { - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [ - null - ], - "tryCall": false, - "type": "tuple()", - "type_conversion": false - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_a2ba2ebfc38e548fefdb3c30fe605533706b9d98e3015ed81adb67a22d6cd33c", - "typeString": "literal_string \"SpatialAssets: id must not have an owner yet\"" - } - ], - "overloadedDeclarations": [ - -18, - -18 - ], - "referencedDeclaration": -18, - "type": "function (bool,string memory) pure", - "value": "require" - }, - "id": 679, - "name": "Identifier", - "src": "8893:7:1" - }, - { - "attributes": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": "==", - "type": "bool" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "type": "address" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 145, - "type": "mapping(bytes32 => address)", - "value": "_owners" - }, - "id": 680, - "name": "Identifier", - "src": "8901:7:1" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 664, - "type": "bytes32", - "value": "geoDIDId" - }, - "id": 681, - "name": "Identifier", - "src": "8909:8:1" - } - ], - "id": 682, - "name": "IndexAccess", - "src": "8901:17:1" - }, - { - "attributes": { - "argumentTypes": null, - "arguments": [ - null - ], - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [ - null - ], - "tryCall": false, - "type": "address payable", - "type_conversion": false - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - null - ], - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 1666, - "type": "function () view returns (address payable)", - "value": "_msgSender" - }, - "id": 683, - "name": "Identifier", - "src": "8922:10:1" - } - ], - "id": 684, - "name": "FunctionCall", - "src": "8922:12:1" - } - ], - "id": 685, - "name": "BinaryOperation", - "src": "8901:33:1" - }, - { - "attributes": { - "argumentTypes": null, - "hexvalue": "5370617469616c4173736574733a206964206d757374206e6f74206861766520616e206f776e657220796574", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "subdenomination": null, - "token": "string", - "type": "literal_string \"SpatialAssets: id must not have an owner yet\"", - "value": "SpatialAssets: id must not have an owner yet" - }, - "id": 686, - "name": "Literal", - "src": "8936:46:1" - } - ], - "id": 687, - "name": "FunctionCall", - "src": "8893:90:1" - } - ], - "id": 688, - "name": "ExpressionStatement", - "src": "8893:90:1" - }, - { - "attributes": { - "assignments": [ - 690 - ] - }, - "children": [ - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "childrensLen", - "overrides": null, - "scope": 774, - "stateVariable": false, - "storageLocation": "default", - "type": "uint256", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "uint256", - "type": "uint256" - }, - "id": 689, - "name": "ElementaryTypeName", - "src": "8994:7:1" - } - ], - "id": 690, - "name": "VariableDeclaration", - "src": "8994:20:1" - }, - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "member_name": "length", - "referencedDeclaration": null, - "type": "uint256" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 667, - "type": "bytes32[] memory", - "value": "childrenGeoDIDIds" - }, - "id": 691, - "name": "Identifier", - "src": "9017:17:1" - } - ], - "id": 692, - "name": "MemberAccess", - "src": "9017:24:1" - } - ], - "id": 693, - "name": "VariableDeclarationStatement", - "src": "8994:47:1" - }, - { - "attributes": { - "falseBody": null - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": ">", - "type": "bool" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 690, - "type": "uint256", - "value": "childrensLen" - }, - "id": 694, - "name": "Identifier", - "src": "9056:12:1" - }, - { - "attributes": { - "argumentTypes": null, - "hexvalue": "30", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "subdenomination": null, - "token": "number", - "type": "int_const 0", - "value": "0" - }, - "id": 695, - "name": "Literal", - "src": "9071:1:1" - } - ], - "id": 696, - "name": "BinaryOperation", - "src": "9056:16:1" - }, - { - "children": [ - { - "children": [ - { - "attributes": { - "assignments": [ - 698 - ] - }, - "children": [ - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "j", - "overrides": null, - "scope": 771, - "stateVariable": false, - "storageLocation": "default", - "type": "uint256", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "uint256", - "type": "uint256" - }, - "id": 697, - "name": "ElementaryTypeName", - "src": "9091:7:1" - } - ], - "id": 698, - "name": "VariableDeclaration", - "src": "9091:9:1" - }, - { - "attributes": { - "argumentTypes": null, - "hexvalue": "30", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "subdenomination": null, - "token": "number", - "type": "int_const 0", - "value": "0" - }, - "id": 699, - "name": "Literal", - "src": "9101:1:1" - } - ], - "id": 700, - "name": "VariableDeclarationStatement", - "src": "9091:11:1" - }, - { - "attributes": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": "<", - "type": "bool" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 698, - "type": "uint256", - "value": "j" - }, - "id": 701, - "name": "Identifier", - "src": "9104:1:1" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 690, - "type": "uint256", - "value": "childrensLen" - }, - "id": 702, - "name": "Identifier", - "src": "9108:12:1" - } - ], - "id": 703, - "name": "BinaryOperation", - "src": "9104:16:1" - }, - { - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": "++", - "prefix": false, - "type": "uint256" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 698, - "type": "uint256", - "value": "j" - }, - "id": 704, - "name": "Identifier", - "src": "9122:1:1" - } - ], - "id": 705, - "name": "UnaryOperation", - "src": "9122:3:1" - } - ], - "id": 706, - "name": "ExpressionStatement", - "src": "9122:3:1" - }, - { - "children": [ - { - "attributes": { - "assignments": [ - 708 - ] - }, - "children": [ - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "childrenGeoDID", - "overrides": null, - "scope": 770, - "stateVariable": false, - "storageLocation": "default", - "type": "bytes32", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "bytes32", - "type": "bytes32" - }, - "id": 707, - "name": "ElementaryTypeName", - "src": "9145:7:1" - } - ], - "id": 708, - "name": "VariableDeclaration", - "src": "9145:22:1" - }, - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "type": "bytes32" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 667, - "type": "bytes32[] memory", - "value": "childrenGeoDIDIds" - }, - "id": 709, - "name": "Identifier", - "src": "9170:17:1" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 698, - "type": "uint256", - "value": "j" - }, - "id": 710, - "name": "Identifier", - "src": "9188:1:1" - } - ], - "id": 711, - "name": "IndexAccess", - "src": "9170:20:1" - } - ], - "id": 712, - "name": "VariableDeclarationStatement", - "src": "9145:45:1" - }, - { - "children": [ - { - "attributes": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": "&&", - "type": "bool" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": "!=", - "type": "bool" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "type": "address" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 145, - "type": "mapping(bytes32 => address)", - "value": "_owners" - }, - "id": 713, - "name": "Identifier", - "src": "9212:7:1" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 708, - "type": "bytes32", - "value": "childrenGeoDID" - }, - "id": 714, - "name": "Identifier", - "src": "9220:14:1" - } - ], - "id": 715, - "name": "IndexAccess", - "src": "9212:23:1" - }, - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": true, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [ - null - ], - "tryCall": false, - "type": "address payable", - "type_conversion": true - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - } - ], - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "type": "type(address)" - }, - "children": [ - { - "attributes": { - "name": "address", - "type": null - }, - "id": 716, - "name": "ElementaryTypeName", - "src": "9239:7:1" - } - ], - "id": 717, - "name": "ElementaryTypeNameExpression", - "src": "9239:7:1" - }, - { - "attributes": { - "argumentTypes": null, - "hexvalue": "30", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "subdenomination": null, - "token": "number", - "type": "int_const 0", - "value": "0" - }, - "id": 718, - "name": "Literal", - "src": "9247:1:1" - } - ], - "id": 719, - "name": "FunctionCall", - "src": "9239:10:1" - } - ], - "id": 720, - "name": "BinaryOperation", - "src": "9212:37:1" - }, - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "type": "bool" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 153, - "type": "mapping(bytes32 => bool)", - "value": "_hasParent" - }, - "id": 721, - "name": "Identifier", - "src": "9253:10:1" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 708, - "type": "bytes32", - "value": "childrenGeoDID" - }, - "id": 722, - "name": "Identifier", - "src": "9264:14:1" - } - ], - "id": 723, - "name": "IndexAccess", - "src": "9253:26:1" - } - ], - "id": 724, - "name": "BinaryOperation", - "src": "9212:67:1" - }, - { - "children": [ - { - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": "=", - "type": "bool" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "type": "bool" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 153, - "type": "mapping(bytes32 => bool)", - "value": "_hasParent" - }, - "id": 725, - "name": "Identifier", - "src": "9303:10:1" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 708, - "type": "bytes32", - "value": "childrenGeoDID" - }, - "id": 726, - "name": "Identifier", - "src": "9314:14:1" - } - ], - "id": 727, - "name": "IndexAccess", - "src": "9303:26:1" - }, - { - "attributes": { - "argumentTypes": null, - "hexvalue": "66616c7365", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "subdenomination": null, - "token": "bool", - "type": "bool", - "value": "false" - }, - "id": 728, - "name": "Literal", - "src": "9332:5:1" - } - ], - "id": 729, - "name": "Assignment", - "src": "9303:34:1" - } - ], - "id": 730, - "name": "ExpressionStatement", - "src": "9303:34:1" - }, - { - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": "=", - "type": "bytes32" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "type": "bytes32" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 161, - "type": "mapping(bytes32 => bytes32)", - "value": "_root" - }, - "id": 731, - "name": "Identifier", - "src": "9359:5:1" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 708, - "type": "bytes32", - "value": "childrenGeoDID" - }, - "id": 732, - "name": "Identifier", - "src": "9365:14:1" - } - ], - "id": 733, - "name": "IndexAccess", - "src": "9359:21:1" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 708, - "type": "bytes32", - "value": "childrenGeoDID" - }, - "id": 734, - "name": "Identifier", - "src": "9383:14:1" - } - ], - "id": 735, - "name": "Assignment", - "src": "9359:38:1" - } - ], - "id": 736, - "name": "ExpressionStatement", - "src": "9359:38:1" - }, - { - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [ - null - ], - "tryCall": false, - "type": "tuple()", - "type_conversion": false - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - ], - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 113, - "type": "function (bytes32,bytes32)", - "value": "ChildrenRemoved" - }, - "id": 737, - "name": "Identifier", - "src": "9424:15:1" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 664, - "type": "bytes32", - "value": "geoDIDId" - }, - "id": 738, - "name": "Identifier", - "src": "9440:8:1" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 708, - "type": "bytes32", - "value": "childrenGeoDID" - }, - "id": 739, - "name": "Identifier", - "src": "9450:14:1" - } - ], - "id": 740, - "name": "FunctionCall", - "src": "9424:41:1" - } - ], - "id": 741, - "name": "EmitStatement", - "src": "9419:46:1" - } - ], - "id": 742, - "name": "Block", - "src": "9281:203:1" - }, - { - "children": [ - { - "attributes": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": "&&", - "type": "bool" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": "!=", - "type": "bool" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "type": "address" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 145, - "type": "mapping(bytes32 => address)", - "value": "_owners" - }, - "id": 743, - "name": "Identifier", - "src": "9494:7:1" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 708, - "type": "bytes32", - "value": "childrenGeoDID" - }, - "id": 744, - "name": "Identifier", - "src": "9502:14:1" - } - ], - "id": 745, - "name": "IndexAccess", - "src": "9494:23:1" - }, - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": true, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [ - null - ], - "tryCall": false, - "type": "address payable", - "type_conversion": true - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - } - ], - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "type": "type(address)" - }, - "children": [ - { - "attributes": { - "name": "address", - "type": null - }, - "id": 746, - "name": "ElementaryTypeName", - "src": "9521:7:1" - } - ], - "id": 747, - "name": "ElementaryTypeNameExpression", - "src": "9521:7:1" - }, - { - "attributes": { - "argumentTypes": null, - "hexvalue": "30", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "subdenomination": null, - "token": "number", - "type": "int_const 0", - "value": "0" - }, - "id": 748, - "name": "Literal", - "src": "9529:1:1" - } - ], - "id": 749, - "name": "FunctionCall", - "src": "9521:10:1" - } - ], - "id": 750, - "name": "BinaryOperation", - "src": "9494:37:1" - }, - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": "!", - "prefix": true, - "type": "bool" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "type": "bool" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 153, - "type": "mapping(bytes32 => bool)", - "value": "_hasParent" - }, - "id": 751, - "name": "Identifier", - "src": "9536:10:1" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 708, - "type": "bytes32", - "value": "childrenGeoDID" - }, - "id": 752, - "name": "Identifier", - "src": "9547:14:1" - } - ], - "id": 753, - "name": "IndexAccess", - "src": "9536:26:1" - } - ], - "id": 754, - "name": "UnaryOperation", - "src": "9535:27:1" - } - ], - "id": 755, - "name": "BinaryOperation", - "src": "9494:68:1" - }, - { - "children": [ - { - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [ - null - ], - "tryCall": false, - "type": "tuple()", - "type_conversion": false - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - ], - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 120, - "type": "function (bytes32,bytes32)", - "value": "ChildrenErrorNoParent" - }, - "id": 756, - "name": "Identifier", - "src": "9590:21:1" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 664, - "type": "bytes32", - "value": "geoDIDId" - }, - "id": 757, - "name": "Identifier", - "src": "9612:8:1" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 708, - "type": "bytes32", - "value": "childrenGeoDID" - }, - "id": 758, - "name": "Identifier", - "src": "9622:14:1" - } - ], - "id": 759, - "name": "FunctionCall", - "src": "9590:47:1" - } - ], - "id": 760, - "name": "EmitStatement", - "src": "9585:52:1" - } - ], - "id": 761, - "name": "Block", - "src": "9563:93:1" - }, - { - "children": [ - { - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [ - null - ], - "tryCall": false, - "type": "tuple()", - "type_conversion": false - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - ], - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 127, - "type": "function (bytes32,bytes32)", - "value": "ChildrenErrorNoExistence" - }, - "id": 762, - "name": "Identifier", - "src": "9689:24:1" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 664, - "type": "bytes32", - "value": "geoDIDId" - }, - "id": 763, - "name": "Identifier", - "src": "9714:8:1" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 708, - "type": "bytes32", - "value": "childrenGeoDID" - }, - "id": 764, - "name": "Identifier", - "src": "9724:14:1" - } - ], - "id": 765, - "name": "FunctionCall", - "src": "9689:50:1" - } - ], - "id": 766, - "name": "EmitStatement", - "src": "9684:55:1" - } - ], - "id": 767, - "name": "Block", - "src": "9662:96:1" - } - ], - "id": 768, - "name": "IfStatement", - "src": "9490:268:1" - } - ], - "id": 769, - "name": "IfStatement", - "src": "9208:550:1" - } - ], - "id": 770, - "name": "Block", - "src": "9127:645:1" - } - ], - "id": 771, - "name": "ForStatement", - "src": "9087:685:1" - } - ], - "id": 772, - "name": "Block", - "src": "9073:709:1" - } - ], - "id": 773, - "name": "IfStatement", - "src": "9052:730:1" - } - ], - "id": 774, - "name": "Block", - "src": "8769:1019:1" - } - ], - "id": 775, - "name": "FunctionDefinition", - "src": "8677:1111:1" - }, - { - "attributes": { - "functionSelector": "7c1c6c27", - "implemented": true, - "isConstructor": false, - "kind": "function", - "modifiers": [ - null - ], - "name": "removeParentGeoDID", - "overrides": null, - "scope": 1073, - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "public" - }, - "children": [ - { - "attributes": { - "text": " @dev Removes a parent GeoDID from an already existent geoDID\n Emits a {ParentAdded} event." - }, - "id": 776, - "name": "StructuredDocumentation", - "src": "9796:122:1" - }, - { - "children": [ - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "geoDIDId", - "overrides": null, - "scope": 839, - "stateVariable": false, - "storageLocation": "default", - "type": "bytes32", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "bytes32", - "type": "bytes32" - }, - "id": 777, - "name": "ElementaryTypeName", - "src": "9951:7:1" - } - ], - "id": 778, - "name": "VariableDeclaration", - "src": "9951:16:1" - }, - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "parentGeoDIDId", - "overrides": null, - "scope": 839, - "stateVariable": false, - "storageLocation": "default", - "type": "bytes32", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "bytes32", - "type": "bytes32" - }, - "id": 779, - "name": "ElementaryTypeName", - "src": "9969:7:1" - } - ], - "id": 780, - "name": "VariableDeclaration", - "src": "9969:22:1" - } - ], - "id": 781, - "name": "ParameterList", - "src": "9950:42:1" - }, - { - "attributes": { - "parameters": [ - null - ] - }, - "children": [], - "id": 782, - "name": "ParameterList", - "src": "10000:0:1" - }, - { - "children": [ - { - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [ - null - ], - "tryCall": false, - "type": "tuple()", - "type_conversion": false - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_a63f9d7c89af474141c60ef50b69afc5ff92c5a8bca01ae8bf1ad58a8d517343", - "typeString": "literal_string \"SpatialAssets: must have data supplier role to register\"" - } - ], - "overloadedDeclarations": [ - -18, - -18 - ], - "referencedDeclaration": -18, - "type": "function (bool,string memory) pure", - "value": "require" - }, - "id": 783, - "name": "Identifier", - "src": "10010:7:1" - }, - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [ - null - ], - "tryCall": false, - "type": "bool", - "type_conversion": false - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - ], - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 1148, - "type": "function (bytes32,address) view returns (bool)", - "value": "hasRole" - }, - "id": 784, - "name": "Identifier", - "src": "10018:7:1" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 139, - "type": "bytes32", - "value": "DATA_SUPPLIER" - }, - "id": 785, - "name": "Identifier", - "src": "10026:13:1" - }, - { - "attributes": { - "argumentTypes": null, - "arguments": [ - null - ], - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [ - null - ], - "tryCall": false, - "type": "address payable", - "type_conversion": false - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - null - ], - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 1666, - "type": "function () view returns (address payable)", - "value": "_msgSender" - }, - "id": 786, - "name": "Identifier", - "src": "10041:10:1" - } - ], - "id": 787, - "name": "FunctionCall", - "src": "10041:12:1" - } - ], - "id": 788, - "name": "FunctionCall", - "src": "10018:36:1" - }, - { - "attributes": { - "argumentTypes": null, - "hexvalue": "5370617469616c4173736574733a206d7573742068617665206461746120737570706c69657220726f6c6520746f207265676973746572", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "subdenomination": null, - "token": "string", - "type": "literal_string \"SpatialAssets: must have data supplier role to register\"", - "value": "SpatialAssets: must have data supplier role to register" - }, - "id": 789, - "name": "Literal", - "src": "10056:57:1" - } - ], - "id": 790, - "name": "FunctionCall", - "src": "10010:104:1" - } - ], - "id": 791, - "name": "ExpressionStatement", - "src": "10010:104:1" - }, - { - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [ - null - ], - "tryCall": false, - "type": "tuple()", - "type_conversion": false - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_a2ba2ebfc38e548fefdb3c30fe605533706b9d98e3015ed81adb67a22d6cd33c", - "typeString": "literal_string \"SpatialAssets: id must not have an owner yet\"" - } - ], - "overloadedDeclarations": [ - -18, - -18 - ], - "referencedDeclaration": -18, - "type": "function (bool,string memory) pure", - "value": "require" - }, - "id": 792, - "name": "Identifier", - "src": "10124:7:1" - }, - { - "attributes": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": "==", - "type": "bool" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "type": "address" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 145, - "type": "mapping(bytes32 => address)", - "value": "_owners" - }, - "id": 793, - "name": "Identifier", - "src": "10132:7:1" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 778, - "type": "bytes32", - "value": "geoDIDId" - }, - "id": 794, - "name": "Identifier", - "src": "10140:8:1" - } - ], - "id": 795, - "name": "IndexAccess", - "src": "10132:17:1" - }, - { - "attributes": { - "argumentTypes": null, - "arguments": [ - null - ], - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [ - null - ], - "tryCall": false, - "type": "address payable", - "type_conversion": false - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - null - ], - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 1666, - "type": "function () view returns (address payable)", - "value": "_msgSender" - }, - "id": 796, - "name": "Identifier", - "src": "10153:10:1" - } - ], - "id": 797, - "name": "FunctionCall", - "src": "10153:12:1" - } - ], - "id": 798, - "name": "BinaryOperation", - "src": "10132:33:1" - }, - { - "attributes": { - "argumentTypes": null, - "hexvalue": "5370617469616c4173736574733a206964206d757374206e6f74206861766520616e206f776e657220796574", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "subdenomination": null, - "token": "string", - "type": "literal_string \"SpatialAssets: id must not have an owner yet\"", - "value": "SpatialAssets: id must not have an owner yet" - }, - "id": 799, - "name": "Literal", - "src": "10167:46:1" - } - ], - "id": 800, - "name": "FunctionCall", - "src": "10124:90:1" - } - ], - "id": 801, - "name": "ExpressionStatement", - "src": "10124:90:1" - }, - { - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [ - null - ], - "tryCall": false, - "type": "tuple()", - "type_conversion": false - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_64e6913217981af21a3600f4e8d0d455b10cb50ec24445db6949f4566f751285", - "typeString": "literal_string \"SpatialAssets: GeoDID to be removed as parent does not exist\"" - } - ], - "overloadedDeclarations": [ - -18, - -18 - ], - "referencedDeclaration": -18, - "type": "function (bool,string memory) pure", - "value": "require" - }, - "id": 802, - "name": "Identifier", - "src": "10224:7:1" - }, - { - "attributes": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": "!=", - "type": "bool" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "type": "address" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 145, - "type": "mapping(bytes32 => address)", - "value": "_owners" - }, - "id": 803, - "name": "Identifier", - "src": "10232:7:1" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 780, - "type": "bytes32", - "value": "parentGeoDIDId" - }, - "id": 804, - "name": "Identifier", - "src": "10240:14:1" - } - ], - "id": 805, - "name": "IndexAccess", - "src": "10232:23:1" - }, - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": true, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [ - null - ], - "tryCall": false, - "type": "address payable", - "type_conversion": true - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - } - ], - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "type": "type(address)" - }, - "children": [ - { - "attributes": { - "name": "address", - "type": null - }, - "id": 806, - "name": "ElementaryTypeName", - "src": "10259:7:1" - } - ], - "id": 807, - "name": "ElementaryTypeNameExpression", - "src": "10259:7:1" - }, - { - "attributes": { - "argumentTypes": null, - "hexvalue": "30", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "subdenomination": null, - "token": "number", - "type": "int_const 0", - "value": "0" - }, - "id": 808, - "name": "Literal", - "src": "10267:1:1" - } - ], - "id": 809, - "name": "FunctionCall", - "src": "10259:10:1" - } - ], - "id": 810, - "name": "BinaryOperation", - "src": "10232:37:1" - }, - { - "attributes": { - "argumentTypes": null, - "hexvalue": "5370617469616c4173736574733a2047656f44494420746f2062652072656d6f76656420617320706172656e7420646f6573206e6f74206578697374", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "subdenomination": null, - "token": "string", - "type": "literal_string \"SpatialAssets: GeoDID to be removed as parent does not exist\"", - "value": "SpatialAssets: GeoDID to be removed as parent does not exist" - }, - "id": 811, - "name": "Literal", - "src": "10271:62:1" - } - ], - "id": 812, - "name": "FunctionCall", - "src": "10224:110:1" - } - ], - "id": 813, - "name": "ExpressionStatement", - "src": "10224:110:1" - }, - { - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [ - null - ], - "tryCall": false, - "type": "tuple()", - "type_conversion": false - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_2ab9bcfb707615a94d108c25ede9d65af23320dbf20a245340508dfbee304ef0", - "typeString": "literal_string \"SpatialAssets: GeoDID does not have a parent to remove\"" - } - ], - "overloadedDeclarations": [ - -18, - -18 - ], - "referencedDeclaration": -18, - "type": "function (bool,string memory) pure", - "value": "require" - }, - "id": 814, - "name": "Identifier", - "src": "10344:7:1" - }, - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "type": "bool" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 153, - "type": "mapping(bytes32 => bool)", - "value": "_hasParent" - }, - "id": 815, - "name": "Identifier", - "src": "10352:10:1" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 778, - "type": "bytes32", - "value": "geoDIDId" - }, - "id": 816, - "name": "Identifier", - "src": "10363:8:1" - } - ], - "id": 817, - "name": "IndexAccess", - "src": "10352:20:1" - }, - { - "attributes": { - "argumentTypes": null, - "hexvalue": "5370617469616c4173736574733a2047656f44494420646f6573206e6f742068617665206120706172656e7420746f2072656d6f7665", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "subdenomination": null, - "token": "string", - "type": "literal_string \"SpatialAssets: GeoDID does not have a parent to remove\"", - "value": "SpatialAssets: GeoDID does not have a parent to remove" - }, - "id": 818, - "name": "Literal", - "src": "10374:56:1" - } - ], - "id": 819, - "name": "FunctionCall", - "src": "10344:87:1" - } - ], - "id": 820, - "name": "ExpressionStatement", - "src": "10344:87:1" - }, - { - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": "=", - "type": "bool" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "type": "bool" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 153, - "type": "mapping(bytes32 => bool)", - "value": "_hasParent" - }, - "id": 821, - "name": "Identifier", - "src": "10442:10:1" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 778, - "type": "bytes32", - "value": "geoDIDId" - }, - "id": 822, - "name": "Identifier", - "src": "10453:8:1" - } - ], - "id": 823, - "name": "IndexAccess", - "src": "10442:20:1" - }, - { - "attributes": { - "argumentTypes": null, - "hexvalue": "66616c7365", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "subdenomination": null, - "token": "bool", - "type": "bool", - "value": "false" - }, - "id": 824, - "name": "Literal", - "src": "10465:5:1" - } - ], - "id": 825, - "name": "Assignment", - "src": "10442:28:1" - } - ], - "id": 826, - "name": "ExpressionStatement", - "src": "10442:28:1" - }, - { - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": "=", - "type": "bytes32" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "type": "bytes32" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 161, - "type": "mapping(bytes32 => bytes32)", - "value": "_root" - }, - "id": 827, - "name": "Identifier", - "src": "10480:5:1" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 778, - "type": "bytes32", - "value": "geoDIDId" - }, - "id": 828, - "name": "Identifier", - "src": "10486:8:1" - } - ], - "id": 829, - "name": "IndexAccess", - "src": "10480:15:1" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 778, - "type": "bytes32", - "value": "geoDIDId" - }, - "id": 830, - "name": "Identifier", - "src": "10498:8:1" - } - ], - "id": 831, - "name": "Assignment", - "src": "10480:26:1" - } - ], - "id": 832, - "name": "ExpressionStatement", - "src": "10480:26:1" - }, - { - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [ - null - ], - "tryCall": false, - "type": "tuple()", - "type_conversion": false - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - ], - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 106, - "type": "function (bytes32,bytes32)", - "value": "ParentRemoved" - }, - "id": 833, - "name": "Identifier", - "src": "10530:13:1" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 778, - "type": "bytes32", - "value": "geoDIDId" - }, - "id": 834, - "name": "Identifier", - "src": "10544:8:1" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 780, - "type": "bytes32", - "value": "parentGeoDIDId" - }, - "id": 835, - "name": "Identifier", - "src": "10554:14:1" - } - ], - "id": 836, - "name": "FunctionCall", - "src": "10530:39:1" - } - ], - "id": 837, - "name": "EmitStatement", - "src": "10525:44:1" - } - ], - "id": 838, - "name": "Block", - "src": "10000:576:1" - } - ], - "id": 839, - "name": "FunctionDefinition", - "src": "9923:653:1" - }, - { - "attributes": { - "functionSelector": "0e437b1c", - "implemented": true, - "isConstructor": false, - "kind": "function", - "modifiers": [ - null - ], - "name": "deactivateSpatialAsset", - "overrides": null, - "scope": 1073, - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "public" - }, - "children": [ - { - "attributes": { - "text": " @dev De-registers a spatial asset" - }, - "id": 840, - "name": "StructuredDocumentation", - "src": "10582:52:1" - }, - { - "children": [ - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "geoDIDId", - "overrides": null, - "scope": 981, - "stateVariable": false, - "storageLocation": "default", - "type": "bytes32", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "bytes32", - "type": "bytes32" - }, - "id": 841, - "name": "ElementaryTypeName", - "src": "10672:7:1" - } - ], - "id": 842, - "name": "VariableDeclaration", - "src": "10672:16:1" - }, - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "childrenToRemove", - "overrides": null, - "scope": 981, - "stateVariable": false, - "storageLocation": "memory", - "type": "bytes32[]", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "length": null, - "type": "bytes32[]" - }, - "children": [ - { - "attributes": { - "name": "bytes32", - "type": "bytes32" - }, - "id": 843, - "name": "ElementaryTypeName", - "src": "10690:7:1" - } - ], - "id": 844, - "name": "ArrayTypeName", - "src": "10690:9:1" - } - ], - "id": 845, - "name": "VariableDeclaration", - "src": "10690:33:1" - } - ], - "id": 846, - "name": "ParameterList", - "src": "10671:53:1" - }, - { - "attributes": { - "parameters": [ - null - ] - }, - "children": [], - "id": 847, - "name": "ParameterList", - "src": "10732:0:1" - }, - { - "children": [ - { - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [ - null - ], - "tryCall": false, - "type": "tuple()", - "type_conversion": false - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_9236a874bf5a6a62bd70349ebeda081a8e8ed50334b7a53f944cd4f8601c274c", - "typeString": "literal_string \"SpatialAssets: caller is not owner of the Spatial Asset\"" - } - ], - "overloadedDeclarations": [ - -18, - -18 - ], - "referencedDeclaration": -18, - "type": "function (bool,string memory) pure", - "value": "require" - }, - "id": 848, - "name": "Identifier", - "src": "10742:7:1" - }, - { - "attributes": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": "==", - "type": "bool" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "type": "address" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 145, - "type": "mapping(bytes32 => address)", - "value": "_owners" - }, - "id": 849, - "name": "Identifier", - "src": "10763:7:1" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 842, - "type": "bytes32", - "value": "geoDIDId" - }, - "id": 850, - "name": "Identifier", - "src": "10771:8:1" - } - ], - "id": 851, - "name": "IndexAccess", - "src": "10763:17:1" - }, - { - "attributes": { - "argumentTypes": null, - "arguments": [ - null - ], - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [ - null - ], - "tryCall": false, - "type": "address payable", - "type_conversion": false - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - null - ], - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 1666, - "type": "function () view returns (address payable)", - "value": "_msgSender" - }, - "id": 852, - "name": "Identifier", - "src": "10784:10:1" - } - ], - "id": 853, - "name": "FunctionCall", - "src": "10784:12:1" - } - ], - "id": 854, - "name": "BinaryOperation", - "src": "10763:33:1" - }, - { - "attributes": { - "argumentTypes": null, - "hexvalue": "5370617469616c4173736574733a2063616c6c6572206973206e6f74206f776e6572206f6620746865205370617469616c204173736574", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "subdenomination": null, - "token": "string", - "type": "literal_string \"SpatialAssets: caller is not owner of the Spatial Asset\"", - "value": "SpatialAssets: caller is not owner of the Spatial Asset" - }, - "id": 855, - "name": "Literal", - "src": "10797:57:1" - } - ], - "id": 856, - "name": "FunctionCall", - "src": "10742:122:1" - } - ], - "id": 857, - "name": "ExpressionStatement", - "src": "10742:122:1" - }, - { - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": "=", - "type": "address" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "type": "address" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 145, - "type": "mapping(bytes32 => address)", - "value": "_owners" - }, - "id": 858, - "name": "Identifier", - "src": "10874:7:1" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 842, - "type": "bytes32", - "value": "geoDIDId" - }, - "id": 859, - "name": "Identifier", - "src": "10882:8:1" - } - ], - "id": 860, - "name": "IndexAccess", - "src": "10874:17:1" - }, - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": true, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [ - null - ], - "tryCall": false, - "type": "address payable", - "type_conversion": true - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - } - ], - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "type": "type(address)" - }, - "children": [ - { - "attributes": { - "name": "address", - "type": null - }, - "id": 861, - "name": "ElementaryTypeName", - "src": "10894:7:1" - } - ], - "id": 862, - "name": "ElementaryTypeNameExpression", - "src": "10894:7:1" - }, - { - "attributes": { - "argumentTypes": null, - "hexvalue": "30", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "subdenomination": null, - "token": "number", - "type": "int_const 0", - "value": "0" - }, - "id": 863, - "name": "Literal", - "src": "10902:1:1" - } - ], - "id": 864, - "name": "FunctionCall", - "src": "10894:10:1" - } - ], - "id": 865, - "name": "Assignment", - "src": "10874:30:1" - } - ], - "id": 866, - "name": "ExpressionStatement", - "src": "10874:30:1" - }, - { - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": "=", - "type": "bytes32" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "type": "bytes32" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 165, - "type": "mapping(bytes32 => bytes32)", - "value": "_externalStorage" - }, - "id": 867, - "name": "Identifier", - "src": "10914:16:1" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 842, - "type": "bytes32", - "value": "geoDIDId" - }, - "id": 868, - "name": "Identifier", - "src": "10931:8:1" - } - ], - "id": 869, - "name": "IndexAccess", - "src": "10914:26:1" - }, - { - "attributes": { - "argumentTypes": null, - "hexvalue": "", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "subdenomination": null, - "token": "string", - "type": "literal_string \"\"", - "value": "" - }, - "id": 870, - "name": "Literal", - "src": "10943:2:1" - } - ], - "id": 871, - "name": "Assignment", - "src": "10914:31:1" - } - ], - "id": 872, - "name": "ExpressionStatement", - "src": "10914:31:1" - }, - { - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": "=", - "type": "bytes32" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "type": "bytes32" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 149, - "type": "mapping(bytes32 => bytes32)", - "value": "_cids" - }, - "id": 873, - "name": "Identifier", - "src": "10955:5:1" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 842, - "type": "bytes32", - "value": "geoDIDId" - }, - "id": 874, - "name": "Identifier", - "src": "10961:8:1" - } - ], - "id": 875, - "name": "IndexAccess", - "src": "10955:15:1" - }, - { - "attributes": { - "argumentTypes": null, - "hexvalue": "", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "subdenomination": null, - "token": "string", - "type": "literal_string \"\"", - "value": "" - }, - "id": 876, - "name": "Literal", - "src": "10973:2:1" - } - ], - "id": 877, - "name": "Assignment", - "src": "10955:20:1" - } - ], - "id": 878, - "name": "ExpressionStatement", - "src": "10955:20:1" - }, - { - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": "=", - "type": "bool" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "type": "bool" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 153, - "type": "mapping(bytes32 => bool)", - "value": "_hasParent" - }, - "id": 879, - "name": "Identifier", - "src": "10985:10:1" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 842, - "type": "bytes32", - "value": "geoDIDId" - }, - "id": 880, - "name": "Identifier", - "src": "10996:8:1" - } - ], - "id": 881, - "name": "IndexAccess", - "src": "10985:20:1" - }, - { - "attributes": { - "argumentTypes": null, - "hexvalue": "66616c7365", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "subdenomination": null, - "token": "bool", - "type": "bool", - "value": "false" - }, - "id": 882, - "name": "Literal", - "src": "11008:5:1" - } - ], - "id": 883, - "name": "Assignment", - "src": "10985:28:1" - } - ], - "id": 884, - "name": "ExpressionStatement", - "src": "10985:28:1" - }, - { - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": "=", - "type": "bytes32" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "type": "bytes32" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 161, - "type": "mapping(bytes32 => bytes32)", - "value": "_root" - }, - "id": 885, - "name": "Identifier", - "src": "11023:5:1" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 842, - "type": "bytes32", - "value": "geoDIDId" - }, - "id": 886, - "name": "Identifier", - "src": "11029:8:1" - } - ], - "id": 887, - "name": "IndexAccess", - "src": "11023:15:1" - }, - { - "attributes": { - "argumentTypes": null, - "hexvalue": "", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "subdenomination": null, - "token": "string", - "type": "literal_string \"\"", - "value": "" - }, - "id": 888, - "name": "Literal", - "src": "11041:2:1" - } - ], - "id": 889, - "name": "Assignment", - "src": "11023:20:1" - } - ], - "id": 890, - "name": "ExpressionStatement", - "src": "11023:20:1" - }, - { - "attributes": { - "assignments": [ - 892 - ] - }, - "children": [ - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "childrensLen", - "overrides": null, - "scope": 980, - "stateVariable": false, - "storageLocation": "default", - "type": "uint256", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "uint256", - "type": "uint256" - }, - "id": 891, - "name": "ElementaryTypeName", - "src": "11054:7:1" - } - ], - "id": 892, - "name": "VariableDeclaration", - "src": "11054:20:1" - }, - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "member_name": "length", - "referencedDeclaration": null, - "type": "uint256" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 845, - "type": "bytes32[] memory", - "value": "childrenToRemove" - }, - "id": 893, - "name": "Identifier", - "src": "11077:16:1" - } - ], - "id": 894, - "name": "MemberAccess", - "src": "11077:23:1" - } - ], - "id": 895, - "name": "VariableDeclarationStatement", - "src": "11054:46:1" - }, - { - "attributes": { - "falseBody": null - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": ">", - "type": "bool" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 892, - "type": "uint256", - "value": "childrensLen" - }, - "id": 896, - "name": "Identifier", - "src": "11115:12:1" - }, - { - "attributes": { - "argumentTypes": null, - "hexvalue": "30", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "subdenomination": null, - "token": "number", - "type": "int_const 0", - "value": "0" - }, - "id": 897, - "name": "Literal", - "src": "11130:1:1" - } - ], - "id": 898, - "name": "BinaryOperation", - "src": "11115:16:1" - }, - { - "children": [ - { - "children": [ - { - "attributes": { - "assignments": [ - 900 - ] - }, - "children": [ - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "j", - "overrides": null, - "scope": 973, - "stateVariable": false, - "storageLocation": "default", - "type": "uint256", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "uint256", - "type": "uint256" - }, - "id": 899, - "name": "ElementaryTypeName", - "src": "11150:7:1" - } - ], - "id": 900, - "name": "VariableDeclaration", - "src": "11150:9:1" - }, - { - "attributes": { - "argumentTypes": null, - "hexvalue": "30", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "subdenomination": null, - "token": "number", - "type": "int_const 0", - "value": "0" - }, - "id": 901, - "name": "Literal", - "src": "11160:1:1" - } - ], - "id": 902, - "name": "VariableDeclarationStatement", - "src": "11150:11:1" - }, - { - "attributes": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": "<", - "type": "bool" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 900, - "type": "uint256", - "value": "j" - }, - "id": 903, - "name": "Identifier", - "src": "11163:1:1" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 892, - "type": "uint256", - "value": "childrensLen" - }, - "id": 904, - "name": "Identifier", - "src": "11167:12:1" - } - ], - "id": 905, - "name": "BinaryOperation", - "src": "11163:16:1" - }, - { - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": "++", - "prefix": false, - "type": "uint256" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 900, - "type": "uint256", - "value": "j" - }, - "id": 906, - "name": "Identifier", - "src": "11181:1:1" - } - ], - "id": 907, - "name": "UnaryOperation", - "src": "11181:3:1" - } - ], - "id": 908, - "name": "ExpressionStatement", - "src": "11181:3:1" - }, - { - "children": [ - { - "attributes": { - "assignments": [ - 910 - ] - }, - "children": [ - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "childrenGeoDID", - "overrides": null, - "scope": 972, - "stateVariable": false, - "storageLocation": "default", - "type": "bytes32", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "bytes32", - "type": "bytes32" - }, - "id": 909, - "name": "ElementaryTypeName", - "src": "11204:7:1" - } - ], - "id": 910, - "name": "VariableDeclaration", - "src": "11204:22:1" - }, - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "type": "bytes32" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 845, - "type": "bytes32[] memory", - "value": "childrenToRemove" - }, - "id": 911, - "name": "Identifier", - "src": "11229:16:1" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 900, - "type": "uint256", - "value": "j" - }, - "id": 912, - "name": "Identifier", - "src": "11246:1:1" - } - ], - "id": 913, - "name": "IndexAccess", - "src": "11229:19:1" - } - ], - "id": 914, - "name": "VariableDeclarationStatement", - "src": "11204:44:1" - }, - { - "children": [ - { - "attributes": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": "&&", - "type": "bool" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": "!=", - "type": "bool" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "type": "address" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 145, - "type": "mapping(bytes32 => address)", - "value": "_owners" - }, - "id": 915, - "name": "Identifier", - "src": "11270:7:1" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 910, - "type": "bytes32", - "value": "childrenGeoDID" - }, - "id": 916, - "name": "Identifier", - "src": "11278:14:1" - } - ], - "id": 917, - "name": "IndexAccess", - "src": "11270:23:1" - }, - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": true, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [ - null - ], - "tryCall": false, - "type": "address payable", - "type_conversion": true - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - } - ], - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "type": "type(address)" - }, - "children": [ - { - "attributes": { - "name": "address", - "type": null - }, - "id": 918, - "name": "ElementaryTypeName", - "src": "11297:7:1" - } - ], - "id": 919, - "name": "ElementaryTypeNameExpression", - "src": "11297:7:1" - }, - { - "attributes": { - "argumentTypes": null, - "hexvalue": "30", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "subdenomination": null, - "token": "number", - "type": "int_const 0", - "value": "0" - }, - "id": 920, - "name": "Literal", - "src": "11305:1:1" - } - ], - "id": 921, - "name": "FunctionCall", - "src": "11297:10:1" - } - ], - "id": 922, - "name": "BinaryOperation", - "src": "11270:37:1" - }, - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "type": "bool" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 153, - "type": "mapping(bytes32 => bool)", - "value": "_hasParent" - }, - "id": 923, - "name": "Identifier", - "src": "11311:10:1" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 910, - "type": "bytes32", - "value": "childrenGeoDID" - }, - "id": 924, - "name": "Identifier", - "src": "11322:14:1" - } - ], - "id": 925, - "name": "IndexAccess", - "src": "11311:26:1" - } - ], - "id": 926, - "name": "BinaryOperation", - "src": "11270:67:1" - }, - { - "children": [ - { - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": "=", - "type": "bool" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "type": "bool" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 153, - "type": "mapping(bytes32 => bool)", - "value": "_hasParent" - }, - "id": 927, - "name": "Identifier", - "src": "11361:10:1" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 910, - "type": "bytes32", - "value": "childrenGeoDID" - }, - "id": 928, - "name": "Identifier", - "src": "11372:14:1" - } - ], - "id": 929, - "name": "IndexAccess", - "src": "11361:26:1" - }, - { - "attributes": { - "argumentTypes": null, - "hexvalue": "66616c7365", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "subdenomination": null, - "token": "bool", - "type": "bool", - "value": "false" - }, - "id": 930, - "name": "Literal", - "src": "11390:5:1" - } - ], - "id": 931, - "name": "Assignment", - "src": "11361:34:1" - } - ], - "id": 932, - "name": "ExpressionStatement", - "src": "11361:34:1" - }, - { - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": "=", - "type": "bytes32" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "type": "bytes32" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 161, - "type": "mapping(bytes32 => bytes32)", - "value": "_root" - }, - "id": 933, - "name": "Identifier", - "src": "11417:5:1" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 910, - "type": "bytes32", - "value": "childrenGeoDID" - }, - "id": 934, - "name": "Identifier", - "src": "11423:14:1" - } - ], - "id": 935, - "name": "IndexAccess", - "src": "11417:21:1" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 910, - "type": "bytes32", - "value": "childrenGeoDID" - }, - "id": 936, - "name": "Identifier", - "src": "11441:14:1" - } - ], - "id": 937, - "name": "Assignment", - "src": "11417:38:1" - } - ], - "id": 938, - "name": "ExpressionStatement", - "src": "11417:38:1" - }, - { - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [ - null - ], - "tryCall": false, - "type": "tuple()", - "type_conversion": false - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - ], - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 113, - "type": "function (bytes32,bytes32)", - "value": "ChildrenRemoved" - }, - "id": 939, - "name": "Identifier", - "src": "11482:15:1" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 842, - "type": "bytes32", - "value": "geoDIDId" - }, - "id": 940, - "name": "Identifier", - "src": "11498:8:1" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 910, - "type": "bytes32", - "value": "childrenGeoDID" - }, - "id": 941, - "name": "Identifier", - "src": "11508:14:1" - } - ], - "id": 942, - "name": "FunctionCall", - "src": "11482:41:1" - } - ], - "id": 943, - "name": "EmitStatement", - "src": "11477:46:1" - } - ], - "id": 944, - "name": "Block", - "src": "11339:203:1" - }, - { - "children": [ - { - "attributes": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": "&&", - "type": "bool" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": "!=", - "type": "bool" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "type": "address" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 145, - "type": "mapping(bytes32 => address)", - "value": "_owners" - }, - "id": 945, - "name": "Identifier", - "src": "11553:7:1" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 910, - "type": "bytes32", - "value": "childrenGeoDID" - }, - "id": 946, - "name": "Identifier", - "src": "11561:14:1" - } - ], - "id": 947, - "name": "IndexAccess", - "src": "11553:23:1" - }, - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": true, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [ - null - ], - "tryCall": false, - "type": "address payable", - "type_conversion": true - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - } - ], - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "type": "type(address)" - }, - "children": [ - { - "attributes": { - "name": "address", - "type": null - }, - "id": 948, - "name": "ElementaryTypeName", - "src": "11580:7:1" - } - ], - "id": 949, - "name": "ElementaryTypeNameExpression", - "src": "11580:7:1" - }, - { - "attributes": { - "argumentTypes": null, - "hexvalue": "30", - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "subdenomination": null, - "token": "number", - "type": "int_const 0", - "value": "0" - }, - "id": 950, - "name": "Literal", - "src": "11588:1:1" - } - ], - "id": 951, - "name": "FunctionCall", - "src": "11580:10:1" - } - ], - "id": 952, - "name": "BinaryOperation", - "src": "11553:37:1" - }, - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": "!", - "prefix": true, - "type": "bool" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "type": "bool" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 153, - "type": "mapping(bytes32 => bool)", - "value": "_hasParent" - }, - "id": 953, - "name": "Identifier", - "src": "11595:10:1" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 910, - "type": "bytes32", - "value": "childrenGeoDID" - }, - "id": 954, - "name": "Identifier", - "src": "11606:14:1" - } - ], - "id": 955, - "name": "IndexAccess", - "src": "11595:26:1" - } - ], - "id": 956, - "name": "UnaryOperation", - "src": "11594:27:1" - } - ], - "id": 957, - "name": "BinaryOperation", - "src": "11553:68:1" - }, - { - "children": [ - { - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [ - null - ], - "tryCall": false, - "type": "tuple()", - "type_conversion": false - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - ], - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 120, - "type": "function (bytes32,bytes32)", - "value": "ChildrenErrorNoParent" - }, - "id": 958, - "name": "Identifier", - "src": "11649:21:1" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 842, - "type": "bytes32", - "value": "geoDIDId" - }, - "id": 959, - "name": "Identifier", - "src": "11671:8:1" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 910, - "type": "bytes32", - "value": "childrenGeoDID" - }, - "id": 960, - "name": "Identifier", - "src": "11681:14:1" - } - ], - "id": 961, - "name": "FunctionCall", - "src": "11649:47:1" - } - ], - "id": 962, - "name": "EmitStatement", - "src": "11644:52:1" - } - ], - "id": 963, - "name": "Block", - "src": "11622:93:1" - }, - { - "children": [ - { - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [ - null - ], - "tryCall": false, - "type": "tuple()", - "type_conversion": false - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - ], - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 127, - "type": "function (bytes32,bytes32)", - "value": "ChildrenErrorNoExistence" - }, - "id": 964, - "name": "Identifier", - "src": "11748:24:1" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 842, - "type": "bytes32", - "value": "geoDIDId" - }, - "id": 965, - "name": "Identifier", - "src": "11773:8:1" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 910, - "type": "bytes32", - "value": "childrenGeoDID" - }, - "id": 966, - "name": "Identifier", - "src": "11783:14:1" - } - ], - "id": 967, - "name": "FunctionCall", - "src": "11748:50:1" - } - ], - "id": 968, - "name": "EmitStatement", - "src": "11743:55:1" - } - ], - "id": 969, - "name": "Block", - "src": "11721:96:1" - } - ], - "id": 970, - "name": "IfStatement", - "src": "11549:268:1" - } - ], - "id": 971, - "name": "IfStatement", - "src": "11266:551:1" - } - ], - "id": 972, - "name": "Block", - "src": "11186:645:1" - } - ], - "id": 973, - "name": "ForStatement", - "src": "11146:685:1" - } - ], - "id": 974, - "name": "Block", - "src": "11132:709:1" - } - ], - "id": 975, - "name": "IfStatement", - "src": "11111:730:1" - }, - { - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [ - null - ], - "tryCall": false, - "type": "tuple()", - "type_conversion": false - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - ], - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 85, - "type": "function (bytes32)", - "value": "SpatialAssetDeactivated" - }, - "id": 976, - "name": "Identifier", - "src": "11856:23:1" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 842, - "type": "bytes32", - "value": "geoDIDId" - }, - "id": 977, - "name": "Identifier", - "src": "11880:8:1" - } - ], - "id": 978, - "name": "FunctionCall", - "src": "11856:33:1" - } - ], - "id": 979, - "name": "EmitStatement", - "src": "11851:38:1" - } - ], - "id": 980, - "name": "Block", - "src": "10732:1164:1" - } - ], - "id": 981, - "name": "FunctionDefinition", - "src": "10640:1256:1" - }, - { - "attributes": { - "implemented": true, - "isConstructor": false, - "kind": "function", - "modifiers": [ - null - ], - "name": "_setURI", - "overrides": null, - "scope": 1073, - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "text": " @dev Sets a new URI for all the spatial asset types" - }, - "id": 982, - "name": "StructuredDocumentation", - "src": "11904:70:1" - }, - { - "children": [ - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "newuri", - "overrides": null, - "scope": 992, - "stateVariable": false, - "storageLocation": "memory", - "type": "string", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "string", - "type": "string" - }, - "id": 983, - "name": "ElementaryTypeName", - "src": "11996:6:1" - } - ], - "id": 984, - "name": "VariableDeclaration", - "src": "11996:20:1" - } - ], - "id": 985, - "name": "ParameterList", - "src": "11995:22:1" - }, - { - "attributes": { - "parameters": [ - null - ] - }, - "children": [], - "id": 986, - "name": "ParameterList", - "src": "12027:0:1" - }, - { - "children": [ - { - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": "=", - "type": "string storage ref" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 141, - "type": "string storage ref", - "value": "_uri" - }, - "id": 987, - "name": "Identifier", - "src": "12037:4:1" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 984, - "type": "string memory", - "value": "newuri" - }, - "id": 988, - "name": "Identifier", - "src": "12044:6:1" - } - ], - "id": 989, - "name": "Assignment", - "src": "12037:13:1" - } - ], - "id": 990, - "name": "ExpressionStatement", - "src": "12037:13:1" - } - ], - "id": 991, - "name": "Block", - "src": "12027:30:1" - } - ], - "id": 992, - "name": "FunctionDefinition", - "src": "11979:78:1" - }, - { - "attributes": { - "documentation": null, - "functionSelector": "1dc2a7b0", - "implemented": true, - "isConstructor": false, - "kind": "function", - "modifiers": [ - null - ], - "name": "idToOwner", - "overrides": null, - "scope": 1073, - "stateMutability": "view", - "virtual": false, - "visibility": "public" - }, - "children": [ - { - "children": [ - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "id", - "overrides": null, - "scope": 1004, - "stateVariable": false, - "storageLocation": "default", - "type": "bytes32", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "bytes32", - "type": "bytes32" - }, - "id": 993, - "name": "ElementaryTypeName", - "src": "12082:7:1" - } - ], - "id": 994, - "name": "VariableDeclaration", - "src": "12082:10:1" - } - ], - "id": 995, - "name": "ParameterList", - "src": "12081:12:1" - }, - { - "children": [ - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "", - "overrides": null, - "scope": 1004, - "stateVariable": false, - "storageLocation": "default", - "type": "address", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "address", - "stateMutability": "nonpayable", - "type": "address" - }, - "id": 996, - "name": "ElementaryTypeName", - "src": "12115:7:1" - } - ], - "id": 997, - "name": "VariableDeclaration", - "src": "12115:7:1" - } - ], - "id": 998, - "name": "ParameterList", - "src": "12114:9:1" - }, - { - "children": [ - { - "attributes": { - "functionReturnParameters": 998 - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "type": "address" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 145, - "type": "mapping(bytes32 => address)", - "value": "_owners" - }, - "id": 999, - "name": "Identifier", - "src": "12141:7:1" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 994, - "type": "bytes32", - "value": "id" - }, - "id": 1000, - "name": "Identifier", - "src": "12149:2:1" - } - ], - "id": 1001, - "name": "IndexAccess", - "src": "12141:11:1" - } - ], - "id": 1002, - "name": "Return", - "src": "12134:18:1" - } - ], - "id": 1003, - "name": "Block", - "src": "12124:35:1" - } - ], - "id": 1004, - "name": "FunctionDefinition", - "src": "12063:96:1" - }, - { - "attributes": { - "documentation": null, - "functionSelector": "c66f70cc", - "implemented": true, - "isConstructor": false, - "kind": "function", - "modifiers": [ - null - ], - "name": "idToCid", - "overrides": null, - "scope": 1073, - "stateMutability": "view", - "virtual": false, - "visibility": "public" - }, - "children": [ - { - "children": [ - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "id", - "overrides": null, - "scope": 1016, - "stateVariable": false, - "storageLocation": "default", - "type": "bytes32", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "bytes32", - "type": "bytes32" - }, - "id": 1005, - "name": "ElementaryTypeName", - "src": "12182:7:1" - } - ], - "id": 1006, - "name": "VariableDeclaration", - "src": "12182:10:1" - } - ], - "id": 1007, - "name": "ParameterList", - "src": "12181:12:1" - }, - { - "children": [ - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "", - "overrides": null, - "scope": 1016, - "stateVariable": false, - "storageLocation": "default", - "type": "bytes32", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "bytes32", - "type": "bytes32" - }, - "id": 1008, - "name": "ElementaryTypeName", - "src": "12215:7:1" - } - ], - "id": 1009, - "name": "VariableDeclaration", - "src": "12215:7:1" - } - ], - "id": 1010, - "name": "ParameterList", - "src": "12214:9:1" - }, - { - "children": [ - { - "attributes": { - "functionReturnParameters": 1010 - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "type": "bytes32" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 149, - "type": "mapping(bytes32 => bytes32)", - "value": "_cids" - }, - "id": 1011, - "name": "Identifier", - "src": "12241:5:1" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 1006, - "type": "bytes32", - "value": "id" - }, - "id": 1012, - "name": "Identifier", - "src": "12247:2:1" - } - ], - "id": 1013, - "name": "IndexAccess", - "src": "12241:9:1" - } - ], - "id": 1014, - "name": "Return", - "src": "12234:16:1" - } - ], - "id": 1015, - "name": "Block", - "src": "12224:33:1" - } - ], - "id": 1016, - "name": "FunctionDefinition", - "src": "12165:92:1" - }, - { - "attributes": { - "documentation": null, - "functionSelector": "0bfa194d", - "implemented": true, - "isConstructor": false, - "kind": "function", - "modifiers": [ - null - ], - "name": "idToCanBeParent", - "overrides": null, - "scope": 1073, - "stateMutability": "view", - "virtual": false, - "visibility": "public" - }, - "children": [ - { - "children": [ - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "id", - "overrides": null, - "scope": 1028, - "stateVariable": false, - "storageLocation": "default", - "type": "bytes32", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "bytes32", - "type": "bytes32" - }, - "id": 1017, - "name": "ElementaryTypeName", - "src": "12288:7:1" - } - ], - "id": 1018, - "name": "VariableDeclaration", - "src": "12288:10:1" - } - ], - "id": 1019, - "name": "ParameterList", - "src": "12287:12:1" - }, - { - "children": [ - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "", - "overrides": null, - "scope": 1028, - "stateVariable": false, - "storageLocation": "default", - "type": "bool", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "bool", - "type": "bool" - }, - "id": 1020, - "name": "ElementaryTypeName", - "src": "12321:4:1" - } - ], - "id": 1021, - "name": "VariableDeclaration", - "src": "12321:4:1" - } - ], - "id": 1022, - "name": "ParameterList", - "src": "12320:6:1" - }, - { - "children": [ - { - "attributes": { - "functionReturnParameters": 1022 - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "type": "bool" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 157, - "type": "mapping(bytes32 => bool)", - "value": "_canBeParent" - }, - "id": 1023, - "name": "Identifier", - "src": "12344:12:1" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 1018, - "type": "bytes32", - "value": "id" - }, - "id": 1024, - "name": "Identifier", - "src": "12357:2:1" - } - ], - "id": 1025, - "name": "IndexAccess", - "src": "12344:16:1" - } - ], - "id": 1026, - "name": "Return", - "src": "12337:23:1" - } - ], - "id": 1027, - "name": "Block", - "src": "12327:40:1" - } - ], - "id": 1028, - "name": "FunctionDefinition", - "src": "12263:104:1" - }, - { - "attributes": { - "documentation": null, - "functionSelector": "092e9f25", - "implemented": true, - "isConstructor": false, - "kind": "function", - "modifiers": [ - null - ], - "name": "idToHasParent", - "overrides": null, - "scope": 1073, - "stateMutability": "view", - "virtual": false, - "visibility": "public" - }, - "children": [ - { - "children": [ - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "id", - "overrides": null, - "scope": 1040, - "stateVariable": false, - "storageLocation": "default", - "type": "bytes32", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "bytes32", - "type": "bytes32" - }, - "id": 1029, - "name": "ElementaryTypeName", - "src": "12396:7:1" - } - ], - "id": 1030, - "name": "VariableDeclaration", - "src": "12396:10:1" - } - ], - "id": 1031, - "name": "ParameterList", - "src": "12395:12:1" - }, - { - "children": [ - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "", - "overrides": null, - "scope": 1040, - "stateVariable": false, - "storageLocation": "default", - "type": "bool", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "bool", - "type": "bool" - }, - "id": 1032, - "name": "ElementaryTypeName", - "src": "12429:4:1" - } - ], - "id": 1033, - "name": "VariableDeclaration", - "src": "12429:4:1" - } - ], - "id": 1034, - "name": "ParameterList", - "src": "12428:6:1" - }, - { - "children": [ - { - "attributes": { - "functionReturnParameters": 1034 - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "type": "bool" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 153, - "type": "mapping(bytes32 => bool)", - "value": "_hasParent" - }, - "id": 1035, - "name": "Identifier", - "src": "12452:10:1" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 1030, - "type": "bytes32", - "value": "id" - }, - "id": 1036, - "name": "Identifier", - "src": "12463:2:1" - } - ], - "id": 1037, - "name": "IndexAccess", - "src": "12452:14:1" - } - ], - "id": 1038, - "name": "Return", - "src": "12445:21:1" - } - ], - "id": 1039, - "name": "Block", - "src": "12435:38:1" - } - ], - "id": 1040, - "name": "FunctionDefinition", - "src": "12373:100:1" - }, - { - "attributes": { - "documentation": null, - "functionSelector": "84f42912", - "implemented": true, - "isConstructor": false, - "kind": "function", - "modifiers": [ - null - ], - "name": "idToExternalStorage", - "overrides": null, - "scope": 1073, - "stateMutability": "view", - "virtual": false, - "visibility": "public" - }, - "children": [ - { - "children": [ - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "id", - "overrides": null, - "scope": 1052, - "stateVariable": false, - "storageLocation": "default", - "type": "bytes32", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "bytes32", - "type": "bytes32" - }, - "id": 1041, - "name": "ElementaryTypeName", - "src": "12508:7:1" - } - ], - "id": 1042, - "name": "VariableDeclaration", - "src": "12508:10:1" - } - ], - "id": 1043, - "name": "ParameterList", - "src": "12507:12:1" - }, - { - "children": [ - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "", - "overrides": null, - "scope": 1052, - "stateVariable": false, - "storageLocation": "default", - "type": "bytes32", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "bytes32", - "type": "bytes32" - }, - "id": 1044, - "name": "ElementaryTypeName", - "src": "12541:7:1" - } - ], - "id": 1045, - "name": "VariableDeclaration", - "src": "12541:7:1" - } - ], - "id": 1046, - "name": "ParameterList", - "src": "12540:9:1" - }, - { - "children": [ - { - "attributes": { - "functionReturnParameters": 1046 - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "type": "bytes32" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 165, - "type": "mapping(bytes32 => bytes32)", - "value": "_externalStorage" - }, - "id": 1047, - "name": "Identifier", - "src": "12567:16:1" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 1042, - "type": "bytes32", - "value": "id" - }, - "id": 1048, - "name": "Identifier", - "src": "12584:2:1" - } - ], - "id": 1049, - "name": "IndexAccess", - "src": "12567:20:1" - } - ], - "id": 1050, - "name": "Return", - "src": "12560:27:1" - } - ], - "id": 1051, - "name": "Block", - "src": "12550:44:1" - } - ], - "id": 1052, - "name": "FunctionDefinition", - "src": "12479:115:1" - }, - { - "attributes": { - "documentation": null, - "functionSelector": "8d0a9bff", - "implemented": true, - "isConstructor": false, - "kind": "function", - "modifiers": [ - null - ], - "name": "allowedStorages", - "overrides": null, - "scope": 1073, - "stateMutability": "view", - "virtual": false, - "visibility": "public" - }, - "children": [ - { - "children": [ - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "offChainStorage", - "overrides": null, - "scope": 1064, - "stateVariable": false, - "storageLocation": "default", - "type": "bytes32", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "bytes32", - "type": "bytes32" - }, - "id": 1053, - "name": "ElementaryTypeName", - "src": "12625:7:1" - } - ], - "id": 1054, - "name": "VariableDeclaration", - "src": "12625:23:1" - } - ], - "id": 1055, - "name": "ParameterList", - "src": "12624:25:1" - }, - { - "children": [ - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "", - "overrides": null, - "scope": 1064, - "stateVariable": false, - "storageLocation": "default", - "type": "bool", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "bool", - "type": "bool" - }, - "id": 1056, - "name": "ElementaryTypeName", - "src": "12671:4:1" - } - ], - "id": 1057, - "name": "VariableDeclaration", - "src": "12671:4:1" - } - ], - "id": 1058, - "name": "ParameterList", - "src": "12670:6:1" - }, - { - "children": [ - { - "attributes": { - "functionReturnParameters": 1058 - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "type": "bool" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 169, - "type": "mapping(bytes32 => bool)", - "value": "_allowedStorages" - }, - "id": 1059, - "name": "Identifier", - "src": "12694:16:1" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 1054, - "type": "bytes32", - "value": "offChainStorage" - }, - "id": 1060, - "name": "Identifier", - "src": "12711:15:1" - } - ], - "id": 1061, - "name": "IndexAccess", - "src": "12694:33:1" - } - ], - "id": 1062, - "name": "Return", - "src": "12687:40:1" - } - ], - "id": 1063, - "name": "Block", - "src": "12677:57:1" - } - ], - "id": 1064, - "name": "FunctionDefinition", - "src": "12600:134:1" - }, - { - "attributes": { - "documentation": null, - "functionSelector": "eac989f8", - "implemented": true, - "isConstructor": false, - "kind": "function", - "modifiers": [ - null - ], - "name": "uri", - "overrides": null, - "scope": 1073, - "stateMutability": "view", - "virtual": false, - "visibility": "public" - }, - "children": [ - { - "attributes": { - "parameters": [ - null - ] - }, - "children": [], - "id": 1065, - "name": "ParameterList", - "src": "12752:2:1" - }, - { - "children": [ - { - "attributes": { - "constant": false, - "mutability": "mutable", - "name": "", - "overrides": null, - "scope": 1072, - "stateVariable": false, - "storageLocation": "memory", - "type": "string", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "string", - "type": "string" - }, - "id": 1066, - "name": "ElementaryTypeName", - "src": "12776:6:1" - } - ], - "id": 1067, - "name": "VariableDeclaration", - "src": "12776:13:1" - } - ], - "id": 1068, - "name": "ParameterList", - "src": "12775:15:1" - }, - { - "children": [ - { - "attributes": { - "functionReturnParameters": 1068 - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 141, - "type": "string storage ref", - "value": "_uri" - }, - "id": 1069, - "name": "Identifier", - "src": "12808:4:1" - } - ], - "id": 1070, - "name": "Return", - "src": "12801:11:1" - } - ], - "id": 1071, - "name": "Block", - "src": "12791:28:1" - } - ], - "id": 1072, - "name": "FunctionDefinition", - "src": "12740:79:1" - } - ], - "id": 1073, - "name": "ContractDefinition", - "src": "539:12282:1" - } - ], - "id": 1074, - "name": "SourceUnit", - "src": "42:12780:1" - }, - "compiler": { - "name": "solc", - "version": "0.6.12+commit.27d51765.Emscripten.clang" - }, - "networks": { - "3": { - "events": { - "0xbd79b86ffe0ab8e8776151514217cd7cacd52c909f66475c3af44e129f0b00ff": { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "bytes32", - "name": "previousAdminRole", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "bytes32", - "name": "newAdminRole", - "type": "bytes32" - } - ], - "name": "RoleAdminChanged", - "type": "event" - }, - "0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d": { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "sender", - "type": "address" - } - ], - "name": "RoleGranted", - "type": "event" - }, - "0xf6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b": { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "sender", - "type": "address" - } - ], - "name": "RoleRevoked", - "type": "event" - }, - "0xa6cc161f6b65bbf394777cb57fb5f3d43cce56acfa59850ab99594ef35b99aab": { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "id", - "type": "uint256" - } - ], - "name": "SpatialAssetDeactivated", - "type": "event" - }, - "0x60d3fb6a4380f21d92b1cbafb25d8d0f693bc9e359cafc542bc0d01a0732a936": { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "id", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "bytes32", - "name": "offChainStorage", - "type": "bytes32" - } - ], - "name": "SpatialAssetRegistered", - "type": "event" - }, - "0x33974780998cd0a6a121380888197f6af20340bc338905596e0c8819ae461a7b": { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "geoDIDId", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "childrenGeoDIDId", - "type": "uint256" - } - ], - "name": "ChildrenAdded", - "type": "event" - }, - "0xd9446a40bb30eb7c68d45f553a8344a460470e6120827bbaa22bb731e455c3ed": { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "geoDIDId", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "childrenGeoDIDId", - "type": "uint256" - } - ], - "name": "ChildrenRemoved", - "type": "event" - }, - "0x00a67c7413e7cbd6fa0dfd556b6bfb0844428500ee38687ae6c65ecf371df4e2": { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "geoDIDId", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "parentGeoDIDId", - "type": "uint256" - } - ], - "name": "ParentAdded", - "type": "event" - }, - "0x8b572be57bab095e1edbcb8666bc126bab7989981d0724d3a8d44966f02e6583": { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "geoDIDId", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "parentGeoDIDId", - "type": "uint256" - } - ], - "name": "ParentRemoved", - "type": "event" - }, - "0x6958d9a5b92b38869062a9e904dc1f2343e1f6b7cd07d5bee19a677b1f253bd2": { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "geoDIDId", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256[]", - "name": "childrenToRemove", - "type": "uint256[]" - } - ], - "name": "SpatialAssetDeactivated", - "type": "event" - }, - "0xc3c858e6322b126c4de2de41f4a8f82707e31807c2f72d3a9e3a1b6552cfcdc5": { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "geoDIDId", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "cid", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "bytes32", - "name": "offChainStorage", - "type": "bytes32" - }, - { - "indexed": false, - "internalType": "bool", - "name": "root", - "type": "bool" - }, - { - "indexed": false, - "internalType": "bool", - "name": "canBeParent", - "type": "bool" - } - ], - "name": "SpatialAssetRegistered", - "type": "event" - }, - "0x0cc103a5869a49c97e798d0ac77b8483c91e7df0b64be636187cba93b7ae367d": { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "geoDIDId", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "cid", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "bytes32", - "name": "offChainStorage", - "type": "bytes32" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "root", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "bool", - "name": "canBeParent", - "type": "bool" - } - ], - "name": "SpatialAssetRegistered", - "type": "event" - }, - "0xc5188e1ad025cd9b14f9b77496a121bb77c2aca1c221401a1e92288a93ad143d": { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "geoDIDId", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "bytes32", - "name": "childrenGeoDIDId", - "type": "bytes32" - } - ], - "name": "ChildrenAdded", - "type": "event" - }, - "0x64cd8d5daa1351ab7ef481cd86ebc8d199e153d85b6442711dbaa6ee68989eee": { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "geoDIDId", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "bytes32", - "name": "childrenGeoDIDId", - "type": "bytes32" - } - ], - "name": "ChildrenRemoved", - "type": "event" - }, - "0xe4dc822b14b51bcb0daee9b2a47ad5cfe785b97988c9ba9fb18a008fa74d8d06": { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "geoDIDId", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "bytes32", - "name": "parentGeoDIDId", - "type": "bytes32" - } - ], - "name": "ParentAdded", - "type": "event" - }, - "0x09ba4d5138fa8cb519e6a82fc3d9fe09a800f44f4b25ecea405424f82ffcaca9": { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "geoDIDId", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "bytes32", - "name": "parentGeoDIDId", - "type": "bytes32" - } - ], - "name": "ParentRemoved", - "type": "event" - }, - "0xfca200adc1021dfcfba93d50e56819ff7cd406f40d8fb784caf11d8c114a78fd": { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "geoDIDId", - "type": "bytes32" - }, - { - "indexed": false, - "internalType": "bytes32[]", - "name": "childrenToRemove", - "type": "bytes32[]" - } - ], - "name": "SpatialAssetDeactivated", - "type": "event" - }, - "0x63b20be522ec742d63054a358a08806c3d3645cddc76f3ffcd2e5a66697a47a2": { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": true, - "internalType": "bytes32", - "name": "geoDIDId", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "bytes32", - "name": "cid", - "type": "bytes32" - }, - { - "indexed": false, - "internalType": "bytes32", - "name": "offChainStorage", - "type": "bytes32" - }, - { - "indexed": false, - "internalType": "bytes32", - "name": "root", - "type": "bytes32" - }, - { - "indexed": false, - "internalType": "bool", - "name": "canBeParent", - "type": "bool" - } - ], - "name": "SpatialAssetRegistered", - "type": "event" - }, - "0xf02d29e4850d2beddb5886160b76b29bd18836de50f35dde5b1ce3e11ec43bb8": { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "geoDIDId", - "type": "bytes32" - } - ], - "name": "SpatialAssetDeactivated", - "type": "event" - }, - "0xc2fbe5202fa3aef19d26284e739c3305170f8c2e9acf77122fc10277a492ac6b": { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "geoDIDId", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "bytes32", - "name": "childrenGeoDIDId", - "type": "bytes32" - } - ], - "name": "ChildrenErrorHasParent", - "type": "event" - }, - "0x9fd08a31a95521d410b6d20008384ec9a65bff57159bb95ad8ba86c03fda0466": { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "geoDIDId", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "bytes32", - "name": "childrenGeoDIDId", - "type": "bytes32" - } - ], - "name": "ChildrenErrorNoExistence", - "type": "event" - }, - "0x69081739e741291d0f0ca163bc158eaa3775c02069512953c69e7ae7e7a1970c": { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "geoDIDId", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "bytes32", - "name": "childrenGeoDIDId", - "type": "bytes32" - } - ], - "name": "ChildrenErrorNoParent", - "type": "event" - } - }, - "links": {}, - "address": "0xD57a165739C1717A1AfDb1C4B2c80f4b87d57933", - "transactionHash": "0x758b4849270a601b9e824ed832cbc64d461b7500e90323bb505152a7b808fb03" - }, - "333": { - "events": { - "0x33974780998cd0a6a121380888197f6af20340bc338905596e0c8819ae461a7b": { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "geoDIDId", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "childrenGeoDIDId", - "type": "uint256" - } - ], - "name": "ChildrenAdded", - "type": "event" - }, - "0xd9446a40bb30eb7c68d45f553a8344a460470e6120827bbaa22bb731e455c3ed": { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "geoDIDId", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "childrenGeoDIDId", - "type": "uint256" - } - ], - "name": "ChildrenRemoved", - "type": "event" - }, - "0x00a67c7413e7cbd6fa0dfd556b6bfb0844428500ee38687ae6c65ecf371df4e2": { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "geoDIDId", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "parentGeoDIDId", - "type": "uint256" - } - ], - "name": "ParentAdded", - "type": "event" - }, - "0x8b572be57bab095e1edbcb8666bc126bab7989981d0724d3a8d44966f02e6583": { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "geoDIDId", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "parentGeoDIDId", - "type": "uint256" - } - ], - "name": "ParentRemoved", - "type": "event" - }, - "0xbd79b86ffe0ab8e8776151514217cd7cacd52c909f66475c3af44e129f0b00ff": { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "bytes32", - "name": "previousAdminRole", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "bytes32", - "name": "newAdminRole", - "type": "bytes32" - } - ], - "name": "RoleAdminChanged", - "type": "event" - }, - "0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d": { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "sender", - "type": "address" - } - ], - "name": "RoleGranted", - "type": "event" - }, - "0xf6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b": { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "sender", - "type": "address" - } - ], - "name": "RoleRevoked", - "type": "event" - }, - "0xa6cc161f6b65bbf394777cb57fb5f3d43cce56acfa59850ab99594ef35b99aab": { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "id", - "type": "uint256" - } - ], - "name": "SpatialAssetDeactivated", - "type": "event" - }, - "0xab0f458e596764e6af15283b8bc76a316532e1149acd758550d12f9041362f78": { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "geoDIDId", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "cid", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "bytes32", - "name": "offChainStorage", - "type": "bytes32" - } - ], - "name": "SpatialAssetRegistered", - "type": "event" - }, - "0xfacd7723c5f086c22b992e5f37de5ae73ad1f38829f0636b23d493040e1470b0": { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "geoDIDId", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "cid", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "bytes32", - "name": "offChainStorage", - "type": "bytes32" - }, - { - "indexed": false, - "internalType": "bool", - "name": "root", - "type": "bool" - } - ], - "name": "SpatialAssetRegistered", - "type": "event" - }, - "0x6958d9a5b92b38869062a9e904dc1f2343e1f6b7cd07d5bee19a677b1f253bd2": { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "geoDIDId", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256[]", - "name": "childrenToRemove", - "type": "uint256[]" - } - ], - "name": "SpatialAssetDeactivated", - "type": "event" - }, - "0xc2978c9c04ebd4422d798a4cd3e559a4a40d60aa4cead5bafe79a0278fc9ef37": { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "geoDIDId", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "cid", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "bytes32", - "name": "offChainStorage", - "type": "bytes32" - }, - { - "indexed": false, - "internalType": "bool", - "name": "root", - "type": "bool" - }, - { - "indexed": false, - "internalType": "string", - "name": "geoDIDtype", - "type": "string" - } - ], - "name": "SpatialAssetRegistered", - "type": "event" - }, - "0xc3c858e6322b126c4de2de41f4a8f82707e31807c2f72d3a9e3a1b6552cfcdc5": { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "geoDIDId", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "cid", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "bytes32", - "name": "offChainStorage", - "type": "bytes32" - }, - { - "indexed": false, - "internalType": "bool", - "name": "root", - "type": "bool" - }, - { - "indexed": false, - "internalType": "bool", - "name": "canBeParent", - "type": "bool" - } - ], - "name": "SpatialAssetRegistered", - "type": "event" - }, - "0x0cc103a5869a49c97e798d0ac77b8483c91e7df0b64be636187cba93b7ae367d": { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "geoDIDId", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "cid", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "bytes32", - "name": "offChainStorage", - "type": "bytes32" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "root", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "bool", - "name": "canBeParent", - "type": "bool" - } - ], - "name": "SpatialAssetRegistered", - "type": "event" - }, - "0xc5188e1ad025cd9b14f9b77496a121bb77c2aca1c221401a1e92288a93ad143d": { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "geoDIDId", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "bytes32", - "name": "childrenGeoDIDId", - "type": "bytes32" - } - ], - "name": "ChildrenAdded", - "type": "event" - }, - "0x64cd8d5daa1351ab7ef481cd86ebc8d199e153d85b6442711dbaa6ee68989eee": { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "geoDIDId", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "bytes32", - "name": "childrenGeoDIDId", - "type": "bytes32" - } - ], - "name": "ChildrenRemoved", - "type": "event" - }, - "0xe4dc822b14b51bcb0daee9b2a47ad5cfe785b97988c9ba9fb18a008fa74d8d06": { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "geoDIDId", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "bytes32", - "name": "parentGeoDIDId", - "type": "bytes32" - } - ], - "name": "ParentAdded", - "type": "event" - }, - "0x09ba4d5138fa8cb519e6a82fc3d9fe09a800f44f4b25ecea405424f82ffcaca9": { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "geoDIDId", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "bytes32", - "name": "parentGeoDIDId", - "type": "bytes32" - } - ], - "name": "ParentRemoved", - "type": "event" - }, - "0xfca200adc1021dfcfba93d50e56819ff7cd406f40d8fb784caf11d8c114a78fd": { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "geoDIDId", - "type": "bytes32" - }, - { - "indexed": false, - "internalType": "bytes32[]", - "name": "childrenToRemove", - "type": "bytes32[]" - } - ], - "name": "SpatialAssetDeactivated", - "type": "event" - }, - "0x63b20be522ec742d63054a358a08806c3d3645cddc76f3ffcd2e5a66697a47a2": { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": true, - "internalType": "bytes32", - "name": "geoDIDId", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "bytes32", - "name": "cid", - "type": "bytes32" - }, - { - "indexed": false, - "internalType": "bytes32", - "name": "offChainStorage", - "type": "bytes32" - }, - { - "indexed": false, - "internalType": "bytes32", - "name": "root", - "type": "bytes32" - }, - { - "indexed": false, - "internalType": "bool", - "name": "canBeParent", - "type": "bool" - } - ], - "name": "SpatialAssetRegistered", - "type": "event" - }, - "0xf02d29e4850d2beddb5886160b76b29bd18836de50f35dde5b1ce3e11ec43bb8": { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "geoDIDId", - "type": "bytes32" - } - ], - "name": "SpatialAssetDeactivated", - "type": "event" - }, - "0xc2fbe5202fa3aef19d26284e739c3305170f8c2e9acf77122fc10277a492ac6b": { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "geoDIDId", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "bytes32", - "name": "childrenGeoDIDId", - "type": "bytes32" - } - ], - "name": "ChildrenErrorHasParent", - "type": "event" - }, - "0x9fd08a31a95521d410b6d20008384ec9a65bff57159bb95ad8ba86c03fda0466": { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "geoDIDId", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "bytes32", - "name": "childrenGeoDIDId", - "type": "bytes32" - } - ], - "name": "ChildrenErrorNoExistence", - "type": "event" - }, - "0x69081739e741291d0f0ca163bc158eaa3775c02069512953c69e7ae7e7a1970c": { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "geoDIDId", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "bytes32", - "name": "childrenGeoDIDId", - "type": "bytes32" - } - ], - "name": "ChildrenErrorNoParent", - "type": "event" - } - }, - "links": {}, - "address": "0xCfEB869F69431e42cdB54A4F4f105C19C080A601", - "transactionHash": "0x126672783b76dd30253aa8f7e0fdf5d1384fac33679d57c92c3db20d360aa027" - } - }, - "schemaVersion": "3.3.4", - "updatedAt": "2021-03-29T15:19:40.270Z", - "networkType": "ethereum", - "devdoc": { - "details": "{SpatialAssets} registry This contract uses {AccessControl} to lock permissioned functions using the different roles - head to its documentation for details. The account that deploys the contract will be granted the 'DATA_SUPPLIER' as well as the default admin role, which will let it grant 'DATA_SUPPLIER' roles to other accounts", - "events": { - "ChildrenAdded(bytes32,bytes32)": { - "details": "Emitted when a children geodid is added to a node" - }, - "ChildrenErrorHasParent(bytes32,bytes32)": { - "details": "Emitted when a children geodid already has a parent but shouldn't have" - }, - "ChildrenErrorNoExistence(bytes32,bytes32)": { - "details": "Emitted when a children geodid does not exist" - }, - "ChildrenErrorNoParent(bytes32,bytes32)": { - "details": "Emitted when a children geodid does not have a parent when trying to remove it from a parent" - }, - "ChildrenRemoved(bytes32,bytes32)": { - "details": "Emitted when a children geodid is removed from a node" - }, - "ParentAdded(bytes32,bytes32)": { - "details": "Emitted when a parent geodid is added to a node" - }, - "ParentRemoved(bytes32,bytes32)": { - "details": "Emitted when a parent geodid is removed from a node" - }, - "SpatialAssetDeactivated(bytes32)": { - "details": "Emitted when Spatial Assets of id `id` are deactivated." - }, - "SpatialAssetRegistered(address,bytes32,bytes32,bytes32,bytes32,bool)": { - "details": "Emitted when Spatial Assets of id `id` are transferred to `to``." - } - }, - "kind": "dev", - "methods": { - "addChildrenGeoDIDs(bytes32,bytes32[])": { - "details": "Adds children GeoDIDs to an already existent geoDID Emits a {ChildrenAdded} event." - }, - "addParentGeoDID(bytes32,bytes32)": { - "details": "Adds a parent GeoDID to an already existent geoDID Emits a {ParentAdded} event." - }, - "constructor": { - "details": "Grants `DEFAULT_ADMIN_ROLE`, `DATA_SUPPLIER` to the account that deploys the contract." - }, - "deactivateSpatialAsset(bytes32,bytes32[])": { - "details": "De-registers a spatial asset" - }, - "disableStorage(bytes32)": { - "details": "Disables an existing storage" - }, - "enableStorage(bytes32)": { - "details": "Registers a new storage that can accept GeoDID document creation" - }, - "getRoleAdmin(bytes32)": { - "details": "Returns the admin role that controls `role`. See {grantRole} and {revokeRole}. To change a role's admin, use {_setRoleAdmin}." - }, - "getRoleMember(bytes32,uint256)": { - "details": "Returns one of the accounts that have `role`. `index` must be a value between 0 and {getRoleMemberCount}, non-inclusive. Role bearers are not sorted in any particular way, and their ordering may change at any point. WARNING: When using {getRoleMember} and {getRoleMemberCount}, make sure you perform all queries on the same block. See the following https://forum.openzeppelin.com/t/iterating-over-elements-on-enumerableset-in-openzeppelin-contracts/2296[forum post] for more information." - }, - "getRoleMemberCount(bytes32)": { - "details": "Returns the number of accounts that have `role`. Can be used together with {getRoleMember} to enumerate all bearers of a role." - }, - "grantRole(bytes32,address)": { - "details": "Grants `role` to `account`. If `account` had not been already granted `role`, emits a {RoleGranted} event. Requirements: - the caller must have ``role``'s admin role." - }, - "hasRole(bytes32,address)": { - "details": "Returns `true` if `account` has been granted `role`." - }, - "registerRole()": { - "details": "Registers a new user with the ability to register a spatial asset." - }, - "registerSpatialAsset(address,bytes32,bytes32,bytes32[],bytes32,bytes32,uint256)": { - "details": "Registers one spatial asset with external storage 'data' and assigns them to `account`. Emits a {SpatialAssetRegistered} event." - }, - "removeChildrenGeoDIDs(bytes32,bytes32[])": { - "details": "Removes childrenGeoDIDs from a geoDID Emits a {ChildrenRemoved} event." - }, - "removeParentGeoDID(bytes32,bytes32)": { - "details": "Removes a parent GeoDID from an already existent geoDID Emits a {ParentAdded} event." - }, - "renounceRole(bytes32,address)": { - "details": "Revokes `role` from the calling account. Roles are often managed via {grantRole} and {revokeRole}: this function's purpose is to provide a mechanism for accounts to lose their privileges if they are compromised (such as when a trusted device is misplaced). If the calling account had been granted `role`, emits a {RoleRevoked} event. Requirements: - the caller must be `account`." - }, - "revokeRole(bytes32,address)": { - "details": "Revokes `role` from `account`. If `account` had been granted `role`, emits a {RoleRevoked} event. Requirements: - the caller must have ``role``'s admin role." - } - }, - "version": 1 - }, - "userdoc": { - "kind": "user", - "methods": {}, - "version": 1 - } -} \ No newline at end of file diff --git a/legacy/packages/subgraph/docs/try.graphql b/legacy/packages/subgraph/docs/try.graphql deleted file mode 100644 index 6986329..0000000 --- a/legacy/packages/subgraph/docs/try.graphql +++ /dev/null @@ -1,22 +0,0 @@ -{ - geoDIDs { - id - owner - bytes32hash - bytes32hashWithQM - errors - cid - storage - root - isRoot - parent - edges { - id - childGeoDID { - id - } - } - active - type - } -} diff --git a/legacy/packages/subgraph/generated/SpatialAssets/SpatialAssets.ts b/legacy/packages/subgraph/generated/SpatialAssets/SpatialAssets.ts deleted file mode 100644 index 8d5722b..0000000 --- a/legacy/packages/subgraph/generated/SpatialAssets/SpatialAssets.ts +++ /dev/null @@ -1,1026 +0,0 @@ -// THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. - -import { - ethereum, - JSONValue, - TypedMap, - Entity, - Bytes, - Address, - BigInt -} from "@graphprotocol/graph-ts"; - -export class ChildrenAdded extends ethereum.Event { - get params(): ChildrenAdded__Params { - return new ChildrenAdded__Params(this); - } -} - -export class ChildrenAdded__Params { - _event: ChildrenAdded; - - constructor(event: ChildrenAdded) { - this._event = event; - } - - get geoDIDId(): Bytes { - return this._event.parameters[0].value.toBytes(); - } - - get childrenGeoDIDId(): Bytes { - return this._event.parameters[1].value.toBytes(); - } -} - -export class ChildrenErrorHasParent extends ethereum.Event { - get params(): ChildrenErrorHasParent__Params { - return new ChildrenErrorHasParent__Params(this); - } -} - -export class ChildrenErrorHasParent__Params { - _event: ChildrenErrorHasParent; - - constructor(event: ChildrenErrorHasParent) { - this._event = event; - } - - get geoDIDId(): Bytes { - return this._event.parameters[0].value.toBytes(); - } - - get childrenGeoDIDId(): Bytes { - return this._event.parameters[1].value.toBytes(); - } -} - -export class ChildrenErrorNoExistence extends ethereum.Event { - get params(): ChildrenErrorNoExistence__Params { - return new ChildrenErrorNoExistence__Params(this); - } -} - -export class ChildrenErrorNoExistence__Params { - _event: ChildrenErrorNoExistence; - - constructor(event: ChildrenErrorNoExistence) { - this._event = event; - } - - get geoDIDId(): Bytes { - return this._event.parameters[0].value.toBytes(); - } - - get childrenGeoDIDId(): Bytes { - return this._event.parameters[1].value.toBytes(); - } -} - -export class ChildrenErrorNoParent extends ethereum.Event { - get params(): ChildrenErrorNoParent__Params { - return new ChildrenErrorNoParent__Params(this); - } -} - -export class ChildrenErrorNoParent__Params { - _event: ChildrenErrorNoParent; - - constructor(event: ChildrenErrorNoParent) { - this._event = event; - } - - get geoDIDId(): Bytes { - return this._event.parameters[0].value.toBytes(); - } - - get childrenGeoDIDId(): Bytes { - return this._event.parameters[1].value.toBytes(); - } -} - -export class ChildrenRemoved extends ethereum.Event { - get params(): ChildrenRemoved__Params { - return new ChildrenRemoved__Params(this); - } -} - -export class ChildrenRemoved__Params { - _event: ChildrenRemoved; - - constructor(event: ChildrenRemoved) { - this._event = event; - } - - get geoDIDId(): Bytes { - return this._event.parameters[0].value.toBytes(); - } - - get childrenGeoDIDId(): Bytes { - return this._event.parameters[1].value.toBytes(); - } -} - -export class ParentAdded extends ethereum.Event { - get params(): ParentAdded__Params { - return new ParentAdded__Params(this); - } -} - -export class ParentAdded__Params { - _event: ParentAdded; - - constructor(event: ParentAdded) { - this._event = event; - } - - get geoDIDId(): Bytes { - return this._event.parameters[0].value.toBytes(); - } - - get parentGeoDIDId(): Bytes { - return this._event.parameters[1].value.toBytes(); - } -} - -export class ParentRemoved extends ethereum.Event { - get params(): ParentRemoved__Params { - return new ParentRemoved__Params(this); - } -} - -export class ParentRemoved__Params { - _event: ParentRemoved; - - constructor(event: ParentRemoved) { - this._event = event; - } - - get geoDIDId(): Bytes { - return this._event.parameters[0].value.toBytes(); - } - - get parentGeoDIDId(): Bytes { - return this._event.parameters[1].value.toBytes(); - } -} - -export class RoleAdminChanged extends ethereum.Event { - get params(): RoleAdminChanged__Params { - return new RoleAdminChanged__Params(this); - } -} - -export class RoleAdminChanged__Params { - _event: RoleAdminChanged; - - constructor(event: RoleAdminChanged) { - this._event = event; - } - - get role(): Bytes { - return this._event.parameters[0].value.toBytes(); - } - - get previousAdminRole(): Bytes { - return this._event.parameters[1].value.toBytes(); - } - - get newAdminRole(): Bytes { - return this._event.parameters[2].value.toBytes(); - } -} - -export class RoleGranted extends ethereum.Event { - get params(): RoleGranted__Params { - return new RoleGranted__Params(this); - } -} - -export class RoleGranted__Params { - _event: RoleGranted; - - constructor(event: RoleGranted) { - this._event = event; - } - - get role(): Bytes { - return this._event.parameters[0].value.toBytes(); - } - - get account(): Address { - return this._event.parameters[1].value.toAddress(); - } - - get sender(): Address { - return this._event.parameters[2].value.toAddress(); - } -} - -export class RoleRevoked extends ethereum.Event { - get params(): RoleRevoked__Params { - return new RoleRevoked__Params(this); - } -} - -export class RoleRevoked__Params { - _event: RoleRevoked; - - constructor(event: RoleRevoked) { - this._event = event; - } - - get role(): Bytes { - return this._event.parameters[0].value.toBytes(); - } - - get account(): Address { - return this._event.parameters[1].value.toAddress(); - } - - get sender(): Address { - return this._event.parameters[2].value.toAddress(); - } -} - -export class SpatialAssetDeactivated extends ethereum.Event { - get params(): SpatialAssetDeactivated__Params { - return new SpatialAssetDeactivated__Params(this); - } -} - -export class SpatialAssetDeactivated__Params { - _event: SpatialAssetDeactivated; - - constructor(event: SpatialAssetDeactivated) { - this._event = event; - } - - get geoDIDId(): Bytes { - return this._event.parameters[0].value.toBytes(); - } -} - -export class SpatialAssetRegistered extends ethereum.Event { - get params(): SpatialAssetRegistered__Params { - return new SpatialAssetRegistered__Params(this); - } -} - -export class SpatialAssetRegistered__Params { - _event: SpatialAssetRegistered; - - constructor(event: SpatialAssetRegistered) { - this._event = event; - } - - get to(): Address { - return this._event.parameters[0].value.toAddress(); - } - - get geoDIDId(): Bytes { - return this._event.parameters[1].value.toBytes(); - } - - get cid(): Bytes { - return this._event.parameters[2].value.toBytes(); - } - - get offChainStorage(): Bytes { - return this._event.parameters[3].value.toBytes(); - } - - get root(): Bytes { - return this._event.parameters[4].value.toBytes(); - } - - get canBeParent(): boolean { - return this._event.parameters[5].value.toBoolean(); - } -} - -export class SpatialAssets extends ethereum.SmartContract { - static bind(address: Address): SpatialAssets { - return new SpatialAssets("SpatialAssets", address); - } - - DATA_SUPPLIER(): Bytes { - let result = super.call("DATA_SUPPLIER", "DATA_SUPPLIER():(bytes32)", []); - - return result[0].toBytes(); - } - - try_DATA_SUPPLIER(): ethereum.CallResult { - let result = super.tryCall( - "DATA_SUPPLIER", - "DATA_SUPPLIER():(bytes32)", - [] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBytes()); - } - - DEFAULT_ADMIN_ROLE(): Bytes { - let result = super.call( - "DEFAULT_ADMIN_ROLE", - "DEFAULT_ADMIN_ROLE():(bytes32)", - [] - ); - - return result[0].toBytes(); - } - - try_DEFAULT_ADMIN_ROLE(): ethereum.CallResult { - let result = super.tryCall( - "DEFAULT_ADMIN_ROLE", - "DEFAULT_ADMIN_ROLE():(bytes32)", - [] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBytes()); - } - - getRoleAdmin(role: Bytes): Bytes { - let result = super.call("getRoleAdmin", "getRoleAdmin(bytes32):(bytes32)", [ - ethereum.Value.fromFixedBytes(role) - ]); - - return result[0].toBytes(); - } - - try_getRoleAdmin(role: Bytes): ethereum.CallResult { - let result = super.tryCall( - "getRoleAdmin", - "getRoleAdmin(bytes32):(bytes32)", - [ethereum.Value.fromFixedBytes(role)] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBytes()); - } - - getRoleMember(role: Bytes, index: BigInt): Address { - let result = super.call( - "getRoleMember", - "getRoleMember(bytes32,uint256):(address)", - [ - ethereum.Value.fromFixedBytes(role), - ethereum.Value.fromUnsignedBigInt(index) - ] - ); - - return result[0].toAddress(); - } - - try_getRoleMember(role: Bytes, index: BigInt): ethereum.CallResult
{ - let result = super.tryCall( - "getRoleMember", - "getRoleMember(bytes32,uint256):(address)", - [ - ethereum.Value.fromFixedBytes(role), - ethereum.Value.fromUnsignedBigInt(index) - ] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toAddress()); - } - - getRoleMemberCount(role: Bytes): BigInt { - let result = super.call( - "getRoleMemberCount", - "getRoleMemberCount(bytes32):(uint256)", - [ethereum.Value.fromFixedBytes(role)] - ); - - return result[0].toBigInt(); - } - - try_getRoleMemberCount(role: Bytes): ethereum.CallResult { - let result = super.tryCall( - "getRoleMemberCount", - "getRoleMemberCount(bytes32):(uint256)", - [ethereum.Value.fromFixedBytes(role)] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBigInt()); - } - - hasRole(role: Bytes, account: Address): boolean { - let result = super.call("hasRole", "hasRole(bytes32,address):(bool)", [ - ethereum.Value.fromFixedBytes(role), - ethereum.Value.fromAddress(account) - ]); - - return result[0].toBoolean(); - } - - try_hasRole(role: Bytes, account: Address): ethereum.CallResult { - let result = super.tryCall("hasRole", "hasRole(bytes32,address):(bool)", [ - ethereum.Value.fromFixedBytes(role), - ethereum.Value.fromAddress(account) - ]); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBoolean()); - } - - idToOwner(id: Bytes): Address { - let result = super.call("idToOwner", "idToOwner(bytes32):(address)", [ - ethereum.Value.fromFixedBytes(id) - ]); - - return result[0].toAddress(); - } - - try_idToOwner(id: Bytes): ethereum.CallResult
{ - let result = super.tryCall("idToOwner", "idToOwner(bytes32):(address)", [ - ethereum.Value.fromFixedBytes(id) - ]); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toAddress()); - } - - idToCid(id: Bytes): Bytes { - let result = super.call("idToCid", "idToCid(bytes32):(bytes32)", [ - ethereum.Value.fromFixedBytes(id) - ]); - - return result[0].toBytes(); - } - - try_idToCid(id: Bytes): ethereum.CallResult { - let result = super.tryCall("idToCid", "idToCid(bytes32):(bytes32)", [ - ethereum.Value.fromFixedBytes(id) - ]); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBytes()); - } - - idToCanBeParent(id: Bytes): boolean { - let result = super.call( - "idToCanBeParent", - "idToCanBeParent(bytes32):(bool)", - [ethereum.Value.fromFixedBytes(id)] - ); - - return result[0].toBoolean(); - } - - try_idToCanBeParent(id: Bytes): ethereum.CallResult { - let result = super.tryCall( - "idToCanBeParent", - "idToCanBeParent(bytes32):(bool)", - [ethereum.Value.fromFixedBytes(id)] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBoolean()); - } - - idToHasParent(id: Bytes): boolean { - let result = super.call("idToHasParent", "idToHasParent(bytes32):(bool)", [ - ethereum.Value.fromFixedBytes(id) - ]); - - return result[0].toBoolean(); - } - - try_idToHasParent(id: Bytes): ethereum.CallResult { - let result = super.tryCall( - "idToHasParent", - "idToHasParent(bytes32):(bool)", - [ethereum.Value.fromFixedBytes(id)] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBoolean()); - } - - idToExternalStorage(id: Bytes): Bytes { - let result = super.call( - "idToExternalStorage", - "idToExternalStorage(bytes32):(bytes32)", - [ethereum.Value.fromFixedBytes(id)] - ); - - return result[0].toBytes(); - } - - try_idToExternalStorage(id: Bytes): ethereum.CallResult { - let result = super.tryCall( - "idToExternalStorage", - "idToExternalStorage(bytes32):(bytes32)", - [ethereum.Value.fromFixedBytes(id)] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBytes()); - } - - allowedStorages(offChainStorage: Bytes): boolean { - let result = super.call( - "allowedStorages", - "allowedStorages(bytes32):(bool)", - [ethereum.Value.fromFixedBytes(offChainStorage)] - ); - - return result[0].toBoolean(); - } - - try_allowedStorages(offChainStorage: Bytes): ethereum.CallResult { - let result = super.tryCall( - "allowedStorages", - "allowedStorages(bytes32):(bool)", - [ethereum.Value.fromFixedBytes(offChainStorage)] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBoolean()); - } - - uri(): string { - let result = super.call("uri", "uri():(string)", []); - - return result[0].toString(); - } - - try_uri(): ethereum.CallResult { - let result = super.tryCall("uri", "uri():(string)", []); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toString()); - } -} - -export class ConstructorCall extends ethereum.Call { - get inputs(): ConstructorCall__Inputs { - return new ConstructorCall__Inputs(this); - } - - get outputs(): ConstructorCall__Outputs { - return new ConstructorCall__Outputs(this); - } -} - -export class ConstructorCall__Inputs { - _call: ConstructorCall; - - constructor(call: ConstructorCall) { - this._call = call; - } - - get uri(): string { - return this._call.inputValues[0].value.toString(); - } -} - -export class ConstructorCall__Outputs { - _call: ConstructorCall; - - constructor(call: ConstructorCall) { - this._call = call; - } -} - -export class GrantRoleCall extends ethereum.Call { - get inputs(): GrantRoleCall__Inputs { - return new GrantRoleCall__Inputs(this); - } - - get outputs(): GrantRoleCall__Outputs { - return new GrantRoleCall__Outputs(this); - } -} - -export class GrantRoleCall__Inputs { - _call: GrantRoleCall; - - constructor(call: GrantRoleCall) { - this._call = call; - } - - get role(): Bytes { - return this._call.inputValues[0].value.toBytes(); - } - - get account(): Address { - return this._call.inputValues[1].value.toAddress(); - } -} - -export class GrantRoleCall__Outputs { - _call: GrantRoleCall; - - constructor(call: GrantRoleCall) { - this._call = call; - } -} - -export class RenounceRoleCall extends ethereum.Call { - get inputs(): RenounceRoleCall__Inputs { - return new RenounceRoleCall__Inputs(this); - } - - get outputs(): RenounceRoleCall__Outputs { - return new RenounceRoleCall__Outputs(this); - } -} - -export class RenounceRoleCall__Inputs { - _call: RenounceRoleCall; - - constructor(call: RenounceRoleCall) { - this._call = call; - } - - get role(): Bytes { - return this._call.inputValues[0].value.toBytes(); - } - - get account(): Address { - return this._call.inputValues[1].value.toAddress(); - } -} - -export class RenounceRoleCall__Outputs { - _call: RenounceRoleCall; - - constructor(call: RenounceRoleCall) { - this._call = call; - } -} - -export class RevokeRoleCall extends ethereum.Call { - get inputs(): RevokeRoleCall__Inputs { - return new RevokeRoleCall__Inputs(this); - } - - get outputs(): RevokeRoleCall__Outputs { - return new RevokeRoleCall__Outputs(this); - } -} - -export class RevokeRoleCall__Inputs { - _call: RevokeRoleCall; - - constructor(call: RevokeRoleCall) { - this._call = call; - } - - get role(): Bytes { - return this._call.inputValues[0].value.toBytes(); - } - - get account(): Address { - return this._call.inputValues[1].value.toAddress(); - } -} - -export class RevokeRoleCall__Outputs { - _call: RevokeRoleCall; - - constructor(call: RevokeRoleCall) { - this._call = call; - } -} - -export class RegisterRoleCall extends ethereum.Call { - get inputs(): RegisterRoleCall__Inputs { - return new RegisterRoleCall__Inputs(this); - } - - get outputs(): RegisterRoleCall__Outputs { - return new RegisterRoleCall__Outputs(this); - } -} - -export class RegisterRoleCall__Inputs { - _call: RegisterRoleCall; - - constructor(call: RegisterRoleCall) { - this._call = call; - } -} - -export class RegisterRoleCall__Outputs { - _call: RegisterRoleCall; - - constructor(call: RegisterRoleCall) { - this._call = call; - } -} - -export class EnableStorageCall extends ethereum.Call { - get inputs(): EnableStorageCall__Inputs { - return new EnableStorageCall__Inputs(this); - } - - get outputs(): EnableStorageCall__Outputs { - return new EnableStorageCall__Outputs(this); - } -} - -export class EnableStorageCall__Inputs { - _call: EnableStorageCall; - - constructor(call: EnableStorageCall) { - this._call = call; - } - - get offChainStorage(): Bytes { - return this._call.inputValues[0].value.toBytes(); - } -} - -export class EnableStorageCall__Outputs { - _call: EnableStorageCall; - - constructor(call: EnableStorageCall) { - this._call = call; - } -} - -export class DisableStorageCall extends ethereum.Call { - get inputs(): DisableStorageCall__Inputs { - return new DisableStorageCall__Inputs(this); - } - - get outputs(): DisableStorageCall__Outputs { - return new DisableStorageCall__Outputs(this); - } -} - -export class DisableStorageCall__Inputs { - _call: DisableStorageCall; - - constructor(call: DisableStorageCall) { - this._call = call; - } - - get offChainStorage(): Bytes { - return this._call.inputValues[0].value.toBytes(); - } -} - -export class DisableStorageCall__Outputs { - _call: DisableStorageCall; - - constructor(call: DisableStorageCall) { - this._call = call; - } -} - -export class RegisterSpatialAssetCall extends ethereum.Call { - get inputs(): RegisterSpatialAssetCall__Inputs { - return new RegisterSpatialAssetCall__Inputs(this); - } - - get outputs(): RegisterSpatialAssetCall__Outputs { - return new RegisterSpatialAssetCall__Outputs(this); - } -} - -export class RegisterSpatialAssetCall__Inputs { - _call: RegisterSpatialAssetCall; - - constructor(call: RegisterSpatialAssetCall) { - this._call = call; - } - - get owner(): Address { - return this._call.inputValues[0].value.toAddress(); - } - - get geoDIDId(): Bytes { - return this._call.inputValues[1].value.toBytes(); - } - - get parentGeoDIDId(): Bytes { - return this._call.inputValues[2].value.toBytes(); - } - - get childrenGeoDIDIds(): Array { - return this._call.inputValues[3].value.toBytesArray(); - } - - get cid(): Bytes { - return this._call.inputValues[4].value.toBytes(); - } - - get offChainStorage(): Bytes { - return this._call.inputValues[5].value.toBytes(); - } - - get geoDIDtype(): BigInt { - return this._call.inputValues[6].value.toBigInt(); - } -} - -export class RegisterSpatialAssetCall__Outputs { - _call: RegisterSpatialAssetCall; - - constructor(call: RegisterSpatialAssetCall) { - this._call = call; - } -} - -export class AddChildrenGeoDIDsCall extends ethereum.Call { - get inputs(): AddChildrenGeoDIDsCall__Inputs { - return new AddChildrenGeoDIDsCall__Inputs(this); - } - - get outputs(): AddChildrenGeoDIDsCall__Outputs { - return new AddChildrenGeoDIDsCall__Outputs(this); - } -} - -export class AddChildrenGeoDIDsCall__Inputs { - _call: AddChildrenGeoDIDsCall; - - constructor(call: AddChildrenGeoDIDsCall) { - this._call = call; - } - - get geoDIDId(): Bytes { - return this._call.inputValues[0].value.toBytes(); - } - - get childrenGeoDIDIds(): Array { - return this._call.inputValues[1].value.toBytesArray(); - } -} - -export class AddChildrenGeoDIDsCall__Outputs { - _call: AddChildrenGeoDIDsCall; - - constructor(call: AddChildrenGeoDIDsCall) { - this._call = call; - } -} - -export class AddParentGeoDIDCall extends ethereum.Call { - get inputs(): AddParentGeoDIDCall__Inputs { - return new AddParentGeoDIDCall__Inputs(this); - } - - get outputs(): AddParentGeoDIDCall__Outputs { - return new AddParentGeoDIDCall__Outputs(this); - } -} - -export class AddParentGeoDIDCall__Inputs { - _call: AddParentGeoDIDCall; - - constructor(call: AddParentGeoDIDCall) { - this._call = call; - } - - get geoDIDId(): Bytes { - return this._call.inputValues[0].value.toBytes(); - } - - get parentGeoDIDId(): Bytes { - return this._call.inputValues[1].value.toBytes(); - } -} - -export class AddParentGeoDIDCall__Outputs { - _call: AddParentGeoDIDCall; - - constructor(call: AddParentGeoDIDCall) { - this._call = call; - } -} - -export class RemoveChildrenGeoDIDsCall extends ethereum.Call { - get inputs(): RemoveChildrenGeoDIDsCall__Inputs { - return new RemoveChildrenGeoDIDsCall__Inputs(this); - } - - get outputs(): RemoveChildrenGeoDIDsCall__Outputs { - return new RemoveChildrenGeoDIDsCall__Outputs(this); - } -} - -export class RemoveChildrenGeoDIDsCall__Inputs { - _call: RemoveChildrenGeoDIDsCall; - - constructor(call: RemoveChildrenGeoDIDsCall) { - this._call = call; - } - - get geoDIDId(): Bytes { - return this._call.inputValues[0].value.toBytes(); - } - - get childrenGeoDIDIds(): Array { - return this._call.inputValues[1].value.toBytesArray(); - } -} - -export class RemoveChildrenGeoDIDsCall__Outputs { - _call: RemoveChildrenGeoDIDsCall; - - constructor(call: RemoveChildrenGeoDIDsCall) { - this._call = call; - } -} - -export class RemoveParentGeoDIDCall extends ethereum.Call { - get inputs(): RemoveParentGeoDIDCall__Inputs { - return new RemoveParentGeoDIDCall__Inputs(this); - } - - get outputs(): RemoveParentGeoDIDCall__Outputs { - return new RemoveParentGeoDIDCall__Outputs(this); - } -} - -export class RemoveParentGeoDIDCall__Inputs { - _call: RemoveParentGeoDIDCall; - - constructor(call: RemoveParentGeoDIDCall) { - this._call = call; - } - - get geoDIDId(): Bytes { - return this._call.inputValues[0].value.toBytes(); - } - - get parentGeoDIDId(): Bytes { - return this._call.inputValues[1].value.toBytes(); - } -} - -export class RemoveParentGeoDIDCall__Outputs { - _call: RemoveParentGeoDIDCall; - - constructor(call: RemoveParentGeoDIDCall) { - this._call = call; - } -} - -export class DeactivateSpatialAssetCall extends ethereum.Call { - get inputs(): DeactivateSpatialAssetCall__Inputs { - return new DeactivateSpatialAssetCall__Inputs(this); - } - - get outputs(): DeactivateSpatialAssetCall__Outputs { - return new DeactivateSpatialAssetCall__Outputs(this); - } -} - -export class DeactivateSpatialAssetCall__Inputs { - _call: DeactivateSpatialAssetCall; - - constructor(call: DeactivateSpatialAssetCall) { - this._call = call; - } - - get geoDIDId(): Bytes { - return this._call.inputValues[0].value.toBytes(); - } - - get childrenToRemove(): Array { - return this._call.inputValues[1].value.toBytesArray(); - } -} - -export class DeactivateSpatialAssetCall__Outputs { - _call: DeactivateSpatialAssetCall; - - constructor(call: DeactivateSpatialAssetCall) { - this._call = call; - } -} diff --git a/legacy/packages/subgraph/generated/schema.ts b/legacy/packages/subgraph/generated/schema.ts deleted file mode 100644 index ea0cc50..0000000 --- a/legacy/packages/subgraph/generated/schema.ts +++ /dev/null @@ -1,210 +0,0 @@ -// THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. - -import { - TypedMap, - Entity, - Value, - ValueKind, - store, - Address, - Bytes, - BigInt, - BigDecimal -} from "@graphprotocol/graph-ts"; - -export class GeoDID extends Entity { - constructor(id: string) { - super(); - this.set("id", Value.fromString(id)); - } - - save(): void { - let id = this.get("id"); - assert(id !== null, "Cannot save GeoDID entity without an ID"); - assert( - id.kind == ValueKind.STRING, - "Cannot save GeoDID entity with non-string ID. " + - 'Considering using .toHex() to convert the "id" to a string.' - ); - store.set("GeoDID", id.toString(), this); - } - - static load(id: string): GeoDID | null { - return store.get("GeoDID", id) as GeoDID | null; - } - - get id(): string { - let value = this.get("id"); - return value.toString(); - } - - set id(value: string) { - this.set("id", Value.fromString(value)); - } - - get bytes32hash(): Bytes { - let value = this.get("bytes32hash"); - return value.toBytes(); - } - - set bytes32hash(value: Bytes) { - this.set("bytes32hash", Value.fromBytes(value)); - } - - get bytes32hashWithQM(): Bytes { - let value = this.get("bytes32hashWithQM"); - return value.toBytes(); - } - - set bytes32hashWithQM(value: Bytes) { - this.set("bytes32hashWithQM", Value.fromBytes(value)); - } - - get owner(): string { - let value = this.get("owner"); - return value.toString(); - } - - set owner(value: string) { - this.set("owner", Value.fromString(value)); - } - - get cid(): string { - let value = this.get("cid"); - return value.toString(); - } - - set cid(value: string) { - this.set("cid", Value.fromString(value)); - } - - get storage(): Bytes { - let value = this.get("storage"); - return value.toBytes(); - } - - set storage(value: Bytes) { - this.set("storage", Value.fromBytes(value)); - } - - get root(): string { - let value = this.get("root"); - return value.toString(); - } - - set root(value: string) { - this.set("root", Value.fromString(value)); - } - - get isRoot(): boolean { - let value = this.get("isRoot"); - return value.toBoolean(); - } - - set isRoot(value: boolean) { - this.set("isRoot", Value.fromBoolean(value)); - } - - get parent(): string { - let value = this.get("parent"); - return value.toString(); - } - - set parent(value: string) { - this.set("parent", Value.fromString(value)); - } - - get edges(): Array { - let value = this.get("edges"); - return value.toStringArray(); - } - - set edges(value: Array) { - this.set("edges", Value.fromStringArray(value)); - } - - get active(): boolean { - let value = this.get("active"); - return value.toBoolean(); - } - - set active(value: boolean) { - this.set("active", Value.fromBoolean(value)); - } - - get type(): string { - let value = this.get("type"); - return value.toString(); - } - - set type(value: string) { - this.set("type", Value.fromString(value)); - } - - get errors(): Array { - let value = this.get("errors"); - return value.toStringArray(); - } - - set errors(value: Array) { - this.set("errors", Value.fromStringArray(value)); - } -} - -export class Edge extends Entity { - constructor(id: string) { - super(); - this.set("id", Value.fromString(id)); - } - - save(): void { - let id = this.get("id"); - assert(id !== null, "Cannot save Edge entity without an ID"); - assert( - id.kind == ValueKind.STRING, - "Cannot save Edge entity with non-string ID. " + - 'Considering using .toHex() to convert the "id" to a string.' - ); - store.set("Edge", id.toString(), this); - } - - static load(id: string): Edge | null { - return store.get("Edge", id) as Edge | null; - } - - get id(): string { - let value = this.get("id"); - return value.toString(); - } - - set id(value: string) { - this.set("id", Value.fromString(value)); - } - - get parentGeoDID(): string { - let value = this.get("parentGeoDID"); - return value.toString(); - } - - set parentGeoDID(value: string) { - this.set("parentGeoDID", Value.fromString(value)); - } - - get childGeoDID(): string { - let value = this.get("childGeoDID"); - return value.toString(); - } - - set childGeoDID(value: string) { - this.set("childGeoDID", Value.fromString(value)); - } - - get active(): boolean { - let value = this.get("active"); - return value.toBoolean(); - } - - set active(value: boolean) { - this.set("active", Value.fromBoolean(value)); - } -} diff --git a/legacy/packages/subgraph/package.json b/legacy/packages/subgraph/package.json deleted file mode 100644 index db2e566..0000000 --- a/legacy/packages/subgraph/package.json +++ /dev/null @@ -1,42 +0,0 @@ -{ - "name": "@astralprotocol/subgraph", - "version": "1.0.13", - "description": "The @astralprotocol/subgraph serves as the indexing engine of the protocol, capturing the registration and modification events of GeoDIDs in the @astralprotocol/contracts. It acts like a decentralized querying database where it is substantially easier to make complex queries to the Spatial Assets registry. It is used to create the tree of GeoDID nodes that represents their relationships and groupings.", - "author": "Astral ", - "homepage": "https://github.com/AstralProtocol/astralprotocol#readme", - "license": "MIT OR Apache-2.0", - "main": "lib/mapping.js", - "directories": { - "lib": "lib", - "test": "__tests__" - }, - "files": [ - "lib" - ], - "repository": { - "type": "git", - "url": "git+https://github.com/AstralProtocol/astralprotocol.git", - "directory": "packages/subgraph" - }, - "publishConfig": { - "registry": "https://registry.npmjs.org", - "access": "public" - }, - "scripts": { - "codegen": "graph codegen", - "build": "graph build", - "deploy": "graph deploy --node https://api.thegraph.com/deploy/ --ipfs https://api.thegraph.com/ipfs/ astralprotocol/spatialassetsfinalv1 --access-token TOKEN_HERE", - "create-local": "graph create --node http://localhost:8020/ astralprotocol/spatialassets", - "remove-local": "graph remove --node http://localhost:8020/ astralprotocol/spatialassets", - "deploy-local": "graph deploy --node http://localhost:8020/ --ipfs http://localhost:5001 astralprotocol/spatialassets", - "remove-subgraph": "graph remove astraldao/spatial-assets --ipfs http://localhost:5001 --node http://127.0.0.1:8020", - "clean": "rm -rf ./lib ./tsconfig.tsbuildinfo" - }, - "bugs": { - "url": "https://github.com/AstralProtocol/astralprotocol/issues" - }, - "dependencies": { - "@graphprotocol/graph-cli": "^0.19.0", - "@graphprotocol/graph-ts": "^0.19.0" - } -} diff --git a/legacy/packages/subgraph/schema.graphql b/legacy/packages/subgraph/schema.graphql deleted file mode 100644 index b0a9cad..0000000 --- a/legacy/packages/subgraph/schema.graphql +++ /dev/null @@ -1,22 +0,0 @@ -type GeoDID @entity { - id: ID! - bytes32hash: Bytes! - bytes32hashWithQM: Bytes! - owner: String! - cid: String! - storage: Bytes! - root: String! - isRoot: Boolean! - parent: String! - edges: [Edge!]! - active: Boolean! - type: String! - errors: [String!]! -} - -type Edge @entity { - id: ID! - parentGeoDID: GeoDID! - childGeoDID: GeoDID! - active: Boolean! -} diff --git a/legacy/packages/subgraph/src/helpers.ts b/legacy/packages/subgraph/src/helpers.ts deleted file mode 100644 index 79be946..0000000 --- a/legacy/packages/subgraph/src/helpers.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { ByteArray } from "@graphprotocol/graph-ts"; - -// Helper adding 0x12 and 0x20 to make the proper ipfs hash -// the returned bytes32 is so [0,31] -export function addQm(a: ByteArray): ByteArray { - let out = new Uint8Array(34); - out[0] = 0x12; - out[1] = 0x20; - for (let i = 0; i < 32; i++) { - out[i + 2] = a[i]; - } - return out as ByteArray; -} diff --git a/legacy/packages/subgraph/src/mapping.ts b/legacy/packages/subgraph/src/mapping.ts deleted file mode 100644 index faf6be5..0000000 --- a/legacy/packages/subgraph/src/mapping.ts +++ /dev/null @@ -1,358 +0,0 @@ -import { - SpatialAssetRegistered, - ParentAdded, - ChildrenAdded, - ParentRemoved, - ChildrenRemoved, - SpatialAssetDeactivated, - ChildrenErrorNoParent, - ChildrenErrorNoExistence, - ChildrenErrorHasParent, -} from "../generated/SpatialAssets/SpatialAssets"; -import { GeoDID, Edge } from "../generated/schema"; -import { Bytes } from "@graphprotocol/graph-ts"; - -import { addQm } from "./helpers"; - -// this is a recursive function to change the root id in the children (and their children) -function changeRoot(edges: string[]): void { - if (edges.length > 0) { - edges.forEach((ed) => { - let edge = Edge.load(ed); - let child = GeoDID.load(edge.childGeoDID); - - child.isRoot = false; - let parent = GeoDID.load(edge.parentGeoDID); - - child.root = parent.root; - - child.save(); - if (child.edges.length > 0) { - changeRoot(child.edges); - } - }); - } -} - -export function handleSpatialAssetRegistered( - event: SpatialAssetRegistered -): void { - let hexHashId = addQm(event.params.geoDIDId) as Bytes; - let base58HashId = "did:geo:" + hexHashId.toBase58(); // imported crypto function - - let geoDID = new GeoDID(base58HashId); - geoDID.bytes32hash = event.params.geoDIDId; - geoDID.bytes32hashWithQM = hexHashId; - - geoDID.owner = event.params.to.toHexString(); - - let hexHashCid = addQm(event.params.cid) as Bytes; - let base58HashCid = hexHashCid.toBase58(); // imported crypto function - - geoDID.cid = base58HashCid; - geoDID.storage = event.params.offChainStorage; - - let hexHashRoot = addQm(event.params.root) as Bytes; - let base58HashRoot = "did:geo:" + hexHashRoot.toBase58(); // imported crypto function - - geoDID.root = base58HashRoot; - - if (hexHashId.toBase58() == hexHashRoot.toBase58()) { - geoDID.isRoot = true; - } else { - geoDID.isRoot = false; - } - - geoDID.active = true; - - geoDID.parent = ""; - - if (event.params.canBeParent) { - geoDID.type = "Collection"; - } else { - geoDID.type = "Item"; - } - - geoDID.edges = []; - geoDID.errors = []; - geoDID.save(); -} - -export function handleParentAdded(event: ParentAdded): void { - let hexHashIdParent = addQm(event.params.parentGeoDIDId) as Bytes; - let base58HashParent = "did:geo:" + hexHashIdParent.toBase58(); // imported crypto function - let hexHashChild = addQm(event.params.geoDIDId) as Bytes; - let base58HashChild = "did:geo:" + hexHashChild.toBase58(); // imported crypto function - - let edge = new Edge(base58HashParent + "-" + base58HashChild); - - edge.parentGeoDID = base58HashParent; - edge.childGeoDID = base58HashChild; - edge.active = true; - edge.save(); - - // add edge to parent - - let parentGeoDID = GeoDID.load(base58HashParent); - - let edges = parentGeoDID.edges; - - edges.push(edge.id); - - parentGeoDID.edges = edges; - - parentGeoDID.save(); - - let geoDID = GeoDID.load(base58HashChild); - - geoDID.parent = base58HashParent; - geoDID.isRoot = false; - geoDID.root = parentGeoDID.root; - - geoDID.save(); - - // change root to root of parent - if (Array.isArray(geoDID.edges)) { - changeRoot(geoDID.edges); - } -} - -export function handleChildrenAdded(event: ChildrenAdded): void { - let hexHashIdParent = addQm(event.params.geoDIDId) as Bytes; - let base58HashParent = "did:geo:" + hexHashIdParent.toBase58(); // imported crypto function - let hexHashChild = addQm(event.params.childrenGeoDIDId) as Bytes; - let base58HashChild = "did:geo:" + hexHashChild.toBase58(); // imported crypto function - - let edge = new Edge(base58HashParent + "-" + base58HashChild); - - edge.parentGeoDID = base58HashParent; - edge.childGeoDID = base58HashChild; - edge.active = true; - edge.save(); - - // add edge to parent - - let parentGeoDID = GeoDID.load(base58HashParent); - - let edges = parentGeoDID.edges; - - edges.push(edge.id); - - parentGeoDID.edges = edges; - - parentGeoDID.save(); - - let geoDID = GeoDID.load(base58HashChild); - - geoDID.parent = base58HashParent; - geoDID.isRoot = false; - geoDID.root = parentGeoDID.root; - geoDID.save(); - - // change root to root of parent - if (Array.isArray(geoDID.edges)) { - changeRoot(geoDID.edges); - } -} - -export function handleParentRemoved(event: ParentRemoved): void { - let hexHashIdParent = addQm(event.params.parentGeoDIDId) as Bytes; - let base58HashParent = "did:geo:" + hexHashIdParent.toBase58(); // imported crypto function - let hexHashChild = addQm(event.params.geoDIDId) as Bytes; - let base58HashChild = "did:geo:" + hexHashChild.toBase58(); // imported crypto function - - let edge = Edge.load(base58HashParent + "-" + base58HashChild); - - edge.active = false; - - edge.save(); - - // remove edge from parent - let parentGeoDID = GeoDID.load(base58HashParent); - - let originalEdges = parentGeoDID.edges; - - let changedEdges: Array; - - for (let i = 0; i < originalEdges.length; i++) { - let ed = Edge.load(originalEdges[i]); - if (ed.id != edge.id) { - changedEdges.push(originalEdges[i]); - } - } - - parentGeoDID.edges = changedEdges; - - parentGeoDID.save(); - - let geoDID = GeoDID.load(base58HashChild); - - geoDID.parent = ""; - - geoDID.root = geoDID.id; - geoDID.isRoot = true; - geoDID.save(); - - // change root from children to itself - if (Array.isArray(geoDID.edges)) { - changeRoot(geoDID.edges); - } -} - -export function handleChildrenRemoved(event: ChildrenRemoved): void { - let hexHashIdParent = addQm(event.params.geoDIDId) as Bytes; - let base58HashParent = "did:geo:" + hexHashIdParent.toBase58(); // imported crypto function - let hexHashChild = addQm(event.params.childrenGeoDIDId) as Bytes; - let base58HashChild = "did:geo:" + hexHashChild.toBase58(); // imported crypto function - - let edge = Edge.load(base58HashParent + "-" + base58HashChild); - - edge.active = false; - - edge.save(); - - // remove edge from parent - let parentGeoDID = GeoDID.load(base58HashParent); - - let originalEdges = parentGeoDID.edges; - - let changedEdges: Array; - - for (let i = 0; i < originalEdges.length; i++) { - let ed = Edge.load(originalEdges[i]); - if (ed.id != edge.id) { - changedEdges.push(originalEdges[i]); - } - } - - parentGeoDID.edges = changedEdges; - - parentGeoDID.save(); - - let geoDID = GeoDID.load(base58HashChild); - - geoDID.parent = ""; - geoDID.root = geoDID.id; - geoDID.isRoot = true; - geoDID.save(); - - if (Array.isArray(geoDID.edges)) { - changeRoot(geoDID.edges); - } -} - -export function handleSpatialAssetDeactivated( - event: SpatialAssetDeactivated -): void { - let hexHashId = addQm(event.params.geoDIDId) as Bytes; - let base58Hash = "did:geo:" + hexHashId.toBase58(); // imported crypto function - - let geoDID = GeoDID.load(base58Hash); - - if (geoDID.parent.length > 0) { - let edgeToParent = Edge.load(geoDID.parent + "-" + base58Hash); - - edgeToParent.active = false; - edgeToParent.save(); - - // remove edge from parent - let parentGeoDID = GeoDID.load(geoDID.parent); - - let originalEdges = parentGeoDID.edges; - - let changedEdges: Array; - - for (let i = 0; i < originalEdges.length; i++) { - let ed = Edge.load(originalEdges[i]); - if (ed.id != edgeToParent.id) { - changedEdges.push(originalEdges[i]); - } - } - - parentGeoDID.edges = changedEdges; - - parentGeoDID.save(); - } - - geoDID.owner = ""; - geoDID.root = ""; - geoDID.active = false; - geoDID.parent = ""; - - geoDID.save(); -} - -export function handleChildrenErrorNoParent( - event: ChildrenErrorNoParent -): void { - let hexHashIdParent = addQm(event.params.geoDIDId) as Bytes; - let base58HashParent = "did:geo:" + hexHashIdParent.toBase58(); // imported crypto function - let hexHashChild = addQm(event.params.childrenGeoDIDId) as Bytes; - let base58HashChild = "did:geo:" + hexHashChild.toBase58(); // imported crypto function - - let geoDID = GeoDID.load(base58HashParent); - - let originalErrors = geoDID.errors; - - let newErrors: Array; - - for (let i = 0; i < originalErrors.length; i++) { - newErrors.push(originalErrors[i]); - } - - newErrors.push("ChildrenErrorNoParent" + base58HashChild); - - geoDID.errors = newErrors; - - geoDID.save(); -} - -export function handleChildrenErrorNoExistence( - event: ChildrenErrorNoExistence -): void { - let hexHashIdParent = addQm(event.params.geoDIDId) as Bytes; - let base58HashParent = "did:geo:" + hexHashIdParent.toBase58(); // imported crypto function - let hexHashChild = addQm(event.params.childrenGeoDIDId) as Bytes; - let base58HashChild = "did:geo:" + hexHashChild.toBase58(); // imported crypto function - - let geoDID = GeoDID.load(base58HashParent); - - let originalErrors = geoDID.errors; - - let newErrors: Array; - - for (let i = 0; i < originalErrors.length; i++) { - newErrors.push(originalErrors[i]); - } - - newErrors.push("ChildrenErrorNoExistence" + base58HashChild); - - geoDID.errors = newErrors; - - geoDID.save(); -} - -export function handleChildrenErrorHasParent( - event: ChildrenErrorHasParent -): void { - let hexHashIdParent = addQm(event.params.geoDIDId) as Bytes; - let base58HashParent = "did:geo:" + hexHashIdParent.toBase58(); // imported crypto function - let hexHashChild = addQm(event.params.childrenGeoDIDId) as Bytes; - let base58HashChild = "did:geo:" + hexHashChild.toBase58(); // imported crypto function - - let geoDID = GeoDID.load(base58HashParent); - - let originalErrors = geoDID.errors; - - let newErrors: Array; - - for (let i = 0; i < originalErrors.length; i++) { - newErrors.push(originalErrors[i]); - } - - newErrors.push("ChildrenErrorHasParent" + base58HashChild); - - geoDID.errors = newErrors; - - geoDID.save(); -} diff --git a/legacy/packages/subgraph/subgraph.yaml b/legacy/packages/subgraph/subgraph.yaml deleted file mode 100644 index e52f37c..0000000 --- a/legacy/packages/subgraph/subgraph.yaml +++ /dev/null @@ -1,40 +0,0 @@ -specVersion: 0.0.2 -schema: - file: ./schema.graphql -dataSources: - - kind: ethereum/contract - name: SpatialAssets - network: ropsten - source: - address: "0x20899AcaD772bEd24A8cf385bA5688428B10a963" - abi: SpatialAssets - mapping: - kind: ethereum/events - apiVersion: 0.0.4 - language: wasm/assemblyscript - entities: - - SpatialAsset - - Node - abis: - - name: SpatialAssets - file: ./abis/SpatialAssets.json - eventHandlers: - - event: SpatialAssetRegistered(indexed address,indexed bytes32,indexed bytes32,bytes32,bytes32,bool) - handler: handleSpatialAssetRegistered - - event: SpatialAssetDeactivated(indexed bytes32) - handler: handleSpatialAssetDeactivated - - event: ParentAdded(indexed bytes32,indexed bytes32) - handler: handleParentAdded - - event: ChildrenAdded(indexed bytes32,indexed bytes32) - handler: handleChildrenAdded - - event: ParentRemoved(indexed bytes32,indexed bytes32) - handler: handleParentRemoved - - event: ChildrenRemoved(indexed bytes32,indexed bytes32) - handler: handleChildrenRemoved - - event: ChildrenErrorNoParent(indexed bytes32,indexed bytes32) - handler: handleChildrenErrorNoParent - - event: ChildrenErrorNoExistence(indexed bytes32,indexed bytes32) - handler: handleChildrenErrorNoExistence - - event: ChildrenErrorHasParent(indexed bytes32,indexed bytes32) - handler: handleChildrenErrorHasParent - file: ./src/mapping.ts diff --git a/legacy/packages/subgraph/subgraphLocal.yaml b/legacy/packages/subgraph/subgraphLocal.yaml deleted file mode 100644 index 2dfda85..0000000 --- a/legacy/packages/subgraph/subgraphLocal.yaml +++ /dev/null @@ -1,40 +0,0 @@ -specVersion: 0.0.2 -schema: - file: ./schema.graphql -dataSources: - - kind: ethereum/contract - name: SpatialAssets - network: mainnet - source: - address: "0xCfEB869F69431e42cdB54A4F4f105C19C080A601" - abi: SpatialAssets - mapping: - kind: ethereum/events - apiVersion: 0.0.4 - language: wasm/assemblyscript - entities: - - SpatialAsset - - Node - abis: - - name: SpatialAssets - file: ./abis/SpatialAssets.json - eventHandlers: - - event: SpatialAssetRegistered(indexed address,indexed bytes32,indexed bytes32,bytes32,bytes32,bool) - handler: handleSpatialAssetRegistered - - event: SpatialAssetDeactivated(indexed bytes32) - handler: handleSpatialAssetDeactivated - - event: ParentAdded(indexed bytes32,indexed bytes32) - handler: handleParentAdded - - event: ChildrenAdded(indexed bytes32,indexed bytes32) - handler: handleChildrenAdded - - event: ParentRemoved(indexed bytes32,indexed bytes32) - handler: handleParentRemoved - - event: ChildrenRemoved(indexed bytes32,indexed bytes32) - handler: handleChildrenRemoved - - event: ChildrenErrorNoParent(indexed bytes32,indexed bytes32) - handler: handleChildrenErrorNoParent - - event: ChildrenErrorNoExistence(indexed bytes32,indexed bytes32) - handler: handleChildrenErrorNoExistence - - event: ChildrenErrorHasParent(indexed bytes32,indexed bytes32) - handler: handleChildrenErrorHasParent - file: ./src/mapping.ts diff --git a/legacy/packages/subgraph/tsconfig.json b/legacy/packages/subgraph/tsconfig.json deleted file mode 100644 index 0d59dec..0000000 --- a/legacy/packages/subgraph/tsconfig.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "extends": "./node_modules/@graphprotocol/graph-ts/tsconfig.json", - "compilerOptions": { - "types": ["@graphprotocol/graph-ts"], - "outDir": "./lib", - "rootDir": "./src", - "composite": true, - "strictNullChecks": false - } -} diff --git a/legacy/tsconfig.json b/legacy/tsconfig.json deleted file mode 100644 index 9ba1d3a..0000000 --- a/legacy/tsconfig.json +++ /dev/null @@ -1,25 +0,0 @@ -{ - "compilerOptions": { - "module": "commonjs", - "lib": ["es2017", "dom", "dom.iterable", "scripthost"], - "target": "es6", - "declaration": true, - "noImplicitAny": true, - "removeComments": true, - "esModuleInterop": true, - "emitDecoratorMetadata": true, - "experimentalDecorators": true, - "sourceMap": true, - "resolveJsonModule": true, - "baseUrl": "./packages" /* Base directory to resolve non-absolute module names. */, - "paths": { - /* A series of entries which re-map imports to lookup locations relative to the 'baseUrl'. */ - "@astraldao/*": ["./*/"] - } - }, - "exclude": ["node_modules", "**/*.spec.ts", "**/*.test.ts"], - "references": [ - { "path": "./packages/core" }, - { "path": "./packages/subgraph" } - ] -} diff --git a/src/contracts/test-to-be-removed/ToBeRemoved.sol b/src/contracts/test-to-be-removed/ToBeRemoved.sol new file mode 100644 index 0000000..1bd1edb --- /dev/null +++ b/src/contracts/test-to-be-removed/ToBeRemoved.sol @@ -0,0 +1,70 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.25; + +interface IERC20 { + function totalSupply() external view returns (uint256); + function balanceOf(address account) external view returns (uint256); + function transfer(address recipient, uint256 amount) external returns (bool); + function allowance(address owner, address spender) external view returns (uint256); + function approve(address spender, uint256 amount) external returns (bool); + function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); +} + +contract ERC20 is IERC20 { + event Transfer(address indexed from, address indexed to, uint256 value); + event Approval(address indexed owner, address indexed spender, uint256 value); + + uint256 public totalSupply; + mapping(address => uint256) public balanceOf; + mapping(address => mapping(address => uint256)) public allowance; + string public name; + string public symbol; + uint8 public decimals; + + constructor(string memory _name, string memory _symbol, uint8 _decimals) { + name = _name; + symbol = _symbol; + decimals = _decimals; + } + + function transfer(address recipient, uint256 amount) external returns (bool) { + balanceOf[msg.sender] -= amount; + balanceOf[recipient] += amount; + emit Transfer(msg.sender, recipient, amount); + return true; + } + + function approve(address spender, uint256 amount) external returns (bool) { + allowance[msg.sender][spender] = amount; + emit Approval(msg.sender, spender, amount); + return true; + } + + function transferFrom(address sender, address recipient, uint256 amount) external returns (bool) { + allowance[sender][msg.sender] -= amount; + balanceOf[sender] -= amount; + balanceOf[recipient] += amount; + emit Transfer(sender, recipient, amount); + return true; + } + + function _mint(address to, uint256 amount) internal { + balanceOf[to] += amount; + totalSupply += amount; + emit Transfer(address(0), to, amount); + } + + function _burn(address from, uint256 amount) internal { + balanceOf[from] -= amount; + totalSupply -= amount; + emit Transfer(from, address(0), amount); + } + + function mint(address to, uint256 amount) external { + _mint(to, amount); + } + + function burn(address from, uint256 amount) external { + _burn(from, amount); + } +}