以太坊兼容接口
eth_gasPrice在线调用
POST
eth_gasPrice
(eth_gasPrice)
返回值
Result: VoidChain链需要的属性值
gasPrice 在VoidChain没有意义,无需竞价,该接口被VoidChain重新定义,支撑无限元空间的访问
对于0号元空间,普通交易刚好返回0x0 跟以太坊接口无缝兼容
对于其他元空间,gasPrice 直接自主组装就可以。
gasPrice VoidChain属性定义
-------------------
¦ 4bytes(uint) ¦ 4bytes(uint) ¦ 4bytes(uint) ¦
¦ sliceno ¦ subtype ¦maintype ¦
Sliceno 元空间号
subtype: 交易子类型
maintype: 交易主类型
示例代码
{
"jsonrpc": "2.0",
"method": "eth_gasPrice",
"params": [],
"id": "1"
}{
"jsonrpc": "2.0",
"id": 1,
"result": "0x0"
}