miden-node-utils 0.14.7

Miden node's shared utilities
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
use miden_protocol::asset::FungibleAsset;
use miden_protocol::block::FeeParameters;
use miden_protocol::testing::account_id::ACCOUNT_ID_NATIVE_ASSET_FAUCET;

/// Derive a default, zero valued fee, payable to
/// [`miden_protocol::testing::account_id::ACCOUNT_ID_NATIVE_ASSET_FAUCET`].
pub fn test_fee() -> FungibleAsset {
    let faucet = ACCOUNT_ID_NATIVE_ASSET_FAUCET.try_into().unwrap();
    FungibleAsset::new(faucet, 0).unwrap()
}

/// Derive the default fee parameters, compatible with [`fn test_fee`].
pub fn test_fee_params() -> FeeParameters {
    let faucet = ACCOUNT_ID_NATIVE_ASSET_FAUCET.try_into().unwrap();
    FeeParameters::new(faucet, 0).unwrap()
}