sahina / toy-trx

Repository from Github https://github.comsahina/toy-trxRepository from Github https://github.comsahina/toy-trx

Toy Transaction Engine

CLI for simple (toy) transaction engine.

Application processes an input transactions file and produces output as results.

You can write output of application into a file as shown below.

Usage

Input

Pass csv file name to be processed.

cargo run — transactions.csv > accounts.csv

csv file should be in this format:

type,     client,  tx, amount
deposit        1,   1,    1.0
withdrawal     2,   2,    2.0
...

Output

Output will be csv formatted as below:

client, available, held, total, locked
     1,       1.5,  0.0,   1.5,  false
     2,       2.0,  0.0,   2.0,  false

Tests

Run tests with:

cargo test

About


Languages

Language:Rust 100.0%