> For the complete documentation index, see [llms.txt](https://dannychain.gitbook.io/danny/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://dannychain.gitbook.io/danny/token-and-contract/api.md).

# API

## Ethereum-Compatible API for Dannychain

The Dannychain EVM Gateway provides a fully Ethereum-compatible JSON-RPC interface, allowing seamless integration with existing Ethereum tools, libraries, and applications. This API enables developers to interact with Danny Chain using familiar Web3 tooling.

## Endpoints

| Nextwork | HTTP Endpoint                                   | Chain id                                  |
| -------- | ----------------------------------------------- | ----------------------------------------- |
| Mainnet  | [rpc.dannyscan.com](https://rpc.dannyscan.com/) | [5069](https://chainlist.wtf/chain/5069/) |

## 🌐Network Information

Returns the chain ID of the network.

\<eth\_chainId>

{% tabs %}
{% tab title="ETH" %}

```json
{
  "jsonrpc": "2.0",
  "method": "eth_chainId",
  "params": [],
  "id": 1
}
```

{% endtab %}

{% tab title="Danny" %}

```json
{
  "jsonrpc": "2.0",
  "method": "eth_chainId",
  "params": [],
  "id": 5069
}
```

{% endtab %}
{% endtabs %}

### Response

```json
{
  "jsonrpc": "2.0",
  "id": 1,
  "result": "0x13cd"  // 5069 in decimal for mainnet
}
```

## Transaction

<mark style="color:green;">`POST`</mark>  Get transaction

{% tabs %}
{% tab title="200" %}
{% code title="" overflow="wrap" expandable="true" %}

```json
{
  "items": [
    {
      "timestamp": "2022-08-02T07:18:05.000000Z",
      "fee": {
        "type": "maximum | actual",
        "value": "9853224000000000"
      },
      "gas_limit": 0,
      "block_number": 23484035,
      "status": "ok | error",
      "method": "transferFrom",
      "confirmations": 1035,
      "type": 2,
      "exchange_rate": "1866.51",
      "to": {
        "hash": "0xEb533ee5687044E622C69c58B1B12329F56eD9ad",
        "implementation_name": "implementationName",
        "name": "contractName",
        "ens_domain_name": "domain.eth",
        "metadata": {
          "slug": "tag_slug",
          "name": "Tag name",
          "tagType": "name",
          "ordinal": 0,
          "meta": {}
        },
        "is_contract": true,
        "private_tags": [
          {
            "address_hash": "0xEb533ee5687044E622C69c58B1B12329F56eD9ad",
            "display_name": "name to show",
            "label": "label"
          }
        ],
        "watchlist_names": [
          {
            "display_name": "name to show",
            "label": "label"
          }
        ],
        "public_tags": [
          {
            "address_hash": "0xEb533ee5687044E622C69c58B1B12329F56eD9ad",
            "display_name": "name to show",
            "label": "label"
          }
        ],
        "is_verified": true,
        "reputation": "ok"
      },
      "transaction_burnt_fee": "1099596081903840",
      "max_fee_per_gas": "55357460102",
      "result": "Error: (Awaiting internal transactions for reason)",
      "hash": "0x5d90a9da2b8da402b11bc92c8011ec8a62a2d59da5c7ac4ae0f73ec51bb73368",
      "gas_price": "26668595172",
      "priority_fee": "2056916056308",
      "base_fee_per_gas": "26618801760",
      "from": {
        "hash": "0xEb533ee5687044E622C69c58B1B12329F56eD9ad",
        "implementation_name": "implementationName",
        "name": "contractName",
        "ens_domain_name": "domain.eth",
        "metadata": {
          "slug": "tag_slug",
          "name": "Tag name",
          "tagType": "name",
          "ordinal": 0,
          "meta": {}
        },
        "is_contract": true,
        "private_tags": [
          {
            "address_hash": "0xEb533ee5687044E622C69c58B1B12329F56eD9ad",
            "display_name": "name to show",
            "label": "label"
          }
        ],
        "watchlist_names": [
          {
            "display_name": "name to show",
            "label": "label"
          }
        ],
        "public_tags": [
          {
            "address_hash": "0xEb533ee5687044E622C69c58B1B12329F56eD9ad",
            "display_name": "name to show",
            "label": "label"
          }
        ],
        "is_verified": true,
        "reputation": "ok"
      },
      "token_transfers": [
        {
          "token_type": "ERC-20",
          "block_hash": "0xf569ec751152b2f814001fc730f7797aa155e4bc3ba9cb6ba24bc2c8c9468c1a",
          "from": {
            "hash": "0xEb533ee5687044E622C69c58B1B12329F56eD9ad",
            "implementation_name": "implementationName",
            "name": "contractName",
            "ens_domain_name": "domain.eth",
            "metadata": {
              "slug": "tag_slug",
              "name": "Tag name",
              "tagType": "name",
              "ordinal": 0,
              "meta": {}
            },
            "is_contract": true,
            "private_tags": [
              {
                "address_hash": "0xEb533ee5687044E622C69c58B1B12329F56eD9ad",
                "display_name": "name to show",
                "label": "label"
              }
            ],
            "watchlist_names": [
              {
                "display_name": "name to show",
                "label": "label"
              }
            ],
            "public_tags": [
              {
                "address_hash": "0xEb533ee5687044E622C69c58B1B12329F56eD9ad",
                "display_name": "name to show",
                "label": "label"
              }
            ],
            "is_verified": true,
            "reputation": "ok"
          },
          "log_index": 16,
          "method": "transfer",
          "timestamp": "2023-07-03T20:09:59.000000Z",
          "to": {
            "hash": "0xEb533ee5687044E622C69c58B1B12329F56eD9ad",
            "implementation_name": "implementationName",
            "name": "contractName",
            "ens_domain_name": "domain.eth",
            "metadata": {
              "slug": "tag_slug",
              "name": "Tag name",
              "tagType": "name",
              "ordinal": 0,
              "meta": {}
            },
            "is_contract": true,
            "private_tags": [
              {
                "address_hash": "0xEb533ee5687044E622C69c58B1B12329F56eD9ad",
                "display_name": "name to show",
                "label": "label"
              }
            ],
            "watchlist_names": [
              {
                "display_name": "name to show",
                "label": "label"
              }
            ],
            "public_tags": [
              {
                "address_hash": "0xEb533ee5687044E622C69c58B1B12329F56eD9ad",
                "display_name": "name to show",
                "label": "label"
              }
            ],
            "is_verified": true,
            "reputation": "ok"
          },
          "token": {
            "circulating_market_cap": "83606435600.3635",
            "icon_url": "https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/ethereum/assets/0xdAC17F958D2ee523a2206206994597C13D831ec7/logo.png",
            "name": "Tether USD",
            "decimals": "6",
            "symbol": "USDT",
            "address_hash": "0x394c399dbA25B99Ab7708EdB505d755B3aa29997",
            "type": "ERC-20",
            "holders_count": "837494234523",
            "exchange_rate": "0.99",
            "total_supply": "10000000",
            "reputation": "ok"
          },
          "total": {
            "decimals": "18",
            "value": "1000"
          },
          "transaction_hash": "0x6662ad1ad2ea899e9e27832dc202fd2ef915a5d2816c1142e6933cff93f7c592",
          "type": "token_transfer"
        }
      ],
      "transaction_types": [
        "token_transfer",
        "contract_creation",
        "contract_call",
        "token_creation",
        "coin_transfer"
      ],
      "gas_used": "41309",
      "created_contract": {
        "hash": "0xEb533ee5687044E622C69c58B1B12329F56eD9ad",
        "implementation_name": "implementationName",
        "name": "contractName",
        "ens_domain_name": "domain.eth",
        "metadata": {
          "slug": "tag_slug",
          "name": "Tag name",
          "tagType": "name",
          "ordinal": 0,
          "meta": {}
        },
        "is_contract": true,
        "private_tags": [
          {
            "address_hash": "0xEb533ee5687044E622C69c58B1B12329F56eD9ad",
            "display_name": "name to show",
            "label": "label"
          }
        ],
        "watchlist_names": [
          {
            "display_name": "name to show",
            "label": "label"
          }
        ],
        "public_tags": [
          {
            "address_hash": "0xEb533ee5687044E622C69c58B1B12329F56eD9ad",
            "display_name": "name to show",
            "label": "label"
          }
        ],
        "is_verified": true,
        "reputation": "ok"
      },
      "position": 117,
      "nonce": 115,
      "has_error_in_internal_transactions": false,
      "actions": [
        {
          "data": {
            "debt_amount": "1.289548595490270429",
            "debt_symbol": "AAVE",
            "debt_address": "0x7Fc66500c84A76Ad7e9c93437bFc5Ac33E2DDaE9",
            "collateral_amount": "110.824768",
            "collateral_symbol": "USDC",
            "collateral_address": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
            "block_number": 1
          },
          "protocol": "aave_v3",
          "type": "liquidation_call"
        },
        {
          "data": {
            "amount": "1.289548595490270429",
            "symbol": "AAVE",
            "address": "0x7Fc66500c84A76Ad7e9c93437bFc5Ac33E2DDaE9",
            "block_number": 1
          },
          "protocol": "aave_v3",
          "type": "borrow | supply | withdraw | repay | flash_loan"
        },
        {
          "data": {
            "symbol": "AAVE",
            "address": "0x7Fc66500c84A76Ad7e9c93437bFc5Ac33E2DDaE9",
            "block_number": 1
          },
          "protocol": "aave_v3",
          "type": "enable_collateral | disable_collateral"
        },
        {
          "data": {
            "name": "Uniswap V3: Positions NFT",
            "symbol": "UNI-V3-POS",
            "address": "0x1F98431c8aD98523631AE4a59f267346ea31F984",
            "to": "0x7Fc66500c84A76Ad7e9c93437bFc5Ac33E2DDaE9",
            "ids": [
              "1",
              "2"
            ],
            "block_number": 1
          },
          "protocol": "uniswap_v3",
          "type": "mint_nft"
        },
        {
          "data": {
            "address0": "0x7Fc66500c84A76Ad7e9c93437bFc5Ac33E2DDaE9",
            "address1": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
            "amount0": "1.289548595490270429",
            "amount1": "110.824768",
            "symbol0": "AAVE",
            "symbol1": "USDC"
          },
          "protocol": "uniswap_v3",
          "type": "burn | collect | swap"
        }
      ],
      "decoded_input": {
        "method_call": "transferFrom(address _from, address _to, uint256 _value)",
        "method_id": "23b872dd",
        "parameters": [
          {
            "name": "signature",
            "type": "bytes",
            "value": "0x0"
          }
        ]
      },
      "token_transfers_overflow": false,
      "raw_input": "0xa9059cbb000000000000000000000000ef8801eaf234ff82801821ffe2d78d60a0237f97000000000000000000000000000000000000000000000000000000003178cb80",
      "value": "0",
      "max_priority_fee_per_gas": "49793412",
      "revert_reason": "Error: (Awaiting internal transactions for reason)",
      "confirmation_duration": [
        0,
        17479
      ],
      "transaction_tag": "private_transaction_tag",
      "is_pending_update": false
    }
  ],
  "next_page_params": {
    "block_number": 27170298,
    "index": 0,
    "items_count": 50
  }
}
```

{% endcode %}
{% endtab %}
{% endtabs %}

## Blocks

<mark style="color:green;">`POST`</mark>  Get Blocks

{% tabs %}
{% tab title="200" %}
{% code title="" overflow="wrap" expandable="true" %}

```json
{
  "items": [
    {
      "base_fee_per_gas": "26618801760",
      "burnt_fees": "261263193229977120",
      "burnt_fees_percentage": 85.19028810863084,
      "difficulty": "0",
      "extra_data": "TODO",
      "gas_limit": "30000000",
      "gas_target_percentage": -34.56675333333333,
      "gas_used": "9814987",
      "gas_used_percentage": 32.71662333333333,
      "hash": "0xf569ec751152b2f814001fc730f7797aa155e4bc3ba9cb6ba24bc2c8c9468c1a",
      "height": 17615720,
      "miner": {
        "hash": "0xEb533ee5687044E622C69c58B1B12329F56eD9ad",
        "implementation_name": "implementationName",
        "name": "contractName",
        "ens_domain_name": "domain.eth",
        "metadata": {
          "slug": "tag_slug",
          "name": "Tag name",
          "tagType": "name",
          "ordinal": 0,
          "meta": {}
        },
        "is_contract": true,
        "private_tags": [
          {
            "address_hash": "0xEb533ee5687044E622C69c58B1B12329F56eD9ad",
            "display_name": "name to show",
            "label": "label"
          }
        ],
        "watchlist_names": [
          {
            "display_name": "name to show",
            "label": "label"
          }
        ],
        "public_tags": [
          {
            "address_hash": "0xEb533ee5687044E622C69c58B1B12329F56eD9ad",
            "display_name": "name to show",
            "label": "label"
          }
        ],
        "is_verified": true,
        "reputation": "ok"
      },
      "nonce": "0x0000000000000000",
      "parent_hash": "0xd464e02d81e2bdf6bc5fa9b8e33f0b564c464a82d821a3e56531f8636dc00dfa",
      "priority_fee": "45418705646601378",
      "rewards": [
        {
          "reward": 0,
          "type": "Miner Reward | Emission Reward | Chore Reward | Uncle Reward"
        }
      ],
      "size": 49997,
      "state_root": "TODO",
      "timestamp": "2023-07-03T20:09:59.000000Z",
      "total_difficulty": "58750003716598352816469",
      "transactions_count": 120,
      "transaction_fees": "306681898876578498",
      "type": "block",
      "uncles_hashes": [
        "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347"
      ],
      "withdrawals_count": 16,
      "is_pending_update": false
    }
  ],
  "next_page_params": {
    "block_number": 27729304,
    "items_count": 50
  }
}
```

{% endcode %}
{% endtab %}
{% endtabs %}

## Token transfers

<mark style="color:green;">`POST`</mark>  Get Token transfer

{% tabs %}
{% tab title="200" %}
{% code title="" overflow="wrap" expandable="true" %}

```json
{
  "items": [
    {
      "token_type": "ERC-20",
      "block_hash": "0xf569ec751152b2f814001fc730f7797aa155e4bc3ba9cb6ba24bc2c8c9468c1a",
      "from": {
        "hash": "0xEb533ee5687044E622C69c58B1B12329F56eD9ad",
        "implementation_name": "implementationName",
        "name": "contractName",
        "ens_domain_name": "domain.eth",
        "metadata": {
          "slug": "tag_slug",
          "name": "Tag name",
          "tagType": "name",
          "ordinal": 0,
          "meta": {}
        },
        "is_contract": true,
        "private_tags": [
          {
            "address_hash": "0xEb533ee5687044E622C69c58B1B12329F56eD9ad",
            "display_name": "name to show",
            "label": "label"
          }
        ],
        "watchlist_names": [
          {
            "display_name": "name to show",
            "label": "label"
          }
        ],
        "public_tags": [
          {
            "address_hash": "0xEb533ee5687044E622C69c58B1B12329F56eD9ad",
            "display_name": "name to show",
            "label": "label"
          }
        ],
        "is_verified": true,
        "reputation": "ok"
      },
      "log_index": 16,
      "method": "transfer",
      "timestamp": "2023-07-03T20:09:59.000000Z",
      "to": {
        "hash": "0xEb533ee5687044E622C69c58B1B12329F56eD9ad",
        "implementation_name": "implementationName",
        "name": "contractName",
        "ens_domain_name": "domain.eth",
        "metadata": {
          "slug": "tag_slug",
          "name": "Tag name",
          "tagType": "name",
          "ordinal": 0,
          "meta": {}
        },
        "is_contract": true,
        "private_tags": [
          {
            "address_hash": "0xEb533ee5687044E622C69c58B1B12329F56eD9ad",
            "display_name": "name to show",
            "label": "label"
          }
        ],
        "watchlist_names": [
          {
            "display_name": "name to show",
            "label": "label"
          }
        ],
        "public_tags": [
          {
            "address_hash": "0xEb533ee5687044E622C69c58B1B12329F56eD9ad",
            "display_name": "name to show",
            "label": "label"
          }
        ],
        "is_verified": true,
        "reputation": "ok"
      },
      "token": {
        "circulating_market_cap": "83606435600.3635",
        "icon_url": "https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/ethereum/assets/0xdAC17F958D2ee523a2206206994597C13D831ec7/logo.png",
        "name": "Tether USD",
        "decimals": "6",
        "symbol": "USDT",
        "address_hash": "0x394c399dbA25B99Ab7708EdB505d755B3aa29997",
        "type": "ERC-20",
        "holders_count": "837494234523",
        "exchange_rate": "0.99",
        "total_supply": "10000000",
        "reputation": "ok"
      },
      "total": {
        "decimals": "18",
        "value": "1000"
      },
      "transaction_hash": "0x6662ad1ad2ea899e9e27832dc202fd2ef915a5d2816c1142e6933cff93f7c592",
      "type": "token_transfer"
    }
  ],
  "next_page_params": {
    "block_number": 27170298,
    "index": 0
  }
}
```

{% endcode %}
{% endtab %}
{% endtabs %}

## Internal transactions

<mark style="color:green;">`POST`</mark> Get internal transactions

{% tabs %}
{% tab title="200" %}
{% code title="" overflow="wrap" expandable="true" %}

```json
{
  "items": [
    {
      "block_number": 8844586,
      "created_contract": {
        "hash": "0xEb533ee5687044E622C69c58B1B12329F56eD9ad",
        "implementation_name": "implementationName",
        "name": "contractName",
        "ens_domain_name": "domain.eth",
        "metadata": {
          "slug": "tag_slug",
          "name": "Tag name",
          "tagType": "name",
          "ordinal": 0,
          "meta": {}
        },
        "is_contract": true,
        "private_tags": [
          {
            "address_hash": "0xEb533ee5687044E622C69c58B1B12329F56eD9ad",
            "display_name": "name to show",
            "label": "label"
          }
        ],
        "watchlist_names": [
          {
            "display_name": "name to show",
            "label": "label"
          }
        ],
        "public_tags": [
          {
            "address_hash": "0xEb533ee5687044E622C69c58B1B12329F56eD9ad",
            "display_name": "name to show",
            "label": "label"
          }
        ],
        "is_verified": true,
        "reputation": "ok"
      },
      "error": "reverted",
      "from": {
        "hash": "0xEb533ee5687044E622C69c58B1B12329F56eD9ad",
        "implementation_name": "implementationName",
        "name": "contractName",
        "ens_domain_name": "domain.eth",
        "metadata": {
          "slug": "tag_slug",
          "name": "Tag name",
          "tagType": "name",
          "ordinal": 0,
          "meta": {}
        },
        "is_contract": true,
        "private_tags": [
          {
            "address_hash": "0xEb533ee5687044E622C69c58B1B12329F56eD9ad",
            "display_name": "name to show",
            "label": "label"
          }
        ],
        "watchlist_names": [
          {
            "display_name": "name to show",
            "label": "label"
          }
        ],
        "public_tags": [
          {
            "address_hash": "0xEb533ee5687044E622C69c58B1B12329F56eD9ad",
            "display_name": "name to show",
            "label": "label"
          }
        ],
        "is_verified": true,
        "reputation": "ok"
      },
      "gas_limit": "351759",
      "index": 1,
      "success": true,
      "timestamp": "2023-04-17T10:37:12.000000Z",
      "to": {
        "hash": "0xEb533ee5687044E622C69c58B1B12329F56eD9ad",
        "implementation_name": "implementationName",
        "name": "contractName",
        "ens_domain_name": "domain.eth",
        "metadata": {
          "slug": "tag_slug",
          "name": "Tag name",
          "tagType": "name",
          "ordinal": 0,
          "meta": {}
        },
        "is_contract": true,
        "private_tags": [
          {
            "address_hash": "0xEb533ee5687044E622C69c58B1B12329F56eD9ad",
            "display_name": "name to show",
            "label": "label"
          }
        ],
        "watchlist_names": [
          {
            "display_name": "name to show",
            "label": "label"
          }
        ],
        "public_tags": [
          {
            "address_hash": "0xEb533ee5687044E622C69c58B1B12329F56eD9ad",
            "display_name": "name to show",
            "label": "label"
          }
        ],
        "is_verified": true,
        "reputation": "ok"
      },
      "transaction_hash": "0x08ea4d75ad0abe327a7fd368733eaeac43077989e635d800530d7906ebf3bd54",
      "type": "call",
      "value": "30000000000000000"
    }
  ],
  "next_page_params": {
    "block_number": 27170298,
    "index": 0,
    "transaction_index": 0
  }
}
```

{% endcode %}
{% endtab %}
{% endtabs %}

## Block number or hash

<mark style="color:green;">`POST`</mark> Get Block number or hash

{% tabs %}
{% tab title="200" %}
{% code title="" overflow="wrap" expandable="true" %}

```json
{
  "base_fee_per_gas": "26618801760",
  "burnt_fees": "261263193229977120",
  "burnt_fees_percentage": 85.19028810863084,
  "difficulty": "0",
  "extra_data": "TODO",
  "gas_limit": "30000000",
  "gas_target_percentage": -34.56675333333333,
  "gas_used": "9814987",
  "gas_used_percentage": 32.71662333333333,
  "hash": "0xf569ec751152b2f814001fc730f7797aa155e4bc3ba9cb6ba24bc2c8c9468c1a",
  "height": 17615720,
  "miner": {
    "hash": "0xEb533ee5687044E622C69c58B1B12329F56eD9ad",
    "implementation_name": "implementationName",
    "name": "contractName",
    "ens_domain_name": "domain.eth",
    "metadata": {
      "slug": "tag_slug",
      "name": "Tag name",
      "tagType": "name",
      "ordinal": 0,
      "meta": {}
    },
    "is_contract": true,
    "private_tags": [
      {
        "address_hash": "0xEb533ee5687044E622C69c58B1B12329F56eD9ad",
        "display_name": "name to show",
        "label": "label"
      }
    ],
    "watchlist_names": [
      {
        "display_name": "name to show",
        "label": "label"
      }
    ],
    "public_tags": [
      {
        "address_hash": "0xEb533ee5687044E622C69c58B1B12329F56eD9ad",
        "display_name": "name to show",
        "label": "label"
      }
    ],
    "is_verified": true,
    "reputation": "ok"
  },
  "nonce": "0x0000000000000000",
  "parent_hash": "0xd464e02d81e2bdf6bc5fa9b8e33f0b564c464a82d821a3e56531f8636dc00dfa",
  "priority_fee": "45418705646601378",
  "rewards": [
    {
      "reward": 0,
      "type": "Miner Reward | Emission Reward | Chore Reward | Uncle Reward"
    }
  ],
  "size": 49997,
  "state_root": "TODO",
  "timestamp": "2023-07-03T20:09:59.000000Z",
  "total_difficulty": "58750003716598352816469",
  "transactions_count": 120,
  "transaction_fees": "306681898876578498",
  "type": "block",
  "uncles_hashes": [
    "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347"
  ],
  "withdrawals_count": 16,
  "is_pending_update": false
}
```

{% endcode %}
{% endtab %}
{% endtabs %}

## Full Run API on Dannychain

{% embed url="<https://dannyscan.com/api-docs>" %}

## GraphQL&#x20;

{% tabs %}
{% tab title="Source" %}
{% code title="" overflow="wrap" expandable="true" %}

```json
{
    transaction(
      hash: "undefined"
    ) {
      hash
      blockNumber
      value
      gasUsed
    }
  }
```

{% endcode %}
{% endtab %}

{% tab title="Play" %}
{% code title="" overflow="wrap" expandable="true" %}

```json
{
  "errors": [
    {
      "message": "Field __schema is too complex: complexity is 220 and maximum is 215",
      "locations": [
        {
          "line": 3,
          "column": 7
        }
      ]
    },
    {
      "message": "Operation IntrospectionQuery is too complex: complexity is 220 and maximum is 215",
      "locations": [
        {
          "line": 2,
          "column": 5
        }
      ]
    }
  ]
}
```

{% endcode %}
{% endtab %}
{% endtabs %}

{% embed url="<https://dannyscan.com/graphiql>" %}

## Smart Contract Methods

eth\_call

Executes a call without creating a transaction.

{% tabs %}
{% tab title="200" %}
{% code title="" overflow="wrap" expandable="true" %}

```json
{
  "jsonrpc": "2.0",
  "method": "eth_call",
  "params": [
    {
      "to": "0x...",
      "data": "0x..."
    },
    "latest"
  ],
  "id": 1
}
```

{% endcode %}
{% endtab %}
{% endtabs %}

## Subscription Types

| Type                | Description                |
| ------------------- | -------------------------- |
| newHeads            | New block headers          |
| logs                | Smart contract events      |
| pendingTransactions | Pending transaction hashes |
| syncing             | Sync status updates        |

## MetaMask Configuration

{% tabs %}
{% tab title="200" %}
{% code title="" overflow="wrap" expandable="true" %}

```json
await window.ethereum.request({
  method: 'wallet_addEthereumChain',
  params: [{
    chainId: '0x13cd',
    chainName: 'Danny',
    nativeCurrency: {
      name: 'DAN',
      symbol: 'DAN',
      decimals: 18
    },
    rpcUrls: ['https://rpc.dannyscan.com'],
    blockExplorerUrls: ['https://dannyscan.com']
  }]
});
```

{% endcode %}
{% endtab %}
{% endtabs %}

#### ☎️Need Help? <a href="#need-help" id="need-help"></a>

Reach out to us for support, suggest improvements, or file a ticket using the [**Support**](mailto:admin@dannychain.com) on Telegram. Our team is here to assist you!

* [**Telegram**](https://t.me/dannytoken): Join our developer community
* [**Twitter**](https://x.com/Dan74668): information Danny Chain


---

# 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://dannychain.gitbook.io/danny/token-and-contract/api.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.
