01 / PROJECT BRIEF
A rule-driven claims workflow.
Claim Ledger is an Ethereum smart contract for managing the path from insurance claim submission to settlement. It gives customers a controlled way to submit a claim and request approval, while an administrator handles KYC and payment authorization.
02 / WORKFLOW
One claim. Four checks.
Every stage has a clear owner and a contract-level condition. The happy path is simple; the value is that invalid actions are rejected consistently.
submitClaim(amount)kyc(customer, true)askApproval()triggerPayment(customer)03 / CONTRACT SURFACE
Roles, storage, events.
Permissions
The deployer becomes the administrator. The onlyAdmin modifier protects KYC, contract balance, cross-customer inspection, and payout.
Storage
Private mappings keep claim and KYC records behind role-aware getters. A claim stores a customer wallet, amount, and enum state.
Events
NewClaim, ClaimApproved, and ClaimPaid expose the major transitions as queryable transaction logs.
Funding
The payable constructor seeds the contract reserve. Approval checks the tracked balance before the administrator can settle a claim.
04 / LOCAL DEVELOPMENT
Run the original stack.
The project uses Brownie for deployment and console interaction, with Ganache providing a local Ethereum network at port 7545.
python -m venv venv
.\venv\Scripts\activate
pip install eth-brownie
cd ClaimManager
brownie networks add development local host=http://127.0.0.1:7545 cmd=ganache
brownie run deployClaimManager.py
brownie consoleAfter deployment, connect to the returned address with ClaimManager.at("DEPLOYED_CONTRACT_ADDRESS"), then follow the workflow above with accounts 0 and 1.
05 / SOURCE MAP