nearprotocolnear

Meme Museum tutorial - 'exceed prepaid gas'


Im getting this error. It seems to happen no matter how much gas I give it. Can someone help or advise what I am doing wrong? Thanks

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```

Solution

  • In order to execute this properly you need to have both the --amount 3 and the --gas 300000000000000 parameters.

            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