diff --git a/scripts/build-l1-image b/scripts/build-l1-image index 559eee3..8408cd6 100755 --- a/scripts/build-l1-image +++ b/scripts/build-l1-image @@ -57,21 +57,38 @@ done echo "Funding accounts." -# Retry a few times because sending transactions may still fail for a while -# after the RPC is up. -for try in $(seq 1 5); do - echo "Transfer from coinbase to account 0" - geth --exec \ - 'eth.sendTransaction({from: eth.coinbase, to: "0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266", value: "1000000000000000000000000000"})' \ - attach http://localhost:$RPC_PORT && break || sleep "$BLOCK_PERIOD"; -done -echo "Transfer done!" - -echo "Transfer from coinbase to account 1" -geth --exec \ - 'eth.sendTransaction({from: eth.coinbase, to: "0x70997970C51812dc3A010C7d01b50e0d17dc79C8", value: "1000000000000000000000000000"})' \ - attach http://localhost:$RPC_PORT -echo "Transfer done!" +# Loop over accounts and fund them. +while read address; do + # Retry a few times because sending transactions may still fail for a while + # after the RPC is up. + for try in $(seq 1 5); do + echo "Transfer from coinbase to $address" + geth --exec \ + "eth.sendTransaction({from: eth.coinbase, to: \"$address\", value: \"10000000000000000000000000000000000000000\"})" \ + attach http://localhost:$RPC_PORT && break || sleep "$BLOCK_PERIOD"; + done +done <