$npx -y skills add basezh/agent-skills-on-base --skill endaomentDonate 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/token
| 1 | # Endaoment Charity Donations |
| 2 | |
| 3 | Donate to 501(c)(3) nonprofits onchain via Endaoment's smart contracts. |
| 4 | |
| 5 | ## Quick Start |
| 6 | |
| 7 | ### Find a Charity |
| 8 | |
| 9 | Search by name or EIN: |
| 10 | ```bash |
| 11 | ./scripts/search.sh "27-1661997" # EIN lookup (GiveDirectly) |
| 12 | ./scripts/search.sh "Red Cross" # Name search |
| 13 | ``` |
| 14 | |
| 15 | ### Donate USDC (Base) |
| 16 | |
| 17 | ```bash |
| 18 | ./scripts/donate.sh <ein> <amount_usdc> |
| 19 | ``` |
| 20 | |
| 21 | Example: Donate $5 USDC to GiveDirectly: |
| 22 | ```bash |
| 23 | ./scripts/donate.sh 27-1661997 5 |
| 24 | ``` |
| 25 | |
| 26 | ## How It Works |
| 27 | |
| 28 | The donate script uses Bankr's arbitrary transaction feature to: |
| 29 | 1. Approve USDC to the Endaoment OrgFundFactory |
| 30 | 2. Call `deployOrgAndDonate(orgId, amount)` which: |
| 31 | - Deploys the charity's entity contract on Base (if not already deployed) |
| 32 | - Donates the specified USDC amount |
| 33 | |
| 34 | ## Popular Charities |
| 35 | |
| 36 | | Charity | EIN | |
| 37 | |---------|-----| |
| 38 | | GiveDirectly | 27-1661997 | |
| 39 | | North Shore Animal League America | 11-1666852 | |
| 40 | | American Red Cross | 53-0196605 | |
| 41 | | Doctors Without Borders | 13-3433452 | |
| 42 | | ASPCA | 13-1623829 | |
| 43 | |
| 44 | See `references/popular-charities.md` for more. |
| 45 | |
| 46 | ## Contract Addresses (Base) |
| 47 | |
| 48 | | Contract | Address | |
| 49 | |----------|---------| |
| 50 | | Registry | `0x237b53bcfbd3a114b549dfec96a9856808f45c94` | |
| 51 | | OrgFundFactory | `0x10fd9348136dcea154f752fe0b6db45fc298a589` | |
| 52 | | USDC | `0x833589fcd6edb6e08f4c7c32d4f71b54bda02913` | |
| 53 | |
| 54 | ## Fees |
| 55 | |
| 56 | - **Org donations**: 1.5% fee (e.g., $100 → $1.50 fee, $98.50 to charity) |
| 57 | - **Fund donations**: 0.05-0.50% tiered |
| 58 | |
| 59 | ## Requirements |
| 60 | |
| 61 | - Bankr skill with API key configured |
| 62 | - USDC balance on Base |
| 63 | - ETH on Base for gas (Bankr covers this) |
| 64 | |
| 65 | ## Technical Details |
| 66 | |
| 67 | ### Function Selectors |
| 68 | - `approve(address,uint256)`: `0x095ea7b3` |
| 69 | - `deployOrgAndDonate(bytes32,uint256)`: `0xdb9e30cc` |
| 70 | |
| 71 | ### OrgId Encoding |
| 72 | The EIN (e.g., "11-1666852") is encoded as bytes32: |
| 73 | ``` |
| 74 | "11-1666852" → 0x31312d3136363638353200000000000000000000000000000000000000000000 |
| 75 | ``` |
| 76 | |
| 77 | ## Notes |
| 78 | |
| 79 | - All donations are tax-deductible (US 501(c)(3) orgs) |
| 80 | - Donations are permissionless — anyone can donate |
| 81 | - Uses Bankr arbitrary transactions for contract interaction |
| 82 | - Works on Base; other chains require different addresses |