Expand description
§Howmuch
A library providing helpers for various StarkNet fees related tasks. It can be used as a library or as a CLI.
§Library
§Fees
§Estimate on network
Estimate the fees of a transaction on another network.
use howmuch_rs::{estimate_cost_on_network, model::Transaction};
let tx_hash = "0x073251e7ff3843c4954aa2e7f38d8c29034e34a1ddbaeb1e62605ec10ca22367";
let source_network_gateway_url = "https://alpha4-2.starknet.io/feeder_gateway";
let destination_network_gateway_url = "https://alpha-mainnet.starknet.io/feeder_gateway";
let source_block_number = Some(21410);
let destination_block_number = Some(15925);
let fees = estimate_cost_on_network(
tx_hash,
&source_network_gateway_url,
&destination_network_gateway_url,
&source_block_number,
&destination_block_number
).unwrap();
println!("{}", fees);
§CLI
§Fees
§Estimate on network
Estimate the fees of a transaction on another network.
$ howmuch fees estimate-on-network \
--tx-hash 0x073251e7ff3843c4954aa2e7f38d8c29034e34a1ddbaeb1e62605ec10ca22367 \
--source-network-gateway-url https://alpha4-2.starknet.io/feeder_gateway \
--destination-network-gateway-url https://alpha-mainnet.starknet.io/feeder_gateway \
--source-block-number 21410 \
--destination-block-number 15925
Modules§
Functions§
- compute_
actual_ tx_ fee - Compute the actuall fee of a transaction.
- compute_
static_ tx_ fee - Compute the static part of the transaction fee.
- estimate_
cost_ on_ network - Simulate cost of a transaction on another network.
- http_
get - Raw http GET request.
- query_
block - Query a block from a network.
- query_
tx - Query a transaction from a network.
- query_
tx_ receipt - Query a transaction from a network.