eth_call

立即执行消息调用,而不在区块链上创建交易。即triggerConstantContract

参数

  1. Object - transaction对象, 包含的元素如下:
名称数据类型描述
fromDATA, 20 Bytes调用者地址。TRON hex地址格式并去掉前面的"41"
toDATA, 20 Bytes合约地址。hex地址格式并去掉前面的"41"
gasQUANTITY不支持,值为0x0
gasPriceQUANTITY不支持,值为 0x0
valueQUANTITY不支持,值为 0x0
dataDATA函数哈希值和编码的参数
  1. QUANTITY|TAG - 目前仅支持"latest"

返回值
DATA - 执行合约函数的返回结果

示例

curl -X POST '47.95.206.44:50545/jsonrpc' --data '{
    "jsonrpc": "2.0",
    "method": "eth_call",
    "params": [{
        "from": "0xF0CC5A2A84CD0F68ED1667070934542D673ACBD8",
        "to": "0x70082243784DCDF3042034E7B044D6D342A91360",
        "gas": "0x0",
        "gasPrice": "0x0",
        "value": "0x0",
        "data": "0x70a08231000000000000000000000041f0cc5a2a84cd0f68ed1667070934542d673acbd8"
    }, "latest"],
    "id": 1
}'

结果

{"jsonrpc":"2.0","id":1,"result":"0x"}