Status: Open-source release v1.0.0 — production deployment at heir.es
This repository is the public MIT snapshot. Internal history and operations remain in the private
heirlabs/webmonorepo.
A comprehensive, no-code web application for legal, accounting, and estate management professionals to create smart contracts for digital asset inheritance. The platform is currently in active development with working core features and ongoing integration testing.
- No-Code Smart Contract Generation: Create inheritance contracts through an intuitive wizard interface
- Multi-Blockchain Support: Generate contracts for EVM-compatible chains (Ethereum, Polygon, Base, Avalanche) and Solana
- EVM Patterns: EVM contracts follow h3irs/protocol patterns with:
- ERC6551 (Token Bound Accounts) module support
- setModule/resetModule/claimModule pattern
- Timer-based dead man's switch per NFT/module
- Anyone can claim (allows bots to claim on behalf of beneficiaries)
- Traditional contract-based inheritance for native currency and tokens
- Solana Patterns: Solana contracts follow heirlabs/estate patterns with:
- Inactivity period + grace period dead man's switch
- Check-in system to reset timer
- Emergency lock/unlock mechanisms
- Up to 10 beneficiaries with percentage-based distribution
- Inheritance Law Templates: Pre-built templates for:
- Common Law (per capita, per stirpes)
- Civil Law (forced heirship)
- Islamic Law (Mirth, Wasiyyah, Waqf)
- Custom logic templates
- Dead Man's Switch: Timeout-based mechanism to prevent premature asset claims
- Access Control: Owner-only functions for contract management
- Reentrancy Protection: Built-in security measures
- Security Audit: npm audit runs during CI/CD (now enforced, previously ignored)
- Beneficiary Management: Easy addition and management of beneficiaries
- Asset Management: Support for native currencies, tokens (ERC-20/SPL), and NFTs (ERC-721)
- Gas Estimation: Cost estimates for contract deployment
- Plain English Summaries: Human-readable contract explanations
├── server/ # Backend Express server
│ ├── generators/ # Code generators (Solidity, Solana)
│ ├── templates/ # Inheritance law calculators
│ ├── validators/ # Input validation
│ ├── audit/ # Static analysis
│ └── server.js # Main server file
├── src/
│ ├── components/
│ │ └── wizard/ # Wizard step components
│ ├── pages/
│ │ └── ContractBuilder.jsx
│ └── styles/
└── package.json
- Node.js 18+ and npm
- For Solana contracts: Rust and Anchor framework (optional, for local compilation)
- Install frontend dependencies:
npm install- Install backend dependencies:
cd server
npm install- Start the backend server:
cd server
npm run dev
# Server runs on http://localhost:3001- Start the frontend development server:
npm run dev
# Frontend runs on http://localhost:5173- Navigate to
/builderin your browser - Follow the wizard steps:
- Step 1: Select blockchain (EVM or Solana) and enter owner address
- Step 2: Add digital assets (native currency, tokens, NFTs)
- Step 3: Add beneficiaries with their wallet addresses
- Step 4: Select inheritance law template and configure parameters
- Step 5: Configure dead man's switch (lockup period)
- Step 6: Review configuration and generate contract
- Review the generated code and security analysis
- Download the contract code for deployment
- Copy the generated Solidity code
- Use Remix IDE, Hardhat, or Truffle to compile and deploy
- Ensure you have OpenZeppelin Contracts installed:
npm install @openzeppelin/contractsNote: The EVM contract generator follows patterns from h3irs/protocol, including:
- ERC6551 Module Support: Works with ERC721 NFTs and ERC6551 Token Bound Accounts
- setModule(): Set beneficiary and timer for each NFT/module (owner must approve contract first)
- resetModule(): Reset timer to prevent inheritance trigger (check-in function)
- claimModule(): Anyone can call to transfer NFT to beneficiary after timer expires
- Limitations: Owner can revoke approval or transfer NFT, making contract ineffective for that NFT
- Copy the generated Rust/Anchor code
- Set up an Anchor workspace
- Replace the
declare_id!with your program ID - Build and deploy using Anchor CLI
Note: The Solana contract generator follows patterns from heirlabs/estate, including:
- Inactivity period (24 hours to 300 years) + grace period (24 hours to 90 days)
- Check-in system via
checkIn()instruction - Emergency lock/unlock functionality
- Up to 10 beneficiaries with shares that must sum to 100%
- Event emissions for all state changes
Generate smart contract code based on input configuration.
Request Body:
{
"blockchain": "evm" | "solana",
"ownerAddress": "0x...",
"assets": [...],
"beneficiaries": [...],
"inheritanceTemplate": {...},
"deadMansSwitch": {...}
}Response:
{
"contractCode": "...",
"contractInfo": {...},
"analysis": {...},
"success": true
}Estimate gas fees for contract deployment and operations.
-
Dead Man's Switch: The timeout-based mechanism requires regular activity updates. If you don't update activity, beneficiaries can claim after the lockup period.
-
Private Keys: Never share your private keys. The contract owner must securely manage their wallet.
-
Testing: Always test contracts on testnets before deploying to mainnet.
-
Legal Review: Have a legal professional review the contract logic before deployment.
-
Oracle-Based Switch: If using oracle-based dead man's switch, ensure the oracle is trustworthy.
- Per Capita: Equal distribution to all beneficiaries
- Per Stirpes: Distribution by family branch
- Forced Heirship: Reserved portion for reserved heirs (children, spouse)
- Disposable Portion: Remaining portion can be freely distributed
- Fixed shares based on relationships:
- Spouse: 1/8 (if children exist)
- Sons: Double share of daughters
- Daughters: Half share of sons
- Parents: 1/6 each
- And more...
- Up to 1/3 of estate can be bequeathed to non-heirs or charitable causes
- Endowment for charitable or religious purposes in perpetuity
- Create a calculator function in
server/templates/ - Add template option in
InheritanceTemplate.jsx - Update code generators to use the new template
Modify server/generators/solidity.js or server/generators/solana.js to add new features or optimize generated code.
| Repo | Role |
|---|---|
| h3irs/protocol | EVM inheritance contract patterns |
| heirlabs/estate | Solana estate program patterns |
| heirlabs/heir-eliza | AI agent runtime (not vendored here) |
| heirlabs/heir-mcp | MCP server (included in heir-mcp/) |
See CONTRIBUTING.md. Report security issues per SECURITY.md.
MIT License — see LICENSE and NOTICE.
This software is provided "as is" without warranty. Users are responsible for:
- Verifying contract logic with legal professionals
- Testing contracts thoroughly before mainnet deployment
- Understanding the implications of smart contract deployment
- Managing their own private keys and wallet security
For issues, questions, or contributions, please open an issue on the repository.