Myetherwallet
獲取 myetherwallet.com/#contracts 的參數
我可以使用哪些參數來預先填寫合約地址和https://www.myetherwallet.com/#contracts上的參數?
有問題的答案
$$ 1 $$似乎已貶值(我收到錯誤消息)並且不關注子網站#contracts。 $$ 1 $$如何使用給定的接收方地址、金額和氣體限制預填充 myetherwallet 上的欄位? 來自 Myetherwallet (ADST) 的範例:地址:
0x422866a8F0b032c5cf1DfBDEf31A20F4509562b0
ABI/JSON
[{"constant":true,"inputs":[],"name":"name","outputs":[{"name":"","type":"string"}],"payable":false,"type":"function"},{"constant":true,"inputs":[{"name":"_bidValue","type":"uint256"}],"name":"getBuyPrice","outputs":[{"name":"tokenCount","type":"uint256"},{"name":"purchaseValue","type":"uint256"}],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"_spender","type":"address"},{"name":"_value","type":"uint256"}],"name":"approve","outputs":[],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"withdrawnBalance","outputs":[{"name":"","type":"uint256"}],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"_value","type":"uint256"}],"name":"withdrawFunds","outputs":[],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"withdrawAddress","outputs":[{"name":"","type":"address"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"totalSupply","outputs":[{"name":"","type":"uint256"}],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"_from","type":"address"},{"name":"_to","type":"address"},{"name":"_value","type":"uint256"}],"name":"transferFrom","outputs":[],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"decimals","outputs":[{"name":"","type":"uint256"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"tradeSpreadInvert","outputs":[{"name":"","type":"uint256"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"crowdsaleEndDeclarationTime","outputs":[{"name":"","type":"uint256"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"owner2","outputs":[{"name":"","type":"address"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"fundingUnlockFractionInvert","outputs":[{"name":"","type":"uint256"}],"payable":false,"type":"function"},{"constant":false,"inputs":[],"name":"haltCrowdsale","outputs":[],"payable":false,"type":"function"},{"constant":true,"inputs":[{"name":"_owner","type":"address"}],"name":"balanceOf","outputs":[{"name":"balance","type":"uint256"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"owner1","outputs":[{"name":"","type":"address"}],"payable":false,"type":"function"},{"constant":false,"inputs":[],"name":"confirmCrowdsaleEnd","outputs":[],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"symbol","outputs":[{"name":"","type":"string"}],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"_maxPrice","type":"uint256"}],"name":"buyLimit","outputs":[],"payable":true,"type":"function"},{"constant":true,"inputs":[],"name":"fundingUnlockPeriod","outputs":[{"name":"","type":"uint256"}],"payable":false,"type":"function"},{"constant":false,"inputs":[],"name":"buy","outputs":[],"payable":true,"type":"function"},{"constant":false,"inputs":[{"name":"_to","type":"address"},{"name":"_value","type":"uint256"}],"name":"transfer","outputs":[],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"unlockedBalance","outputs":[{"name":"","type":"uint256"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"tokenPriceMin","outputs":[{"name":"","type":"uint256"}],"payable":false,"type":"function"},{"constant":false,"inputs":[],"name":"unlockFunds","outputs":[],"payable":false,"type":"function"},{"constant":true,"inputs":[{"name":"_askSizeTokens","type":"uint256"}],"name":"getSellPrice","outputs":[{"name":"saleValue","type":"uint256"}],"payable":false,"type":"function"},{"constant":false,"inputs":[],"name":"declareCrowdsaleEnd","outputs":[],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"tokenCreationMin","outputs":[{"name":"","type":"uint256"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"fundingUnlockTime","outputs":[{"name":"","type":"uint256"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"isHalted","outputs":[{"name":"","type":"bool"}],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"_tokenCount","type":"uint256"},{"name":"_minPrice","type":"uint256"}],"name":"sellLimit","outputs":[],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"crowdsaleStartBlock","outputs":[{"name":"","type":"uint256"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"minFundingReached","outputs":[{"name":"","type":"bool"}],"payable":false,"type":"function"},{"constant":true,"inputs":[{"name":"_owner","type":"address"},{"name":"_spender","type":"address"}],"name":"allowance","outputs":[{"name":"remaining","type":"uint256"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"crowdsaleEndLockTime","outputs":[{"name":"","type":"uint256"}],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"_tokenCount","type":"uint256"}],"name":"sell","outputs":[],"payable":false,"type":"function"},{"inputs":[{"name":"_owner1","type":"address"},{"name":"_owner2","type":"address"},{"name":"_withdrawAddress","type":"address"},{"name":"_crowdsaleStartBlock","type":"uint256"}],"payable":false,"type":"constructor"},{"payable":true,"type":"fallback"},{"anonymous":false,"inputs":[{"indexed":true,"name":"who","type":"address"},{"indexed":false,"name":"tokens","type":"uint256"},{"indexed":false,"name":"purchaseValue","type":"uint256"},{"indexed":false,"name":"supplyAfter","type":"uint256"}],"name":"LogBuy","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"who","type":"address"},{"indexed":false,"name":"tokens","type":"uint256"},{"indexed":false,"name":"saleValue","type":"uint256"},{"indexed":false,"name":"supplyAfter","type":"uint256"}],"name":"LogSell","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"amount","type":"uint256"}],"name":"LogWithdraw","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"completed","type":"bool"}],"name":"LogCrowdsaleEnd","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"owner","type":"address"},{"indexed":true,"name":"spender","type":"address"},{"indexed":false,"name":"value","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"from","type":"address"},{"indexed":true,"name":"to","type":"address"},{"indexed":false,"name":"value","type":"uint256"}],"name":"Transfer","type":"event"}]
我期望的是一個 URL,例如 https://www.myetherwallet.com/#contracts?to=0x7cB57B5A97eAbe94205C07890BE4c1aD31E486A8以便如果我點擊例如鍊接,則契約已經輸入
從程式碼中,您可以使用的唯一 URL 參數似乎是“地址”,但這似乎並不完全正常。例如https://www.myetherwallet.com/?address=0x95D7321EdCe519419ba1DbC60A89bAfbF55EAC0D#contracts顯示與該地址對應的 ABI(因此 URL 參數有效),但地址欄位保持為空。
如果您真的想要此功能,我建議您自己更改程式碼並送出拉取請求。
為此,您可以使用 conteract.io。例如,此連結 - https://conteract.io/c/moataddress?function=getAddr&AddrName=owner - 將自動
getAddr
以所有者作為定義為的函式的參數初始化函式AddrName
。