## Overview Implement the on-chain voting system for tokenized asset governance proposals inside `contracts/contrib/`. ## Location All work must be inside `contracts/contrib/src/voting.rs`. ## Acceptance Criteria - [ ] `Proposal` struct: `proposal_id: u64`, `asset_id: BytesN<32>`, `proposal_type: String`, `yes_votes: i128`, `no_votes: i128`, `deadline: u64`, `min_threshold: i128`, `status: ProposalStatus` (Active, Passed, Rejected, Executed) - [ ] `create_proposal(env, asset_id, proposal_type, min_threshold, deadline) -> u64` — returns proposal ID - [ ] `cast_vote(env, asset_id, proposal_id, voter, support: bool)` — requires auth from voter; voter balance must meet `min_threshold`; prevents double voting; adds voter balance as vote weight - [ ] Vote weights stored per voter per proposal
Overview
Implement the on-chain voting system for tokenized asset governance proposals inside
contracts/contrib/.Location
All work must be inside
contracts/contrib/src/voting.rs.Acceptance Criteria
Proposalstruct:proposal_id: u64,asset_id: BytesN<32>,proposal_type: String,yes_votes: i128,no_votes: i128,deadline: u64,min_threshold: i128,status: ProposalStatus(Active, Passed, Rejected, Executed)create_proposal(env, asset_id, proposal_type, min_threshold, deadline) -> u64— returns proposal IDcast_vote(env, asset_id, proposal_id, voter, support: bool)— requires auth from voter; voter balance must meetmin_threshold; prevents double voting; adds voter balance as vote weight