發生 creation of ???? errored: transaction execution failed,但是又沒任何錯誤,該如何處理

用 Solidity remix 使用Javascript VM deploy 功能時發現已下錯誤時

creation of BullsAndCows pending...
[vm]
from:0xca3...a733c
to:BullsAndCows.(constructor)
value:0 wei
data:0x608...a0029
logs:0
hash:0xf18...0d95c
Debug
creation of BullsAndCows errored: transaction execution failed


但是compiler 都沒有錯誤,這時候通常是 合約已經寫了很長了但是 gas limt 設定太小了,我個人會在後面加上三個0 以確保是夠用的 , 反正Javascript VM 也不會損失什麼XD

設定如下


留言

這個網誌中的熱門文章

angular 如何Http 如何設定 CORS (Cross-Origin Resource Sharing)

Google Map 單車路徑計算坡度和角度小工具

Google URL Shortener API 快速教學