Cómo generar el saldo de la cuenta de desarrollo

Estoy creando un intercambio de criptomonedas y quiero probar mi aplicación y, para ese propósito, necesito agregar el saldo de la cuenta de desarrollo. Por favor, ayúdenme a generar ether para fines de prueba en mi red privada.

NOTA

Estoy usando geth para ejecutar el nodo ethereum.

¿Utiliza Parity o Go-Ethereum para su red privada?

Respuestas (3)

Debido a que usa go-ethereum, le recomiendo que pruebe la nueva herramienta para configurar su red ethereum privada llamada puppeth. Está disponible a partir de la versión 1.6. Cuando responda las preguntas de un mago, una pregunta seráWhich accounts should be pre-funded?

ubuntu@test1:~$ puppeth
+-----------------------------------------------------------+
| Welcome to puppeth, your Ethereum private network manager |
|                                                           |
| This tool lets you create a new Ethereum network down to  |
| the genesis block, bootnodes, miners and ethstats servers |
| without the hassle that it would normally entail.         |
|                                                           |
| Puppeth uses SSH to dial in to remote servers, and builds |
| its network components out of Docker containers using the |
| docker-compose toolset.                                   |
+-----------------------------------------------------------+

Please specify a network name to administer (no spaces, please)
> foobar
Sweet, you can set this via --network=foobar next time!

INFO [05-28|23:33:58] Administering Ethereum network           name=foobar
WARN [05-28|23:33:58] No previous configurations found         path=/home/ubuntu/.puppeth/foobar

What would you like to do? (default = stats)
 1. Show network stats
 2. Configure new genesis
 3. Track new remote server
 4. Deploy network components
> 2

Which consensus engine to use? (default = clique)
 1. Ethash - proof-of-work
 2. Clique - proof-of-authority
> 2

How many seconds should blocks take? (default = 15)
> 15

Which accounts are allowed to seal? (mandatory at least one)
> 0xfbb1b73c4f0bda4f67dca266ce6ef42f520fbb98
> 0x

Which accounts should be pre-funded? (advisable at least one)
> 0xfbb1b73c4f0bda4f67dca266ce6ef42f520fbb98
> 0x

Para fines de prueba, debe usar testRPC . Da 10 cuentas por defecto y cada cuenta tiene saldo inicialmente. Con esto, no tiene que desbloquear la cuenta o agregar saldo y también es mucho más rápido que geth para probar rápidamente su código.

Instálelo usando el siguiente comando:

npm install -g ethereumjs-testrpc

Tienes tres opciones:

1-Minería: en su nodo, ejecute miner.start() para obtener nuevos éteres y luego envíelos y divídalos entre sus saldos

2-Inicie su cadena privada con un archivo de génesis que defina los saldos de sus cuentas usando:

"asignación": { "133ded6da4e99fa9e37d75cbc9e8cba18a9a7796": { "saldo": "100000000000" } }