0g-chain/migrate/v0_15/generate-test-auth-data.sh
Nick DeLuca 8b54fdafa4
Reset Periodic Vesting Accounts for Kava-8 (#987)
* add auth test data

* add periodic vesting account migration

* assert owned coins are equal and unchanged during migration

* add script for generating test data from a genesis file

* remove commented import

* touch ups

* don't pretty print test data for auth module; update generate script to
use jq -c option

* fix typo in comment, improve clarity of assertions

* add context to migrate auth assertions

* add 180 days check for spendable coins

* asssertion context

* pr feedback - add assertions, touch up assertion msgs, and fix migration test to correctly
type assert pointer
2021-08-12 10:31:58 -05:00

10 lines
267 B
Bash
Executable File

#!/usr/bin/env bash
if [ -z "$1" ]
then
echo "Usage: ./generate-test-auth-data.sh genesis.json"
exit 1
fi
jq < "$1" -c '.app_state.auth | { params: .params, accounts: [.accounts[] | select((.value.coins | length) > 0)] }' > testdata/kava-7-test-auth-state.json