EOS主网账户名交易
这里主要是要教会大家如果将自己公钥里面的账户名转给其他人。能转出给另外一个公钥就可以实现线下交易,线上转账户名了。
代码如下:
#转移active权限
cleos push action eosio updateauth '{"permission":"active","parent":"owner","account":"你要转移的帐号","auth": {"accounts": [], "waits": [], "keys": [{"key": "EOS开头的对方的公钥", "weight": 1}], "threshold": 1}}' -p 你要转移的帐号@active
#转移owner权限
cleos push action eosio updateauth '{"permission":"owner","parent":"","account":"你要转移的帐号","auth": {"accounts": [], "waits": [], "keys": [{"key": "EOS开头的对方的公钥", "weight": 1}], "threshold": 1}}' -p 你要转移的帐号@owner
如果是网络情况报错可能是没有连接上主网,则改为:
#转移active权限
cleos -u http://mainnet.eoswz.com push action eosio updateauth '{"permission":"active","parent":"owner","account":"你要转移的帐号","auth": {"accounts": [], "waits": [], "keys": [{"key": "EOS开头的对方的公钥", "weight": 1}], "threshold": 1}}' -p 你要转移的帐号@active
#转移owner权限
cleos -u http://mainnet.eoswz.com push action eosio updateauth '{"permission":"owner","parent":"","account":"你要转移的帐号","auth": {"accounts": [], "waits": [], "keys": [{"key": "EOS开头的对方的公钥", "weight": 1}], "threshold": 1}}' -p 你要转移的帐号@owner
注意!
这里可能会提示一些报错。例如:
#CPU不够
Error 3080004: transaction exceeded the current CPU usage limit imposed on the transaction
Error Details:
billed CPU time (574 us) is greater than the maximum billable CPU time for the transaction (0 us)
#.NET不够
Error 3080002: transaction exceeded the current network usage limit imposed on the transaction
Error Details:
net usage of transaction is too high: 160 > 0
这是因为你在建立这个账户名的时候,账户名下没有足够的资源导致。所以只需要其他有资源的账户给这个账户转入一些资源就可以了。