Create a fuel mainnet script
This does not use the testnet magic and works slightly differently.
This does not use the testnet magic and works slightly differently.
#!/usr/bin/env bash
#
# Fork off some amount of the UTxO owned by given signing key and mark the rest
# as fuel to be used by the hydra-node.
set -e
function usage() {
echo "Usage: $0 NODE_DIR KEY LOVELACE"
exit 1
}
[ ${#} -eq 3 ] || (echo "Wrong number of arguments" && usage)
nodeDir=$(realpath ${1})
[ -d ${nodeDir} ] || (echo "Not a directory NODE_DIR: ${nodeDir}" && usage)
sk=${2}
[ -f ${sk} ] || (echo "Not a file KEY: ${sk}" && usage)
amount=${3}
[ -n "${amount}" ] || (echo "Missing argument: amoung of LOVELACE" && usage)
export CARDANO_NODE_SOCKET_PATH="${nodeDir}/node.socket"
vk=${sk%.sk}.vk
if [[ ! -f "${vk}" ]]; then
cardano-cli key verification-key --signing-key-file ${sk} --verification-key-file ${vk}
fi
addr=$(cardano-cli address build --mainnet --payment-verification-key-file $vk)
utxo=$(cardano-cli query utxo \
--cardano-mode --epoch-slots 21600 \
--mainnet \
--address ${addr} \
--out-file /dev/stdout)
totalLovelace=$(echo ${utxo} | jq -r 'reduce .[] as $item (0; . + $item.value.lovelace)')
[ ${totalLovelace} -eq 0 ] && echo "Error: insufficient funds" && exit 1
entries=$(echo ${utxo} | jq "to_entries|sort_by(.value.value.lovelace)|last")
input=$(echo ${entries} | jq '.key' | tr -d '"')
fuelAmount=$(echo ${entries} | jq ".value.value.lovelace - ${amount}")
tx=$(mktemp)
cardano-cli transaction build \
--babbage-era \
--cardano-mode --epoch-slots 21600 \
--mainnet \
--script-valid \
--tx-in ${input} \
--tx-out ${addr}+${fuelAmount} \
--tx-out-datum-hash "a654fb60d21c1fed48db2c320aa6df9737ec0204c0ba53b9b94a09fb40e757f3" \
--change-address ${addr} \
--out-file ${tx}
cardano-cli transaction sign \
--tx-body-file ${tx} \
--signing-key-file $sk \
--out-file ${tx}.signed
echo "-----------------------------------------------"
echo "Prepared transaction in ${tx}.signed, for details use:"
echo "cardano-cli transaction view --tx-file ${tx}.signed"
echo "-----------------------------------------------"
read -p "Submit transaction now? Y/n" -n 1 -r
echo
echo "-----------------------------------------------"
if [[ $REPLY =~ ^[Yy]$ ]]; then
cardano-cli transaction submit \
--cardano-mode \
--epoch-slots 21600 \
--mainnet \
--tx-file ${tx}.signed
rm ${tx}.signed
fi
Bumps [bech32](https://github.com/rust-bitcoin/rust-bech32) from 0.8.1 to 0.9.1. - [Changelog](https://github.com/rust-bitcoin/rust-bech32/blob/master/CHANGELOG.md) - [Commits](https://github.com/rust-bitcoin/rust-bech32/compare/v0.8.1...v0.9.1) --- updated-dependencies: - dependency-name: bech32 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]>
Bumps [log](https://github.com/rust-lang/log) from 0.4.17 to 0.4.18. - [Release notes](https://github.com/rust-lang/log/releases) - [Changelog](https://github.com/rust-lang/log/blob/master/CHANGELOG.md) - [Commits](https://github.com/rust-lang/log/compare/0.4.17...0.4.18) --- updated-dependencies: - dependency-name: log dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [tokio](https://github.com/tokio-rs/tokio) from 1.28.1 to 1.28.2. - [Release notes](https://github.com/tokio-rs/tokio/releases) - [Commits](https://github.com/tokio-rs/tokio/compare/tokio-1.28.1...tokio-1.28.2) --- updated-dependencies: - dependency-name: tokio dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
PLT-5901 Implemented checks for valid network addresses.
fix: tuple clause must preserve previous clause properties state
fix: rearrange clauses and fill in gaps now handles nested patterns in a uniform way fix: discards in records was being sorted incorrectly leading to type issues chore: remove some filter maps in cases where None is impossible anyway chore: some refactoring on a couple functions to clean up
fix: tuple clause must preserve previous clause properties state
feat: disable openapi