从钱包中提取空投的 OMG 代币
Withdraw airdropped OMG tokens from wallet
我正在尝试提取空投到我的一些以太坊账户的 OMG (Omise Go) 代币。
如何安全、干净、轻松地做到这一点?
使用任何兼容 ERC20 的钱包。像 MyEtherWallet.com、Parity.io、Exudos.io、MetaMask.io 和许多其他。
不过,我建议:
https://www.myetherwallet.com/,如果你不想在你的机器上安装任何东西。
http://www.exodus.io/,很好,但需要您在 PC 上安装它。
---下面的确认答案---
这适用于任何 ERC20 代币——不仅仅是 OMG。这是分离您的 ERC-20 代币的最简单、最干净、最有原则的方法。
这个答案对那些喜欢使用原始命令行以太坊的人很有用(例如 geth
、eth
等)
只需输入以下命令即可。
记住以下几点:
一定要用自己的地址替换myETHaccount
和myOMGaccount
字符串变量!
如果您没有目标 OMG 帐户,请在交易所创建一个 OMG。我使用 https://bittrex.com
bittrex.com 需要最低存款 0.1 OMG
//Official OMG ABI definition:
var omg_abi=[{"constant":true,"inputs":[],"name":"mintingFinished","outputs":[{"name":"","type":"bool"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"name","outputs":[{"name":"","type":"string"}],"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":"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":false,"inputs":[],"name":"unpause","outputs":[{"name":"","type":"bool"}],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"_to","type":"address"},{"name":"_amount","type":"uint256"}],"name":"mint","outputs":[{"name":"","type":"bool"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"paused","outputs":[{"name":"","type":"bool"}],"payable":false,"type":"function"},{"constant":true,"inputs":[{"name":"_owner","type":"address"}],"name":"balanceOf","outputs":[{"name":"balance","type":"uint256"}],"payable":false,"type":"function"},{"constant":false,"inputs":[],"name":"finishMinting","outputs":[{"name":"","type":"bool"}],"payable":false,"type":"function"},{"constant":false,"inputs":[],"name":"pause","outputs":[{"name":"","type":"bool"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"owner","outputs":[{"name":"","type":"address"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"symbol","outputs":[{"name":"","type":"string"}],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"_to","type":"address"},{"name":"_value","type":"uint256"}],"name":"transfer","outputs":[],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"_to","type":"address"},{"name":"_amount","type":"uint256"},{"name":"_releaseTime","type":"uint256"}],"name":"mintTimelocked","outputs":[{"name":"","type":"address"}],"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":false,"inputs":[{"name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"payable":false,"type":"function"},{"anonymous":false,"inputs":[{"indexed":true,"name":"to","type":"address"},{"indexed":false,"name":"value","type":"uint256"}],"name":"Mint","type":"event"},{"anonymous":false,"inputs":[],"name":"MintFinished","type":"event"},{"anonymous":false,"inputs":[],"name":"Pause","type":"event"},{"anonymous":false,"inputs":[],"name":"Unpause","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"}];
//Official OMG contract address:
var omg_address='0xd26114cd6EE289AccF82350c8d8487fedB8A0C07';
//now let's create an instance of OMG contract:
var instance = web3.eth.contract(omg_abi).at(omg_address);
//set your ETH address
var myETHaccount=eth.accounts[3];
//check your available OMG balance:
web3.fromWei(instance.balanceOf(myETHaccount),"ether");
//check balance of all your addresses in ~/.ethereum:
eth.accounts.forEach(function(e,i){console.log("eth.accounts["+i+"]: " + "\tbalance:" + web3.fromWei(instance.balanceOf(eth.accounts[i]),"ether") + " OMG")})
//set OMG address
var myOMGaccount='0xc0c941740a550e05c50c060168c2fda1f9a6ad7b';
//transfer full amount:
instance.transfer(myOMGaccount,instance.balanceOf(myETHaccount),{from:myETHaccount,gas:180000});
提示:ENTER_YOUR_PASSWORD
//Congratulations. You're done!
//Don't forget to lock your account:
web3.personal.lockAccount(myETHaccount)
//copy and paste the tx receipt and check it on etherscan.io (for example)
//**Note 1**: OMG contract can take 5 mins before it sends it to bittrex.com
//**Note 2**: bittrex.com takes 36 confirmations before balance will appear
我正在尝试提取空投到我的一些以太坊账户的 OMG (Omise Go) 代币。
如何安全、干净、轻松地做到这一点?
使用任何兼容 ERC20 的钱包。像 MyEtherWallet.com、Parity.io、Exudos.io、MetaMask.io 和许多其他。
不过,我建议:
https://www.myetherwallet.com/,如果你不想在你的机器上安装任何东西。
http://www.exodus.io/,很好,但需要您在 PC 上安装它。
---下面的确认答案---
这适用于任何 ERC20 代币——不仅仅是 OMG。这是分离您的 ERC-20 代币的最简单、最干净、最有原则的方法。
这个答案对那些喜欢使用原始命令行以太坊的人很有用(例如 geth
、eth
等)
只需输入以下命令即可。
记住以下几点:
一定要用自己的地址替换myETHaccount
和myOMGaccount
字符串变量!
如果您没有目标 OMG 帐户,请在交易所创建一个 OMG。我使用 https://bittrex.com
bittrex.com 需要最低存款 0.1 OMG
//Official OMG ABI definition:
var omg_abi=[{"constant":true,"inputs":[],"name":"mintingFinished","outputs":[{"name":"","type":"bool"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"name","outputs":[{"name":"","type":"string"}],"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":"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":false,"inputs":[],"name":"unpause","outputs":[{"name":"","type":"bool"}],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"_to","type":"address"},{"name":"_amount","type":"uint256"}],"name":"mint","outputs":[{"name":"","type":"bool"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"paused","outputs":[{"name":"","type":"bool"}],"payable":false,"type":"function"},{"constant":true,"inputs":[{"name":"_owner","type":"address"}],"name":"balanceOf","outputs":[{"name":"balance","type":"uint256"}],"payable":false,"type":"function"},{"constant":false,"inputs":[],"name":"finishMinting","outputs":[{"name":"","type":"bool"}],"payable":false,"type":"function"},{"constant":false,"inputs":[],"name":"pause","outputs":[{"name":"","type":"bool"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"owner","outputs":[{"name":"","type":"address"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"symbol","outputs":[{"name":"","type":"string"}],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"_to","type":"address"},{"name":"_value","type":"uint256"}],"name":"transfer","outputs":[],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"_to","type":"address"},{"name":"_amount","type":"uint256"},{"name":"_releaseTime","type":"uint256"}],"name":"mintTimelocked","outputs":[{"name":"","type":"address"}],"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":false,"inputs":[{"name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"payable":false,"type":"function"},{"anonymous":false,"inputs":[{"indexed":true,"name":"to","type":"address"},{"indexed":false,"name":"value","type":"uint256"}],"name":"Mint","type":"event"},{"anonymous":false,"inputs":[],"name":"MintFinished","type":"event"},{"anonymous":false,"inputs":[],"name":"Pause","type":"event"},{"anonymous":false,"inputs":[],"name":"Unpause","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"}];
//Official OMG contract address:
var omg_address='0xd26114cd6EE289AccF82350c8d8487fedB8A0C07';
//now let's create an instance of OMG contract:
var instance = web3.eth.contract(omg_abi).at(omg_address);
//set your ETH address
var myETHaccount=eth.accounts[3];
//check your available OMG balance:
web3.fromWei(instance.balanceOf(myETHaccount),"ether");
//check balance of all your addresses in ~/.ethereum:
eth.accounts.forEach(function(e,i){console.log("eth.accounts["+i+"]: " + "\tbalance:" + web3.fromWei(instance.balanceOf(eth.accounts[i]),"ether") + " OMG")})
//set OMG address
var myOMGaccount='0xc0c941740a550e05c50c060168c2fda1f9a6ad7b';
//transfer full amount:
instance.transfer(myOMGaccount,instance.balanceOf(myETHaccount),{from:myETHaccount,gas:180000});
提示:ENTER_YOUR_PASSWORD
//Congratulations. You're done!
//Don't forget to lock your account:
web3.personal.lockAccount(myETHaccount)
//copy and paste the tx receipt and check it on etherscan.io (for example)
//**Note 1**: OMG contract can take 5 mins before it sends it to bittrex.com
//**Note 2**: bittrex.com takes 36 confirmations before balance will appear