---
title: eth_chainId
description: 获取BUZZUP当前的chainId
---
---
### 参数
- 该方法不接受任何参数
---
### 返回值
-
ChainIdhex encoded bytes
---
### Request
```js
async function getAccounts() {
const chainId = await window.ethereum.request({ method: 'eth_chainId' });
console.log(chainId);
}
```