bulloak icon indicating copy to clipboard operation
bulloak copied to clipboard

Refactor: create a cfg struct to inject dep

Open simon-something opened this issue 2 years ago • 0 comments

Right now, arg parsed with clap are passed as individual values to the relevant fn, as there are only 4 of them for scaffold (w, f, s and S) and 2 for check.

As more option are introduced, an ever-growing list of function parameters isn't sustainable and should rather be part of a struct (leaving the cli arg versus Bulloak.toml discussion for #38 ).

let scaffolder = Scaffolder::new(&self.solidity_version, &self.with_vm_skip);

would become

let scaffolder = Scaffolder::new(&self.cfg);

simon-something avatar Apr 17 '24 07:04 simon-something