Skip to main content

EVM兼容性 (EVM compatibility)

The following tables present the full list of JSON-RPC methods. Each of them is in one of the states:

下表显示了 JSON-RPC 方法的完整列表。他们每项都处于以下状态之一:

已完成 (done)— 已完成 (done)in progress— 开发中(in progress)todo— 计划中(to do)
编号 Num方法 Method描述 Description状态 Status
1eth_getBlockByHash按哈希返回有关区块的信息 (Returns information about a block by hash)done
2eth_getBlockByNumber 按编号返回有关区块的信息 (Returns information about a block by number)done
3eth_getBlockTransactionCountByHash从给定哈希匹配的区块中返回块中的交易数 (Returns the number of transactions in a block from a block matching the given block hash)done
4eth_getBlockTransactionCountByNumber从给定区块编号匹配的区块中返回块的交易数 (Returns the number of transactions in a block matching the given block number)done
5eth_getUncleCountByBlockHash从给定哈希匹配的区块中返回块中的叔块数 (Returns the number of uncles in a block from a block matching the given block hash)todo
6eth_getUncleCountByBlockNumber 从给定区块编号匹配的块中返回块中的叔块数(Returns the number of uncles in a block from a block matching the given block number)todo
7eth_protocolVersion返回当前以太坊协议的版本 (Returns the current Ethereum protocol version)todo
8eth_chainId返回当前网络的链 ID (Returns the chain ID of the current network)done
9eth_syncing返回一个对象,其中包含同步状态信息 (Returns an object with data about the sync status or false)done
10eth_coinbase返回客户端 coinbase 地址 (Returns the client coinbase address)todo
11eth_accounts返回客户端拥有的地址列表 (Returns a list of addresses owned by client)done
12eth_blockNumber返回最新块的编号 (Returns the number of most recent block.)done
13eth_call立即执行新的消息调用,无需在区块链上创建交易 (Executes a new message call immediately without creating a transaction on the block chain)done
14eth_estimateGas生成并返回允许交易完成所需gas的估计值 (Generates and returns an estimate of how much gas is necessary to allow the transaction to complete.)done
15eth_gasPrice返回以 wei 为单位的每个 gas 的当前价格 (Returns the current price per gas in wei)done
16eth_feeHistory返回费用历史 (Returns fee history)todo
17eth_newFilter根据过滤器选项,创建一个过滤器对象,并在状态更改时通知(日志) Creates a filter object, based on filter options, to notify when the state changes (logs)todo
18eth_newBlockFilter在节点中创建一个过滤器,以便在新块到达时通知 (Creates a filter in the node, to notify when a new block arrives)todo
19eth_newPendingTransactionFilter 在节点中创建一个过滤器,在新的待处理交易到达时通知 (Creates a filter in the node, to notify when new pending transactions arrive)in progress
20eth_uninstallFilter卸载给定id的过滤器 (Uninstalls a filter with given id)in progress
21eth_getFilterChanges过滤器的轮询方法,它返回自上次轮询以来发生的日志数组 (Polling method for a filter, which returns an array of logs which occurred since last poll)todo
22eth_getFilterLogs 返回具有给定 id 所有与过滤器匹配的日志的数组。可以使用 eth_getLogs 计算相同的结果 (Returns an array of all logs matching filter with given id. Can compute the same results with an eth_getLogs call)todo
23eth_getLogs每当交易被"挖出"时,我们可以通过向 eth_getLogs 发出请求来查看该交易的事件日志,然后根据这些结果采取行动 (Anytime a transaction is mined, we can see event logs for that transaction by making a request to eth_getLogs and then take actions based off those results)done
24eth_mining返回客户端是否正在积极挖掘新块 (Returns whether the client is actively mining new blocks)done
25eth_hashrate返回节点每秒正在挖掘的哈希数量 (Returns the number of hashes per second that the node is mining with)done
26eth_getWork返回当前区块的哈希值、种子哈希值和要满足的边界条件("目标") Returns the hash of the current block, the seedHash, and the boundary condition to be met ("target")done
27eth_submitWork用来提交POW解决方案 (Used for submitting a proof-of-work solution)todo
28eth_submitHashrate用来提交挖矿的哈希率 (Used for submitting mining hashrate)todo
29eth_sign在提供的数据下返回一个EIP-191签名 (Returns an EIP-191 signature over the provided data.)done
30eth_signTransaction签名并提交一笔交易 (Signs and submits a transaction)done
31eth_getBalance返回一个地址某个账户的余额 (Returns the balance of the account of given address)done
32eth_getStorageAt返回一个地址“存储”仓位的代币价值 (Returns the value from a storage position at a given address)done
33eth_getTransactionCount返回一个地址发出的交易数量 (Returns the number of transactions sent from an address)done
34eth_getCode返回给定地址的代码 (Returns code at a given address)done
35eth_sendTransaction签名并提交一笔交易 (Signs and submits a transaction)done
36eth_sendRawTransaction提交原始交易 (Submits a raw transaction)done
37eth_getTransactionByHash按交易哈希返回交易信息 Returns the information about a transaction requested by transaction hashdone
38eth_getTransactionByBlockHashAndIndex按区块哈希和交易索引位置返回有关交易信息 (Returns information about a transaction by block hash and transaction index position)done
39eth_getTransactionByBlockNumberAndIndex按区块号和交易索引位置返回有关交易信息 (Returns information about a transaction by block number and transaction index position)done
40eth_getTransactionReceipt通过交易哈希返回交易的回执 (Returns the receipt of a transaction by transaction hash)done

基于 Web3 模块 API 的JSON-RPC 方法 (JSON-RPC Methods According to the Web3 Module API)

编号 Num方法 Method描述 Description状态 Status
1web3_clientVersion返回当前客户端状态 (Returns the current client version)done
2web3_sha返回给定数据的 Keccak-256(不是标准化的 SHA3-256) Returns Keccak-256 (not the standardized SHA3-256) of the given datadone

基于 Net 模块 API 的JSON-RPC 方法 (JSON-RPC Methods According to the Net Module API)

编号 Num方法 Method描述 Description状态 Status
1net_listening如果客户端正在主动监听网络连接,则返回 true (Returns true if client is actively listening for network connections)done
2net_peerCount返回当前连接到客户端的对等节点数 (Returns number of peers currenly connected to the client)done
3net_version返回当前网络协议版本 (Returns the current network protocol version).done