Skip to content

Add Plan Amendment & Codicil Functions to Inheritance Contract #505

@ONEONUORA

Description

@ONEONUORA

Component: Contracts (Inheritance) | Effort: 4-5 days | Priority: MEDIUM

Current State

Plans can be modified but no formal amendment/codicil tracking.

Missing Functions

Amendment and codicil functions:

  • create_amendment() - Create formal amendment to plan
  • get_amendments() - List all amendments
  • get_amendment_history() - Get full amendment history
  • revoke_amendment() - Revoke specific amendment
  • create_codicil() - Add codicil (minor change)
  • get_codicils() - List all codicils

Why This Matters

  • Legal validity: Formal amendments required in many jurisdictions
  • Audit trail: Track all changes to plan
  • Transparency: Beneficiaries see change history
  • Compliance: Meet legal requirements for will modifications

Tasks

  • Add Amendment struct (amendment_id, plan_id, change_type, old_value, new_value, created_at, reason)
  • Add Codicil struct (codicil_id, plan_id, description, created_at)
  • Implement create_amendment() function
    • Record what changed
    • Store old and new values
    • Require owner signature
    • Emit AmendmentCreated event
  • Add get_amendments() view function
  • Implement create_codicil() for minor changes
  • Add amendment versioning
  • Implement revoke_amendment() function
  • Track amendment count per plan
  • Add amendment approval by witnesses (optional)
  • Add tests for amendments
  • Document amendment process

Acceptance Criteria

  • Amendments tracked formally
  • Change history complete
  • Codicils supported
  • Amendments can be revoked
  • Tests cover amendment scenarios
  • Documentation explains legal implications

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions