Contract-Deployment
無法在 etherscan.io 驗證具有多個參數的契約
當我輸入有關契約的所有資訊時,系統顯示錯誤:
錯誤!提供的建構子參數無效。請驗證它們是否為 ABI 編碼格式
我填寫以下欄位
Contract address: 0xa4DE910F252c38fcEC811075e532d4644cB86F58 Contract name: SOCTokenSale Compiler: 0.4.12 (2017.06.20) Optimization: Enabled Contract gist: https://gist.github.com/dmitry-nosov/a3c5c90ec82b518c438ab4aa4177d8a4 Constructor arguments: 0x60606040526007805460ff1990811690915568015af1d78b58c40000600855600980549091169055341561002f57fe5b60405160a0806106e683398101604090815281516020830151918301516060840151608090940151919390915b60008054600160a060020a031916600160a060020a038716179055670de0b6b3a7640000848102600155603c84024201600355829081151561009a57fe5b0460045560058054600160a060020a031916600160a060020a0383161790555b50505050505b610617806100cf6000396000f300606060405236156100a15763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166301cb3b2081146101b257806329dcb0cf146101c457806338af3eed146101e65780636e66f6e91461021257806370a082311461023e5780637a3a0e841461026c5780637b3e5e7b1461028e578063835fc6ca146102b0578063a035b1fe146102c5578063fd6b7ef8146102e7575b6101b05b60095460009060ff16156100b95760006000fd5b50600160a060020a03338181166000908152600660205260409020349081905560028054820190556005546004549193169163a9059cbb91848115156100fb57fe5b046040518363ffffffff167c01000000000000000000000000000000000000000000000000000000000281526004018083600160a060020a0316600160a060020a0316815260200182815260200192505050600060405180830381600087803b151561016357fe5b6102c65a03f1151561017157fe5b505060408051600160a060020a03331681526020810184905260018183015290516000805160206105cc83398151915292509081900360600190a15b50565b005b34156101ba57fe5b6101b06102f9565b005b34156101cc57fe5b6101d4610378565b60408051918252519081900360200190f35b34156101ee57fe5b6101f661037e565b60408051600160a060020a039092168252519081900360200190f35b341561021a57fe5b6101f661038d565b60408051600160a060020a039092168252519081900360200190f35b341561024657fe5b6101d4600160a060020a036004351661039c565b60408051918252519081900360200190f35b341561027457fe5b6101d46103ae565b60408051918252519081900360200190f35b341561029657fe5b6101d46103b4565b60408051918252519081900360200190f35b34156102b857fe5b6101b06004356103ba565b005b34156102cd57fe5b6101d4610453565b60408051918252519081900360200190f35b34156102ef57fe5b6101b0610459565b005b60035442106103745760015460025410610366576007805460ff1916600117905560005460025460408051600160a060020a039093168352602083019190915280517fec3f991caf7857d61663fd1bba1739e04abd4781238508cde554bb849d790c859281900390910190a15b6009805460ff191660011790555b5b5b565b60035481565b600054600160a060020a031681565b600554600160a060020a031681565b60066020526000908152604090205481565b60015481565b60025481565b60005433600160a060020a03908116911614156101ad5760008054604051600160a060020a039091169166038d7ea4c68000840280156108fc02929091818181858888f19350505050156101ad576000805460408051600160a060020a03909216825266038d7ea4c68000840260208301528181019290925290516000805160206105cc8339815191529181900360600190a15b5b5b50565b60045481565b60035460009042106101ad57600854600254101561051a5750600160a060020a03331660009081526006602052604081208054908290559081111561051a57604051600160a060020a0333169082156108fc029083906000818181858888f19350505050156104fe5760408051600160a060020a03331681526020810183905260008183015290516000805160206105cc8339815191529181900360600190a161051a565b600160a060020a03331660009081526006602052604090208190555b5b5b60075460ff16801561053c575060005433600160a060020a039081169116145b156101ad5760008054604051600160a060020a0391821692309092163180156108fc0292909190818181858888f19350505050156105b9576000805460408051600160a060020a039283168152309092163160208301528181019290925290516000805160206105cc8339815191529181900360600190a16101ad565b6007805460ff191690555b5b5b5b5b505600e842aea7a5f1b01049d752008c53c52890b1a6daf660cf39e8eec506112bbdf6a165627a7a723058209efb7242b2d951aef3589fbbb1d9eae4dc9b51c96a7bbfab09b6c79f13a9e2e800290000000000000000000000007393ab0b22d6b9413a83928a9719f13f5129397e0000000000000000000000000000000000000000000000000000000000000dac000000000000000000000000000000000000000000000000000000000000e07800000000000000000000000000000000000000000000000000000000000008f0000000000000000000000000d57005812e98fcea06cc64bfff98ff458ff5b1eb
我使用這個系統來編譯合約:
Etherium Wallet: 0.8.10 (win 64) Geth: Version: 1.6.5-stable Git Commit: cf87713dd42162861b7ed227f79f0638a33571df Architecture: amd64 Protocol Versions: [63 62] Network Id: 1 Go Version: go1.8.3
創建合約的交易: https ://etherscan.io/tx/0x45ef70a9e1b21cb54d2a1ff95379bed208ce537d5389e75344b46bfcca159efa
你能解釋一下如何驗證這個契約嗎?謝謝!
您需要正確地對建構子參數進行 ABI 編碼。您可以使用線上工具https://abi.hashex.org輕鬆完成此操作。只需粘貼您的 abi 即可自動解析建構子參數或手動添加它們並輸入值。將自動計算 ABI 編碼的建構子參數。只需將它們複製並粘貼到 etherscan.io 建構子參數輸入中。
您正在傳遞整個字節碼,而它只需要 ABI 編碼的參數,在您的情況下似乎是
0000000000000000000000007393ab0b22d6b9413a83928a9719f13f5129397e0000000000000000000000000000000000000000000000000000000000000dac000000000000000000000000000000000000000000000000000000000000e07800000000000000000000000000000000000000000000000000000000000008f0000000000000000000000000d57005812e98fcea06cc64bfff98ff458ff5b1eb