tokenika / eosfactory

Python-based EOS smart-contract development & testing framework
http://eosfactory.io/
Other
243 stars 62 forks source link

Account does not have public and private key information #178

Open cppfuns opened 5 years ago

cppfuns commented 5 years ago

When creating an existing account through new_account, it will go restored, But at this time, the account object is returned, there is no public or private key information.

// eosio.token has been created before
eosio_token = new_account(eosio, "eosio.token")
INFO(eosio_token .active()) // Output empty information

https://github.com/tokenika/eosfactory/blob/ee00f662872690738a702fc05aca1f1c0c8d4783/eosfactory/shell/account.py#L627

if is_in_globals(account_object_name, globals):
        logger.INFO('''
            ######## Account object ``{}`` restored from the blockchain.
            '''.format(account_object_name)) 
        return globals[account_object_name]       

I think it is the information that I lost my account when I resumed. I hope I can recover it all.

stefanzarembinski commented 5 years ago

It will be corrected soon. Still, you have the keys in the wallet, so you can recover keys. But the principle of EOSFactory is that it keeps the user out of the wallet operations. Therefore, after the accounts are restored, their keys are in the wallet and therefore the accounts can be used in transactions.

In fact, accounts are restored basing on the keys stored in active wallets.