-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Geofence, AgeVerified #11
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Implemented a GeoFenceContract to check coordinates within a 3D geofence using Rust and Ink smart contracts. Added Cargo.toml and lib.rs files with contract definitions, dependencies, and test cases. Updated .gitignore to ignore all .idea/ directories under contracts.
Switched from fixed-point to integer latitude/longitude/altitude representation and integrated ink! Mapping for geofence storage and retrieval. Introduced `add_geofence` method and updated tests accordingly for better geofence management.
Removed the geofence storage and mapping from GeoFenceContract, simplifying the contract structure. Updated the is_within_geofence function to take a Geofence3D parameter directly instead of using a mapping. Added a new test function to verify geofence checks within a 20-foot cube.
Added a new geo-fencing contract for enhanced policy enforcement. This includes integration of a `GeoFenceContract` to check if coordinates fall within defined geofences. Adjusted the handling of policy types to include embedded geofence data validation.
Updated the `handle_event` function to include NATS connection for routing events to NATS. Improved error handling and added `RouteEvent` support in event schema. Furthermore, cleaned up deprecated code formatting and streamlined field additions in FbsBuilder.
Refactor function and logs to use 'event' terminology instead of 'message'. Updated Cargo.toml to version 0.9.1 to reflect these changes.
Updated Geofence3D and Coordinate3D structs to use f64 instead of i64 for latitude, longitude, and altitude. This change improves precision for geofencing and simplifies coordinate calculations in the main code. Also adjusted test cases to align with the new floating-point coordinates.
Introduce a new Timestamp Validator contract with basic functionality to validate timestamps. Updated the README to include deployment instructions for the new contract.
Introduce a new content rating contract to validate content based on age levels. This includes enum definitions for RatingLevel, AgeLevel, and Error, and implements validation logic and unit tests.
Added `#![allow(clippy::extra_unused_lifetimes)]` to suppress Clippy warnings in `event_generated.rs`. Implemented `Default` trait for `GeoFenceContract` in `geo_fence_contract.rs` to provide a default constructor.
Reorganized import statements in `main.rs` and improved code readability by reformatting lines for better alignment. Enhanced the clarity of deprecation warnings and structured method definitions more consistently across `event_generated.rs`.
Introduce a new content rating contract with age and rating levels. Integrate content rating validation into the main module to enforce content policies based on predefined rating criteria.
This file is automatically generated using the FlatBuffers compiler. It includes various enums like RatingLevel, FormatType, DataEncoding, and ArchiveType, as well as structs such as Rating and Purpose.
Introduce a new age field in the Claims struct to verify the age of users for content rating. This helps differentiate content access based on age criteria and ensures age-appropriate content delivery.
Quality Gate passedIssues Measures |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
Other Changes
.idea/
directories under contracts.