Donate to charities onchain via Endaoment. Use when the user wants to donate crypto to charity, make a charitable contribution, give to nonprofits, support a cause, or donate to a 501(c)(3). Supports Base, Ethereum, and Optimism. Handles USDC donations directly or swaps ETH/tokens to USDC automatically.
Donate to 501(c)(3) nonprofits onchain via Endaoment's smart contracts.
Search by name or EIN:
./scripts/search.sh "27-1661997" # EIN lookup (GiveDirectly)
./scripts/search.sh "Red Cross" # Name search
./scripts/donate.sh <ein> <amount_usdc>
Example: Donate $5 USDC to GiveDirectly:
./scripts/donate.sh 27-1661997 5
The donate script uses Bankr's arbitrary transaction feature to:
deployOrgAndDonate(orgId, amount) which:
| Charity | EIN |
|---|---|
| GiveDirectly | 27-1661997 |
| North Shore Animal League America | 11-1666852 |
| American Red Cross | 53-0196605 |
| Doctors Without Borders | 13-3433452 |
| ASPCA | 13-1623829 |
See references/popular-charities.md for more.
| Contract | Address |
|---|---|
| Registry | 0x237b53bcfbd3a114b549dfec96a9856808f45c94 |
| OrgFundFactory | 0x10fd9348136dcea154f752fe0b6db45fc298a589 |
| USDC | 0x833589fcd6edb6e08f4c7c32d4f71b54bda02913 |
approve(address,uint256): 0x095ea7b3deployOrgAndDonate(bytes32,uint256): 0xdb9e30ccThe EIN (e.g., "11-1666852") is encoded as bytes32:
"11-1666852" → 0x31312d3136363638353200000000000000000000000000000000000000000000