Skip to main content
edited body
Source Link
salanfe
  • 611
  • 4
  • 9

here's a code sample that creates a local account on your pc (not on the node, no weedneed of any providers here)

import web3
w3 = web3.Web3()
myAccount = w3.eth.account.create('put some extra entropy here')
myAddress = myAccount.address
myPrivateKey = myAccount.privateKey
print('my address is     : {}'.format(myAccount.address))
print('my private key is : {}'.format(myAccount.privateKey.hex()))

you can allocate some funds to this account in your genesis file OR attach a javascript console to your geth node and do a transfer so that your new account has funds.

I've published a post on medium if you would need more details

https://hackernoon.com/ethereum-create-raw-json-rpc-requests-with-python-for-deploying-and-transacting-with-a-smart-7ceafd6790d9

here's a code sample that creates a local account on your pc (not on the node, no weed of any providers here)

import web3
w3 = web3.Web3()
myAccount = w3.eth.account.create('put some extra entropy here')
myAddress = myAccount.address
myPrivateKey = myAccount.privateKey
print('my address is     : {}'.format(myAccount.address))
print('my private key is : {}'.format(myAccount.privateKey.hex()))

you can allocate some funds to this account in your genesis file OR attach a javascript console to your geth node and do a transfer so that your new account has funds.

I've published a post on medium if you would need more details

https://hackernoon.com/ethereum-create-raw-json-rpc-requests-with-python-for-deploying-and-transacting-with-a-smart-7ceafd6790d9

here's a code sample that creates a local account on your pc (not on the node, no need of any providers here)

import web3
w3 = web3.Web3()
myAccount = w3.eth.account.create('put some extra entropy here')
myAddress = myAccount.address
myPrivateKey = myAccount.privateKey
print('my address is     : {}'.format(myAccount.address))
print('my private key is : {}'.format(myAccount.privateKey.hex()))

you can allocate some funds to this account in your genesis file OR attach a javascript console to your geth node and do a transfer so that your new account has funds.

I've published a post on medium if you would need more details

https://hackernoon.com/ethereum-create-raw-json-rpc-requests-with-python-for-deploying-and-transacting-with-a-smart-7ceafd6790d9

Source Link
salanfe
  • 611
  • 4
  • 9

here's a code sample that creates a local account on your pc (not on the node, no weed of any providers here)

import web3
w3 = web3.Web3()
myAccount = w3.eth.account.create('put some extra entropy here')
myAddress = myAccount.address
myPrivateKey = myAccount.privateKey
print('my address is     : {}'.format(myAccount.address))
print('my private key is : {}'.format(myAccount.privateKey.hex()))

you can allocate some funds to this account in your genesis file OR attach a javascript console to your geth node and do a transfer so that your new account has funds.

I've published a post on medium if you would need more details

https://hackernoon.com/ethereum-create-raw-json-rpc-requests-with-python-for-deploying-and-transacting-with-a-smart-7ceafd6790d9