In [12]: acc_service = eth.services.accounts
In [13]: acc_service.accounts
Out[13]: [<Account(address=80705c7633fa7dcc6e92438f8af1d5a87bf9545c, id=None)>]
# 檢查是否帳號鎖住
In [15]: acct = acc_service.accounts[0]
In [18]: acct.locked
Out[18]: True
# 輸入密碼解鎖
In [9]: from getpass import getpass
In [10]: pw = getpass() # 避免密碼直接key 出來
Password:
In [21]: acct.unlock(pw)
In [22]: acct.locked
Out[22]: False
#送出交易
tx = eth.transact('80705c7633fa7dcc6e92438f8af1d5a87bf9545c', value=100)