> For the complete documentation index, see [llms.txt](https://docs.vechain.org/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.vechain.org/core-concepts/evm-compatibility/test-coverage/chain_id.md).

# Chain id

## Description

In the VeChain EVM, the `block.chainid` opcode returns the 32-byte genesis block ID, which represents a significantly larger value than the typical `chainId` used in other EVM-compatible networks.

This difference will cause the `eip712Domain` hex values of the contract and the local computation in the EIP712 test cases to be different.

Therefore, we modified the test code. When calculating the `eip712Domain` locally, instead of directly using the value returned by the `eth_chainId` RPC interface, we used `eth_getBlockByNumber` to obtain the ID of the genesis block to ensure that the hex value of `eip712Domain` is the same.

## Contracts Affected

| Contract Name |
| ------------- |
| ERC712        |


---

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

```
GET https://docs.vechain.org/core-concepts/evm-compatibility/test-coverage/chain_id.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
