I read the web3.eth.API carefully and I typed the code in my project.
signed_txn = self.web3.eth.account.signTransaction(
{
'nonce': self.web3.eth.getTransactionCount(Web3.toChecksumAddress(self.address)),
'gasPrice': Web3.toWei(21, 'gwei'),
'from': Web3.toChecksumAddress(self.address),
'gas': 21000,
'to': recipient,
# 'chainId': 1,
'value': Web3.toWei(amount, 'ether')
},
private_key
)
This code doesn't run.
Here what I can't understand is as follow.
- chainId: What value is this?
- private_key: I can't get this value. I created ethereum wallet using pywallet.
Wallet to be created using pywallet is HD Wallet. If anyone know about this, plz help me.