Skip to content
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 15 commits into from
Oct 25, 2024
Merged

Geofence, AgeVerified #11

merged 15 commits into from
Oct 25, 2024

Conversation

arkavo-com
Copy link
Contributor

Summary

  • Implemented GeoFenceContract in Rust: Added functionality to check coordinates within a 3D geofence using Ink smart contracts.
  • Refactored Geofence Storage: Removed contract storage and mapping, simplified geofence handling by passing parameters directly.
  • Tests and Improvements: Updated test cases for geofence checks, added a new test for verifying checks within a 20-foot cube.

Other Changes

  • Added Cargo.toml and lib.rs for contract definitions.
  • Updated .gitignore to ignore .idea/ directories under contracts.

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.
Copy link

@arkavo-com arkavo-com changed the title Geofence Geofence, AgeVerified Oct 25, 2024
@arkavo-com arkavo-com merged commit 5fdeba7 into main Oct 25, 2024
5 checks passed
@arkavo-com arkavo-com deleted the feature/geofence branch October 25, 2024 01:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant