From 9ff56df8d21ccebfeaf6e3fcd5ba50d974fb317c Mon Sep 17 00:00:00 2001 From: Conor Schaefer Date: Tue, 4 Jun 2024 10:48:18 -0700 Subject: [PATCH] CLEANUP: add fee support Hooks up the plumping for fees in Galileo, but doesn't consume any of the neat CLI args: it's just hardcoding low fees. --- src/sender.rs | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/sender.rs b/src/sender.rs index ea4a404..282a3be 100644 --- a/src/sender.rs +++ b/src/sender.rs @@ -12,6 +12,7 @@ use penumbra_proto::view::v1::broadcast_transaction_response::Status as Broadcas use penumbra_asset::Value; use penumbra_custody::{AuthorizeRequest, CustodyClient}; use penumbra_fee::FeeTier; +use penumbra_fee::GasPrices; use penumbra_keys::{Address, FullViewingKey}; use penumbra_txhash::TransactionId; use penumbra_view::ViewClient; @@ -74,7 +75,14 @@ where let mut planner = Planner::new(OsRng); - // Hardcode low fees to unbreak txs. + // Here we hardcode low fees. It'd be nice to override via CLI arg. + // Look up GasPrices, because merely calling `set_fee_tier` is not sufficient. + let gp: GasPrices = self2 + .view + .gas_prices() + .await + .expect("failed to look up GasPrices"); + planner.set_gas_prices(gp); planner.set_fee_tier(FeeTier::Low); for value in values {