Compare commits

...
Author SHA1 Message Date
telackey cb2afcdfeb Make amount a command-line param
Build / cleanup-runs (pull_request) Failing after 5s
Build / build (pull_request) Successful in 1m2s
Deploy Contract / cleanup-runs (pull_request) Failing after 6s
Deploy Contract / deploy (pull_request) Failing after 43s
Pull Request Labeler / triage (pull_request) Failing after 22s
CodeQL / Analyze (go) (pull_request) Successful in 1m40s
Dependency Review / dependency-review (pull_request) Successful in 1m29s
Lint / Run flake8 on python integration tests (pull_request) Failing after 32s
Run Gosec / Gosec (pull_request) Successful in 26s
Tests / cleanup-runs (pull_request) Successful in 5s
Semgrep / Scan (pull_request) Failing after 12s
Lint / Run golangci-lint (pull_request) Successful in 49s
Tests / test-rpc (pull_request) Successful in 1m10s
Tests / test-unit-cover (pull_request) Successful in 1m58s
Tests / test-importer (pull_request) Successful in 1m53s
Tests / sdk_tests (pull_request) Failing after 2m27s
2024-01-09 23:17:50 -06:00
telackey b8f56076ff Refactor
Build / cleanup-runs (pull_request) Failing after 2s
Build / build (pull_request) Successful in 36s
Deploy Contract / cleanup-runs (pull_request) Failing after 6s
CodeQL / Analyze (go) (pull_request) Successful in 1m13s
Deploy Contract / deploy (pull_request) Failing after 36s
Pull Request Labeler / triage (pull_request) Failing after 3s
Dependency Review / dependency-review (pull_request) Successful in 1m31s
Lint / Run flake8 on python integration tests (pull_request) Failing after 48s
Lint / Run golangci-lint (pull_request) Successful in 52s
Tests / cleanup-runs (pull_request) Failing after 8s
Semgrep / Scan (pull_request) Failing after 11s
Run Gosec / Gosec (pull_request) Successful in 1m8s
Tests / test-importer (pull_request) Successful in 1m27s
Tests / test-unit-cover (pull_request) Successful in 1m29s
Tests / test-rpc (pull_request) Successful in 1m48s
Tests / sdk_tests (pull_request) Failing after 3m11s
2024-01-09 23:12:56 -06:00
telackey 19a7b4d3eb Add a script to simplify creating and funding a new account.
Build / cleanup-runs (pull_request) Successful in 8s
Deploy Contract / cleanup-runs (pull_request) Successful in 11s
CodeQL / Analyze (go) (pull_request) Failing after 39s
Build / build (pull_request) Failing after 1m14s
Pull Request Labeler / triage (pull_request) Failing after 36s
Dependency Review / dependency-review (pull_request) Failing after 1m15s
Deploy Contract / deploy (pull_request) Failing after 1m1s
Semgrep / Scan (pull_request) Failing after 21s
Lint / Run flake8 on python integration tests (pull_request) Failing after 26s
Tests / cleanup-runs (pull_request) Failing after 4s
Run Gosec / Gosec (pull_request) Failing after 39s
Lint / Run golangci-lint (pull_request) Failing after 1m48s
Tests / test-importer (pull_request) Failing after 1m28s
Tests / test-unit-cover (pull_request) Failing after 1m29s
Tests / test-rpc (pull_request) Failing after 1m39s
Tests / sdk_tests (pull_request) Failing after 4m53s
2024-01-09 23:09:24 -06:00
+22
View File
@@ -0,0 +1,22 @@
#!/bin/bash
AVG_RECORD_PHOTON=1000000
NUM_RECORDS=5000
BOND_OVERHEAD=200000
KEYNAME=`uuidgen | tr -d '-'`
KEYRING_DIR=`mktemp -d`
KEYRING=test
LACONIC_CONFIG=${LACONIC_CONFIG:-$HOME/.laconic/config.yml}
BOND_AMOUNT=${1:-$((AVG_RECORD_PHOTON * NUM_RECORDS))}
ACCOUNT_JSON=$(laconicd keys add $KEYNAME --keyring-backend $KEYRING --algo eth_secp256k1 --keyring-dir $KEYRING_DIR --output json)
PRIVATE_KEY=$(yes | laconicd keys export $KEYNAME --keyring-backend $KEYRING --keyring-dir $KEYRING_DIR --unarmored-hex --unsafe)
PUB_KEY=$(echo $ACCOUNT_JSON | jq -r ".pubkey | fromjson | .key")
laconicd keys delete $KEYNAME --keyring-backend $KEYRING --keyring-dir $KEYRING_DIR -y 2> /dev/null
rm -rf $KEYRING_DIR
laconic -c $LACONIC_CONFIG cns tokens send --address $(echo $ACCOUNT_JSON | jq -r '.address') --type aphoton --quantity $((BOND_AMOUNT + BOND_OVERHEAD)) > /dev/null
BOND_ID=$(laconic -c $LACONIC_CONFIG cns bond create --user-key $PRIVATE_KEY --type aphoton --quantity $BOND_AMOUNT | jq -r '.bondId')
echo $ACCOUNT_JSON | jq ".bond = \"$BOND_ID\"" | jq ".balance = $BOND_AMOUNT" | jq ".privkey = \"$PRIVATE_KEY\"" | jq ".pubkey = \"$PUB_KEY\""