Skip to content

Commit

Permalink
imp: add more params to automation jobs
Browse files Browse the repository at this point in the history
  • Loading branch information
johnalotoski committed May 26, 2023
1 parent a04b757 commit 942e697
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions nix/automation/jobs.nix
Expand Up @@ -502,7 +502,7 @@ in {
name = "move-genesis-utxo";
runtimeInputs = [nixpkgs.jq nixpkgs.coreutils];
text = ''
# Inputs: $PAYMENT_ADDRESS, $BYRON_SIGNING_KEY, $TESTNET_MAGIC
# Inputs: $PAYMENT_ADDRESS, $BYRON_SIGNING_KEY, $TESTNET_MAGIC, $SUBMIT_TX, $ERA
BYRON_UTXO=$(cardano-cli query utxo --whole-utxo --testnet-magic "$TESTNET_MAGIC" --out-file /dev/stdout|jq \
'to_entries[]|
{"txin": .key, "address": .value.address, "amount": .value.value.lovelace}
Expand All @@ -513,9 +513,11 @@ in {
BYRON_ADDRESS=$(echo "$BYRON_UTXO"|jq -r '.address')
TXIN=$(echo "$BYRON_UTXO"|jq -r '.txin')
cardano-cli transaction build-raw --tx-in "$TXIN" --tx-out "$PAYMENT_ADDRESS+$SUPPLY" --fee "$FEE" --out-file tx-byron.txbody
cardano-cli transaction build-raw ''${ERA:+$ERA} --tx-in "$TXIN" --tx-out "$PAYMENT_ADDRESS+$SUPPLY" --fee "$FEE" --out-file tx-byron.txbody
cardano-cli transaction sign --tx-body-file tx-byron.txbody --out-file tx-byron.txsigned --address "$BYRON_ADDRESS" --signing-key-file "$BYRON_SIGNING_KEY"
cardano-cli transaction submit --testnet-magic "$TESTNET_MAGIC" --tx-file tx-byron.txsigned
if [ "''${SUBMIT_TX:-TRUE}" = "TRUE" ]; then
cardano-cli transaction submit --testnet-magic "$TESTNET_MAGIC" --tx-file tx-byron.txsigned
fi
'';
};
update-proposal-generic = writeShellApplication {
Expand Down

0 comments on commit 942e697

Please sign in to comment.