> For the complete documentation index, see [llms.txt](https://devs.defikingdoms.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://devs.defikingdoms.com/contracts/miscellaneous/charity.md).

# Charity

{% hint style="info" %}
The Charity contracts are only available in-game during specific Charity Drive events.&#x20;
{% endhint %}

## Contracts

### Addresses

#### DFK Chain

| Name         | Mainnet                                      | Testnet                                      |
| ------------ | -------------------------------------------- | -------------------------------------------- |
| Charity Fund | `0xABABB0A2c42274D0e81417B824CABca464F5c16C` | `0xEE7d3642687ab561E2eea37bB936DDbB1565A037` |

### Interfaces

```solidity
interface ICharityFund {

    event Donation(address indexed account, address indexed token, uint256 amount);
    event Withdrawal(address indexed token, uint256 amount);
    
    function accepted(address) view returns (bool);
    function campaignId() view returns (uint8);
    function donateNativeToken() payable;
    function donateToken(address _token, uint256 _wei);
    function donationTotals(address) view returns (uint256);
    function getInfo() view returns (tuple(bool accepted, address token, string name, string symbol, uint256 decimals, uint256 total, uint256 balance, uint256 userDonation)[]);
    function multisig() view returns (address);
    function owner() view returns (address);
    function tokens(uint256) view returns (address);
    function withdraw(address _token);
    function withdrawAll();
    function withdrawNative();

}
```

### ABIs

{% file src="/files/27lzcJV0f8OIs0NVJLTb" %}

## Historical Contracts

{% hint style="danger" %}
These contracts have been deprecated and should not be used. They are listed here for data analysis and tracking purposes only.
{% endhint %}

#### Harmony

| Name         | Mainnet                                      | Testnet                                      |
| ------------ | -------------------------------------------- | -------------------------------------------- |
| Charity Fund | `0x51477E2E1481BcAE1a17DdbA777931d55c980Ecf` | `0x5238310E4115e85522A60d9e3B39D88bEA89FBA4` |


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://devs.defikingdoms.com/contracts/miscellaneous/charity.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
