Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.donate.gg/llms.txt

Use this file to discover all available pages before exploring further.

Donate.gg uses a config-driven donation pipeline. You interact with our relay contract using metadata from Donation configs: the configId returned by the API is the on-chain routing key. For Solana, see Solana (SVM).

How it works

1

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.
2

Submit the EVM transaction

Call donateNative, donateToken, or donateTokenWithPermit on the relay contract for your chain, using the summaries below.

Overview

Developers interact with the relay contract to donate using either the native gas token or an ERC-20. The id.hex from the API response is the on-chain configId that routes the donation.

Choosing a donation method

  • Use donateNative when donating the chain’s native token (for example ETH).
  • Use donateToken when donating an ERC-20.
  • Use donateTokenWithPermit when the token supports permit, so approval and donation can happen in one transaction.

Arguments (summary)

All donation methods require:
  • configId: id.hex from the API (bytes32).
  • tipBps: tip in basis points (0–10000; 10000 = 100%).
  • creditedTo: address credited for the donation (usually msg.sender).
  • message: optional; respect the contract’s maximum message length.
For ERC-20 flows, also supply token and amountIn. For native donations, send value as msg.value.

Contract deployments

ChainChain IDAddressStatus
Ethereum Mainnet10x02A0d2a39732082b824a5A3D3b026C54d581DCC8Live
Base84530x02A0d2a39732082b824a5A3D3b026C54d581DCC8Live
Additional EVM chain support coming soon.

ABI, bytecode, and advanced EVM topics

This subsection is reserved for verified ABI links, client snippets (for example viem or ethers), and DonationMade 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 that configId 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.