arbiter
arbiter copied to clipboard
Abstract functionality out of main.
We should make all of the functionality in main as simple as possible so that it is just clap. For example, for sim we have this snippet:
async fn main() -> Result<(), Box<dyn Error>> {
let args = Args::parse();
match &args.command {
Some(Commands::Sim { config: _ }) => {
sim::sim()?;
}
}
This will let us grow the cli handling without making main unbelievably large. For each leg of the match &args.command, make each a single line command like sim::sim()?.
- [x] Move the logic for
chainout ofmain.rsand intochain.rs. - [x] Move the logic of
gbmout ofmain.rsand intogbm.rs. - [x] Move the logic of
ouout ofmain.rsand intoou.rs.
@0xEstelle I think you can take care of the tasks 2 and 3 here with your branch.
Def can!! Currently i have all the price processes defined in one file price_process.rs. are you thinking of isolating one each to its own file?
done