gpt4 book ai didi

nearprotocol - 无法通过 RPC 接近协议(protocol)事务状态

转载 作者:行者123 更新时间:2023-12-04 03:30:52 25 4
gpt4 key购买 nike

给定一笔交易https://explorer.near.org/transactions/JBb2DDe3i1CtBwESisLuhxXkWVZpCKYL4J1AdYwAQPsQ
当我查询 NEAR rpc 时:

http post https://rpc.mainnet.near.org jsonrpc=2.0 method=tx params:='["JBb2DDe3i1CtBwESisLuhxXkWVZpCKYL4J1AdYwAQPsQ","wasmgit.near"]' id=dontcare
然后我期望得到交易状态
相反,我得到以下响应:
{
"error": {
"code": -32000,
"data": "Transaction JBb2DDe3i1CtBwESisLuhxXkWVZpCKYL4J1AdYwAQPsQ doesn't exist",
"message": "Server error"
},
"id": "dontcare",
"jsonrpc": "2.0"
}

最佳答案

source: https://docs.near.org/docs/api/rpc#setup

Querying historical data (older than 5 epochs or ~2.5 days), you mayget responses that the data is not available anymore. In that case,archival RPC nodes will come to your rescue:

You can see this interface defined in nearcore here.


通过近 cli
near --nodeUrl https://archival-rpc.mainnet.near.org \
tx-status JBb2DDe3i1CtBwESisLuhxXkWVZpCKYL4J1AdYwAQPsQ \
--accountId wasmgit.near
通过http
http post https://archival-rpc.mainnet.near.org \
jsonrpc=2.0 method=tx \
params:='["JBb2DDe3i1CtBwESisLuhxXkWVZpCKYL4J1AdYwAQPsQ","wasmgit.near"]' \
id=dontcare

关于nearprotocol - 无法通过 RPC 接近协议(protocol)事务状态,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/66839103/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com