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

# EVM

> Integrate Donate.gg on EVM chains using the donation relay contract

Donate.gg uses a config-driven donation pipeline. You interact with our relay contract using metadata from [Donation configs](/partner-api/donation-configs): the `configId` returned by the API is the on-chain routing key.

For **Solana**, see [Solana (SVM)](/blockchain/solana-svm).

## How it works

<Steps>
  <Step title="Create a config via the API">
    Use the [Configs](/partner-api/donation-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.
  </Step>

  <Step title="Submit the EVM transaction">
    Call `donateNative`, `donateToken`, or `donateTokenWithPermit` on the relay contract for your
    chain, using the summaries below.
  </Step>
</Steps>

***

### 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

| Chain            | Chain ID | Address                                                                                                                 | Status |
| ---------------- | -------: | ----------------------------------------------------------------------------------------------------------------------- | ------ |
| Ethereum Mainnet |      `1` | [`0x02A0d2a39732082b824a5A3D3b026C54d581DCC8`](https://etherscan.io/address/0x02A0d2a39732082b824a5A3D3b026C54d581DCC8) | Live   |
| Base             |   `8453` | [`0x02A0d2a39732082b824a5A3D3b026C54d581DCC8`](https://basescan.org/address/0x02A0d2a39732082b824a5A3D3b026C54d581DCC8) | Live   |

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.

<Note>
  For settlement and off-chain processing, see [Donation Journey](/developer/donation-journey).
</Note>
