更新时间:2024-03-06 GMT+08:00
        
          
          
        
      
      
      
      
      
      
      
      
  
      
      
      
        
eth_getCode
简介
返回给定地址处智能合约的已编译字节代码(如果有)。该API所消耗的计算单元为120。
参数说明
| 参数 | 类型 | 说明 | 
|---|---|---|
| 地址 | String | 表示存储地址(20 字节)的字符串,从中获取编译后的字节码。 | 
| 区块编码 | String | 想要查询的区块的十六进制的编号,或者是字符串 "earliest"、"latest"、"pending"。 | 
返回值
给定地址处智能合约的已编译字节代码。
请求样式
curl https://your-http-endpoint/v1/<API-KEY> \
  -X POST \
  -H "Content-Type: application/json" \
  -d '{"jsonrpc":"2.0","method":"eth_getCode","params": ["0x06012c8cf97bead5deae237070f9587f8e7a266d", "0x65a8db"],"id":1}'
 
   父主题: 共享版
  
  
    