Skip to main content

Deploying Entities

Deploy new Org and Fund entities using OrgFundFactory.

Overview

Entity Types:
  • Org: 501(c)(3) nonprofit organizations
  • Fund: Donor-advised funds (DAFs) or Community Funds
Key Features:
  • Minimal proxy pattern (EIP-1167) for low gas costs
  • Deterministic cross-chain addresses
  • Atomic deploy-and-donate operations
  • Token swapping during deployment

Factory Addresses

The factory uses the same address across all supported EVM chains, enabling deterministic entity addresses and syncing Org addresses across chains. Please note that this is subject to change in future deployments of the Endaoment protocol.

Deploying an Organization

Basic Org Deployment

Python/web3.py

Deploy and Donate (Atomic)

Deploy an Org and make an initial donation in a single transaction:

Deploying a Fund

Funds work similarly to Orgs but don’t require a tax ID:

Deploy Fund with Initial Deposit

Deploy with Token Swap

Deploy an entity and donate any ERC20 token (swapped to USDC).
This function is available on all networks where OrgFundFactory is deployed. Update RPC endpoint, token addresses, and swap wrapper addresses for your target network. Example shows Ethereum Mainnet configuration.

Predict Addresses

Verify Deployment

Common Errors

”Org already exists”

Since entity contract addresses are deterministic, using the same tax ID will error because of CREATE2 collision.

”ERC20: insufficient allowance”

Increase USDC approval:

Best Practices

  • Use atomic operations (deployAndDonate)
  • Deploy on L2s (Base) for lower costs
  • Verify entity status post-deployment

Next Steps

Donations

Fund your entity

Entity State

Query entity information

Entity Events

Monitor donations and grants