Skip to content

Implement features: Group Billing, Gas Cost Estimator, Webhook Alerts…#2

Open
DanielCharis1 wants to merge 2 commits into
jobbykings:mainfrom
DanielCharis1:feature/implement-issues-42-40-39-41-upstream
Open

Implement features: Group Billing, Gas Cost Estimator, Webhook Alerts…#2
DanielCharis1 wants to merge 2 commits into
jobbykings:mainfrom
DanielCharis1:feature/implement-issues-42-40-39-41-upstream

Conversation

@DanielCharis1

Copy link
Copy Markdown

…, and Contributing Guide

  • Add group billing functionality for apartment management (#42)

    • Parent account can fund multiple child meters
    • BillingGroup struct and related functions
    • Group top-up functionality
  • Implement gas cost estimator helper (#39)

    • Estimate monthly costs for individual meters and providers
    • Large-scale cost analysis for 1000+ meters
    • Operation-specific gas cost tracking
  • Add balance low webhook triggers (#41)

    • Webhook configuration for users
    • Automatic low balance alerts (< 24 hours)
    • Rate limiting to prevent spam (12-hour cooldown)
    • Enhanced claim function with alert integration
  • Draft comprehensive CONTRIBUTING.md (#40)

    • Guidelines for hardware developers (C++/Arduino)
    • Smart contract development standards
    • Testing requirements and deployment checklists
    • Community guidelines and contribution workflow

closes #42
closes #41
closes #40
closes #39

Cascade AI and others added 2 commits March 27, 2026 20:39
…, and Contributing Guide

- Add group billing functionality for apartment management (#42)
  - Parent account can fund multiple child meters
  - BillingGroup struct and related functions
  - Group top-up functionality

- Implement gas cost estimator helper (#39)
  - Estimate monthly costs for individual meters and providers
  - Large-scale cost analysis for 1000+ meters
  - Operation-specific gas cost tracking

- Add balance low webhook triggers (#41)
  - Webhook configuration for users
  - Automatic low balance alerts (< 24 hours)
  - Rate limiting to prevent spam (12-hour cooldown)
  - Enhanced claim function with alert integration

- Draft comprehensive CONTRIBUTING.md (#40)
  - Guidelines for hardware developers (C++/Arduino)
  - Smart contract development standards
  - Testing requirements and deployment checklists
  - Community guidelines and contribution workflow
jobbykings pushed a commit that referenced this pull request Apr 24, 2026
…mpliance

Task #1: Stream Priority System (Intelligent Budgeting)
- Add priority_index field to Meter struct
- Implement throttling threshold detection (20% balance trigger)
- Auto-pause low priority streams (priority >= 5) during financial crunch
- Add set_priority_index() and apply_throttling_if_needed() functions
- Protects essential services during limited funds scenarios

Task #2: Tax Compliance (Compliance-as-Code)
- Add Government_Vault storage for tax collection
- Implement 5% tax-split logic (default 500 bps)
- Divert tax portion to government vault on every withdrawal
- Emit TaxReceipt event with full audit trail
- Ready for institutional and regulated utility providers

Task #3: Self-Maintenance System (Set-and-Forget Reliability)
- Allocate 0.01% of each stream to Maintenance Fund
- Auto-extend TTL every 500,000 ledgers using maintenance funds
- Prevents contract expiration from forgotten manual bumps
- Add get_maintenance_fund() and manual_extend_ttl() functions
- Ensures long-term utility stream reliability

Task #4: Wasm-Hash Rotation (Secure Upgrade Mechanism)
- Implement upgrade proposal system with 7-day veto period
- Users can veto upgrades before finalization
- Immutable terms protection during upgrade process
- Add propose_upgrade(), submit_upgrade_veto(), finalize_upgrade()
- Prevents rug-pulls while allowing protocol evolution

Labels: logic, ux, finance, compliance, legal, optimization, reliability, backend, devops, architecture, security
jobbykings pushed a commit that referenced this pull request Apr 24, 2026
Task #1: Admin Transfer with 48h Timelock
- Add initiate_admin_transfer function with timelock
- Add veto mechanism requiring 10% of active users
- Add execute_admin_transfer after cooling-off period
- Track active users for governance participation

Task #2: Legal Freeze Compliance
- Add legal_freeze function for compliance officers
- Funds moved to legal vault when frozen
- Add release_legal_freeze requiring council multi-sig
- Support regulatory compliance while maintaining audit trail

Task #3: Verified Provider Registry
- Add VerifiedProvider struct and registry
- Add request_provider_verification function
- Add grant_provider_verification (admin or community vote)
- Add is_provider_verified check for user protection

Task #4: Sub-DAO Hierarchical Permissions
- Add SubDaoConfig for budget allocation
- Add create_sub_dao_stream for autonomous spending
- Add recall_sub_dao_funds for parent DAO control
- Enable decentralized corporate budgeting
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant