2

我收到这个错误。无论我给它多少气体,它似乎都会发生。有人可以帮助或建议我做错了什么吗?谢谢

Scheduling a call: museum.testnet.add_meme({"meme" : "andrew", "title" : "sweats", "data" : "https://9gag.com/gag/aVxM0B2", "category" : 4}) with attached 6 NEAR
Doing account.functionCall()
Receipts: BuNWjPmKBojGbjUs86EEpX1xrvC6AG5GacxX5xmTzSkk, 5PAK416Wn1F5AzHHz28fNa2dbHzWHFzKg2UoKCStfZ3U
    Log [museum.testnet]: attempting to create meme
    Failure [museum.testnet]: Error: {"index":0,"kind":{"ExecutionError":"Exceeded the prepaid gas."}}

Transaction 87djyBrCwgubEfsta68xPeRTy6VKShXMWEroSkvjDSY3 had 30000000000000 of attached gas but used 2428128941862 of gas
View this transaction in explorer: https://explorer.testnet.near.org/transactions/87djyBrCwgubEfsta68xPeRTy6VKShXMWEroSkvjDSY3```
4

2 回答 2

2

为了正确执行此操作,您需要同时具有 the--amount 3--gas 300000000000000参数。

        near call museum.testnet add_meme '{ "meme": "coe", \ 
        "title": "roncoe", "data": "https://9gag.com/gag/ad8K0vj", \         
        "category": 4 }' --accountId youraccountid.testnet \
        --gas 300000000000000 --amount 3
于 2022-01-17T08:57:07.520 回答
0

尝试附加气体而不是存款。下面是一个使用 CLI 的示例:

near call museum.testnet add_meme --gas 300000000000000 --accountId=youraccount.testnet '{
  "meme": "bob",
  "title": "blabla",
  "data": "https://9gag.com/gag/ad8K0vj",
  "category": 4
}'
于 2022-01-15T16:03:57.793 回答