
Endaoment Smart Contracts
Endaoment’s smart contracts enable permissionless, onchain charitable giving through a sophisticated system of Entities and supporting infrastructure. This documentation helps developers integrate directly with Endaoment’s contract system.These contracts are audited, open-source, and deployed across multiple EVM-compatible chains. For API-based integration (recommended for most applications), see our API Documentation.
When to Use Contracts vs API
Use Direct Contract Integration for:- Fully decentralized applications
- Custom donation flows
- DeFi protocol integrations
- High-volume operations
- User authentication and KYC
- Receipt generation
- Email notifications
- Simple integrations
Entity Quick Start
New to Endaoment entities? Follow this path:- Query Entity State - Learn to read entity balances and manager info
- Make a Donation - Send USDC or other tokens to an entity
- Monitor Activity - Track donations and grants in real-time
- Apply Best Practices - Build robust integrations
90% of integrations involve these entity operations: querying state and accepting donations. Start with these guides before exploring entity deployment.
Contract Architecture
Core Contracts
Endaoment’s ecosystem consists of several key contract types:Registry
The central hub of the Endaoment system. The Registry:- Controls permissions and roles across all contracts
- Tracks approved Entities
- Manages fee structures for donations, transfers, and payouts
- Stores the treasury address for protocol fees
Entity (Org & Fund)
Entities represent organizations and funds in the Endaoment system:- Org: Represents a 501(c)(3) nonprofit organization
- Fund: Represents a Donor-Advised Fund (DAF) or Community Fund
- Receive donations in ETH or ERC-20s
- Query balances and state information
donate(uint256 _amount)- Direct USDC donationreconcileBalance()- Process USDC sent directly to entityentityType()- Query entity type (0 = Org, 1 = Fund)swapAndDonate(...)- Swap and donate any ERC20 or ETH to USDC- Public state:
balance,manager,baseToken,registry
OrgFundFactory
Deploys new Org and Fund entities using minimal proxy pattern for gas efficiency:- Creates deterministic addresses across chains
- Supports atomic deploy-and-donate operations
deployOrg(), deployFund(), deployOrgAndDonate(), deployFundAndDonate(), computeOrgAddress(), computeFundAddress()
Entity Operations
Most integrators work primarily with entities (Orgs and Funds). Start here:Entity Deployment
Deploy new Org or Fund contracts onchain
Donations
Accept USDC donations and batch operations
Entity State & Querying
Read balances and entity metadata
Entity Events & Monitoring
Track donations and grants in real-time
Best Practices
Recommended patterns and security considerations
Common Integration Patterns
Pattern 1: Simple USDC Donation
Pattern 2: Deploy and Donate
Deployed Contracts
Ethereum Mainnet
| Contract | Address |
|---|---|
| Registry | 0x94106ca9c7e567109a1d39413052887d1f412183 |
| OrgFundFactory | 0x10fd9348136dcea154f752fe0b6db45fc298a589 |
| Base Token (USDC) | 0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48 |
Base Mainnet
| Contract | Address |
|---|---|
| Registry | 0x237b53bcfbd3a114b549dfec96a9856808f45c94 |
| OrgFundFactory | 0x10fd9348136dcea154f752fe0b6db45fc298a589 |
| Base Token (USDC) | 0x833589fcd6edb6e08f4c7c32d4f71b54bda02913 |
OP Mainnet
| Contract | Address |
|---|---|
| Registry | 0x5d216bb28852f98ceaa29180670397ab01774ea6 |
| OrgFundFactory | 0x10fd9348136dcea154f752fe0b6db45fc298a589 |
| Base Token (USDC) | 0x0b2c639c533813f4aa9d7837caf62653d097ff85 |
Key Concepts
Base Token: All entities use USDC. Managers: Fund-specific address with permissions to manage the fund (admin-only operations).Minimal Proxy Pattern
Entities use EIP-1167 minimal proxies for:- Low-cost deployment
- Deterministic cross-chain addresses
- Consistent implementation
Contract ABIs
Available in contracts repository: Entity, Registry, OrgFundFactorySecurity Considerations
Audits
Contracts audited by Least Authority.Permissions
- Donations: Anyone can donate to any entity
- Querying: Anyone can read entity state and balances
Before Transacting
- Approve tokens:
token.approve(entity, amount) - Verify entity:
registry.isActiveEntity(address)
Developer Resources
Contract Source Code
View the full Solidity source code
Technical Documentation
Detailed contract documentation
Need Help?
Discord Community
Join our developer community
Contact Engineering
Reach out to our team
