Donate.gg uses a config-driven donation pipeline. You interact with our relay contract using metadata from Donation configs: theDocumentation Index
Fetch the complete documentation index at: https://docs.donate.gg/llms.txt
Use this file to discover all available pages before exploring further.
configId returned by the API is the on-chain routing key.
For Solana, see Solana (SVM).
How it works
Create a config via the API
Use the Configs endpoint to create a config that defines your
charity beneficiaries and weights. You receive an
id object with hex and base58 fields.
Use id.hex as the on-chain configId (32-byte identifier) that routes donations to the
correct destinations.Overview
Developers interact with the relay contract to donate using either the native gas token or an ERC-20. Theid.hex from the API response is the on-chain configId that routes the donation.
Choosing a donation method
- Use
donateNativewhen donating the chain’s native token (for example ETH). - Use
donateTokenwhen donating an ERC-20. - Use
donateTokenWithPermitwhen the token supports permit, so approval and donation can happen in one transaction.
Arguments (summary)
All donation methods require:configId:id.hexfrom the API (bytes32).tipBps: tip in basis points (0–10000; 10000 = 100%).creditedTo: address credited for the donation (usuallymsg.sender).message: optional; respect the contract’s maximum message length.
token and amountIn. For native donations, send value as msg.value.
Contract deployments
| Chain | Chain ID | Address | Status |
|---|---|---|---|
| Ethereum Mainnet | 1 | 0x02A0d2a39732082b824a5A3D3b026C54d581DCC8 | Live |
| Base | 8453 | 0x02A0d2a39732082b824a5A3D3b026C54d581DCC8 | Live |
ABI, bytecode, and advanced EVM topics
This subsection is reserved for verified ABI links, client snippets (for example viem or ethers), andDonationMade log indexing examples as those assets are published.
What happens on-chain
When a donation is made, the contract records it against the current epoch for thatconfigId and token, and emits a DonationMade event so indexers can track donations for native and ERC-20 flows consistently.
For settlement and off-chain processing, see Donation Journey.