Skip to content

Simple implementation of off-chain payment processing engine

Notifications You must be signed in to change notification settings

smallstepman/interview-task

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

33 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Payment Engine

Usage

Run

cargo run -- input_file.csv

Test

cargo test

Dependencies

  • clap - parse CLI input, a conciouss overkill
  • csv - csv parsing and building
  • rust_decimal - never handle money data with floats
  • serde - well, serialization and deserialization
  • trycmd - e2e tests, with test cases self-documented in a markdown file: ./tests/README.md
  • typestate - cool macro to skip on writing bunch of boilerplate code when using typestate pattern, and also, automatically provides awesome UML visualization of finite state machine it aids to produce

Unsafe stuff

  • Nada

Missed out on some things

  • 100% test-coverage
  • deep analysis and correct implementation of all business use cases and edge cases
  • beautiful error logs

About

Simple implementation of off-chain payment processing engine

Topics

Resources

Stars

Watchers

Forks

Languages