From 9c240f1a0c152d74a4bea57bfd6af7f323d44b5c Mon Sep 17 00:00:00 2001 From: Thomas E Lackey Date: Thu, 11 Jan 2024 23:26:44 +0000 Subject: [PATCH] Add comment to script. (#133) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ``` ## ## This script generates a new account keypair, transfers funds to it, and creates ## a bond with those funds. The amount of can be optionally specified, else a ## default value estimated to be sufficient for about 5000 records. ## ## The `laconic` CLI and a valid config file for it are required. The default location ## for the config file is `~/.laconic/config.yml`, but this can be controlled with ## the environment variable LACONIC_CONFIG. A `userKey` for a source account with ## sufficient funds available must be present in this file for the funds transfer ## to succeed. ## ## Example: ## ## ❯ scripts/create-and-fund-account.sh 1000000000 ## { ## "name": "68334d7175fd4f86befa4902657e5270", ## "type": "local", ## "address": "ethm15r5x94km0swq55aszwd7hnr9wksq7wmr38xes7", ## "pubkey": "AuKqlSldJJXj4gYMFt2HeX9DJ3aUosYA7n6zBz9Tg7/i", ## "mnemonic": "umbrella bean special unaware accident giant distance mix ghost feel possible cost road grant endless man maple derive rebuild learn mask water attract resist", ## "bond": "3d3a73f09115d289d330781455e6eac217305dc4a20e19bde808011fe3775a93", ## "balance": 1000000000, ## "privkey": "480880fde7aff1461da584b436cb3a84692413c84623fda78e127bb4e704ce76" ## } ## ``` Reviewed-on: https://git.vdb.to/cerc-io/laconicd/pulls/133 Co-authored-by: Thomas E Lackey Co-committed-by: Thomas E Lackey --- scripts/create-and-fund-account.sh | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/scripts/create-and-fund-account.sh b/scripts/create-and-fund-account.sh index 993259ec..f506a586 100755 --- a/scripts/create-and-fund-account.sh +++ b/scripts/create-and-fund-account.sh @@ -1,5 +1,31 @@ #!/bin/bash +## +## This script generates a new account keypair, transfers funds to it, and creates +## a bond with those funds. The amount of can be optionally specified, else a +## default value estimated to be sufficient for about 5000 records. +## +## The `laconic` CLI and a valid config file for it are required. The default location +## for the config file is `~/.laconic/config.yml`, but this can be controlled with +## the environment variable LACONIC_CONFIG. A `userKey` for a source account with +## sufficient funds available must be present in this file for the funds transfer +## to succeed. +## +## Example: +## +## ❯ scripts/create-and-fund-account.sh 1000000000 +## { +## "name": "68334d7175fd4f86befa4902657e5270", +## "type": "local", +## "address": "ethm15r5x94km0swq55aszwd7hnr9wksq7wmr38xes7", +## "pubkey": "AuKqlSldJJXj4gYMFt2HeX9DJ3aUosYA7n6zBz9Tg7/i", +## "mnemonic": "umbrella bean special unaware accident giant distance mix ghost feel possible cost road grant endless man maple derive rebuild learn mask water attract resist", +## "bond": "3d3a73f09115d289d330781455e6eac217305dc4a20e19bde808011fe3775a93", +## "balance": 1000000000, +## "privkey": "480880fde7aff1461da584b436cb3a84692413c84623fda78e127bb4e704ce76" +## } +## + AVG_RECORD_PHOTON=1000000 NUM_RECORDS=5000 BOND_OVERHEAD=200000