You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying to use keystore file to send a transaction, and I find the code is:
withjson_file.open() asfp:
priv_key=web3.eth.account.decrypt(
json.load(fp), getpass("Enter the password to unlock this account: ")
}
I am not sure when we try to use the function web3.eth.account.decrypt(), whether it will connect to a node or not, but I know the package: eth_account, it just extracts the private locally, so is there a need to use eth_account to replace web3.eth.account at here?
The text was updated successfully, but these errors were encountered:
There is no need to use web3 directly. After adding the keystore to Brownie, you can access it using Accounts.load. For example, if you add the keystore using the ID owner as shown in the example in #440, you can then import it with:
acct = Accounts.load('owner')
acct is a LocalAccount object which has an identical API to the Account objects you are already familiar with.
Close the issue, cause it seems like the function web3.eth.account.decrypt() in the web3 and the function Accounts.decrypt() in the eth_account return the same result.
I am trying to use keystore file to send a transaction, and I find the code is:
I am not sure when we try to use the function
web3.eth.account.decrypt()
, whether it will connect to a node or not, but I know the package: eth_account, it just extracts the private locally, so is there a need to useeth_account
to replaceweb3.eth.account
at here?The text was updated successfully, but these errors were encountered: