INNER CODE UNIT · Rust

sign_call

Quantova/QCore.js · src/lib.rs:143

pub fn sign_call(
    seed_bytes: &[u8],
    index: u64,
    target: &str,
    args_hex: &str,
    nonce: u64,
    meter_limit: u64,
    fee: &str,
    chain_id: u64,
    valid_until: u64,
    transfer_fee: Option<String>,
) -> Result<String, JsError> {
    let master = seed(seed_bytes)?;
    if !qcore::valid_address(target) {
        return Err(JsError::new("the target is not a q1 address"));
    }
    let args = qcore::json::from_hex(args_hex).map_err(|e| JsError::new(&e))?;
    let fee = whole(fee, "fee")?;

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…