Contract-Deployment

無法將 json 轉換為 abi 編碼

  • July 7, 2021

我正在嘗試使用https://abi.hashex.org/將以下 json 轉換為 abi 程式碼

[
   {
     "inputs": [
       {
         "internalType": "string",
         "name": "_greeting",
         "type": "string"
       }
     ],
     "stateMutability": "nonpayable",
     "type": "constructor"
   },
   {
     "inputs": [],
     "name": "greet",
     "outputs": [
       {
         "internalType": "string",
         "name": "",
         "type": "string"
       }
     ],
     "stateMutability": "view",
     "type": "function"
   },
   {
     "inputs": [
       {
         "internalType": "string",
         "name": "_greeting",
         "type": "string"
       }
     ],
     "name": "setGreeting",
     "outputs": [],
     "stateMutability": "nonpayable",
     "type": "function"
   }
 ]

然而,這個站點似乎沒有生成 abi 程式碼,也沒有解釋為什麼它沒有生成它。

在此處輸入圖像描述

輸入_greeting的建構子值在此處輸入圖像描述

引用自:https://ethereum.stackexchange.com/questions/103120