lamarge 0.5.1

Client for the LaMarge API: sign-in, takes, transfers, withdrawals and market making, each request checked before it is signed.
Documentation
use super::*;

#[test]
fn transfer_out_equals_the_typescript_sdks_calldata() {
    let word = |value: U256| format!("{value:064x}");
    let token = U256::from_be_slice(deployments::GMX.token.as_slice());
    let amount = U256::from(123_456_789u64);
    let expected = format!(
        "0x0b9066d9{}{}{}{}{}{}{}",
        word(U256::from(32u8)),
        word(token),
        word(amount),
        word(U256::ZERO),
        word(U256::ZERO),
        word(U256::from(160u8)),
        word(U256::ZERO),
    );
    assert_eq!(transfer_out(amount).to_string(), expected);
}