pub fn collect_pymtchan(
    pch_address: String,
    from_address: String,
    nonce: u64,
    gas_limit: i64,
    gas_fee_cap: String,
    gas_premium: String,
) -> Result<Message, SignerError> {
    // TODO:  don't hardcode gas limit and gas price; use a gas estimator!
    let pch_collect_message = Message {
        version: 0,
        to: fvm_shared::address::Address::from_str(&pch_address)?,
        from: fvm_shared::address::Address::from_str(&from_address)?,
        sequence: nonce,
        value: fvm_shared::econ::TokenAmount::from_str("0")?,
        gas_limit,
        gas_fee_cap: fvm_shared::econ::TokenAmount::from_str(&gas_fee_cap)?,
        gas_premium: fvm_shared::econ::TokenAmount::from_str(&gas_premium)?,
        method_num: paych::Method::Collect as u64,
        params: RawBytes::new(vec![]),
    };

    Ok(pch_collect_message)
}
/// Utility function to generate a payment channel collect message.  Returns unsigned message.
///
/// # Arguments
///
/// * `pch_address` - A string address
/// * `from_address` - A string address
/// * `nonce` - Nonce of the message; should be from_address's MpoolGetNonce() value
///
Utility function to generate a payment channel collect message.  Returns unsigned message.
Utility function to generate a payment channel collect message . Returns unsigned message .
pub fn collect_pymtchan(
    pch_address: String,
    from_address: String,
    nonce: u64,
    gas_limit: i64,
    gas_fee_cap: String,
    gas_premium: String,
) -> Result<Message, SignerError> {
    // TODO:  don't hardcode gas limit and gas price; use a gas estimator!
    let pch_collect_message = Message {
        version: 0,
        to: fvm_shared::address::Address::from_str(&pch_address)?,
        from: fvm_shared::address::Address::from_str(&from_address)?,
        sequence: nonce,
        value: fvm_shared::econ::TokenAmount::from_str("0")?,
        gas_limit,
        gas_fee_cap: fvm_shared::econ::TokenAmount::from_str(&gas_fee_cap)?,
        gas_premium: fvm_shared::econ::TokenAmount::from_str(&gas_premium)?,
        method_num: paych::Method::Collect as u64,
        params: RawBytes::new(vec![]),
    };
    Ok(pch_collect_message)
}
pub fn collect_pymtchan ( pch_address : String , from_address : String , nonce : u64 , gas_limit : i64 , gas_fee_cap : String , gas_premium : String , ) -> Result < Message , SignerError > { // TODO:  don't hardcode gas limit and gas price; use a gas estimator! let pch_collect_message = Message { version : 0 , to : fvm_shared :: address :: Address :: from_str ( & pch_address ) ? , from : fvm_shared :: address :: Address :: from_str ( & from_address ) ? , sequence : nonce , value : fvm_shared :: econ :: TokenAmount :: from_str ( " " ) ? , gas_limit , gas_fee_cap : fvm_shared :: econ :: TokenAmount :: from_str ( & gas_fee_cap ) ? , gas_premium : fvm_shared :: econ :: TokenAmount :: from_str ( & gas_premium ) ? , method_num : paych :: Method :: Collect as u64 , params : RawBytes :: new ( vec ! [ ] ) , } ; Ok ( pch_collect_message ) }
Utility function to generate a payment channel collect message.
Utility function to generate a payment channel collect message .
pch_address
String
from_address
String
nonce
u64
gas_limit
i64
gas_fee_cap
String
gas_premium
String
pch_address
String
from_address
String
nonce
u64
gas_limit
i64
gas_fee_cap
String
gas_premium
String