【问题标题】:Field "version" of a Transaction in ElrondElrond 中事务的字段“版本”
【发布时间】:2022-07-27 23:12:55
【问题描述】:

当您看到transaction in the Elrond blockchain 中使用的字段时,有一个称为“版本”,通常设置为“1”:

POST https://gateway.elrond.com/transaction/send HTTP/1.1
Content-Type: application/json
{
    "version": 1,
    "chainId": "v1.0.141",
    "nonce": 42,
    "value": "100000000000000000",
    "receiver": "erd1...",
    "sender": "erd1...",
    "gasPrice": 1000000000,
    "gasLimit": 70000,
    "data": "food for cats",
    "signature": "..."
}

什么意思?

谢谢!

【问题讨论】:

    标签: transactions blockchain elrond


    【解决方案1】:

    协议使用版本字段来了解如何处理给定的事务。理论上,该协议可以根据需要以不同的方式处理事务。

    在撰写本文时,可以处理交易的版本有 2 个,它们之间的差异会影响派生和检查 tx 签名的机制。

    基本上,如果未来需要不同的东西并且您仍想保持向后兼容性,这是一种轻松添加新机制的方法。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2013-04-17
      • 1970-01-01
      • 2019-09-11
      • 1970-01-01
      • 1970-01-01
      • 2021-09-16
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多