跳轉至

JSON-RPC

eth_sendRawTransaction

RPC的eth_sendRawTransaction 兼容原生的JSON-RPC方法,无需进行额外修改。如需修改交易披露、返利地址和revert保护等参数,可前往控制台配置专属RPC。

請求參數

參數必選格式示例備註
-bytes"0xd46e……445675"raw tx

請求示例

curl -X POST -H "Content-Type: application/json" --data '{
    "id": 1,
    "jsonrpc": "2.0",
    "method": "eth_sendRawTransaction",
    "params": [
        "0xd46e……445675"
    ]
}' https://bsc.blockrazor.xyz

返回示例

正常

{
  "id":1,
  "jsonrpc": "2.0",
  "result": "0xe670……527331"
}

異常

{
  "jsonrpc": "2.0",
  "id": 1,
  "error": {
    "code": -32000,
    "message": "rlp: element is larger than containing list"
  }
}

eth_sendBundle

RPC支持發送Bundle,詳見Bundle

JSON-RPC方法

RPC支持以太坊節點原生的JSON-RPC方法,可參考https://ethereum.org/zh/developers/docs/apis/json-rpc/#json-rpc-methods