You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If we want to add benchmarks for a new contract and/or a new benchmarking function it's not clear where we should add it.
The codebases violates the SRP in many places.
Expected Behavior
GatlingShooterSetup should only be responsible for doing the setup for one contract. deploy_erc20 should be replaced by deploy_contract.
Here is an example for an ERC20Shooter, from this example it's very clear how one would add an ERC721Shooter or any other shooter for another contract.
With such a design we can simplify the whole codebase and get rid of all specific functions for erc20/erc721.
Most of the code for erc20 transfers and erc721 being fairly similar we can abstract the excution logic under the Shooter trait and let the client implement its own logic.
This is a very simple spec, as the refactor progresses we can refine it to our needs. Probably we will want to have all the core similar logic under another trait GooseExecutor that would be able to operate on any object that implements the Shooter trait.
Current Behavior
If we want to add benchmarks for a new contract and/or a new benchmarking function it's not clear where we should add it.
The codebases violates the SRP in many places.
Expected Behavior
GatlingShooterSetup
should only be responsible for doing the setup for one contract.deploy_erc20
should be replaced bydeploy_contract
.Here is an example for an ERC20Shooter, from this example it's very clear how one would add an ERC721Shooter or any other shooter for another contract.
With such a design we can simplify the whole codebase and get rid of all specific functions for erc20/erc721.
Most of the code for erc20 transfers and erc721 being fairly similar we can abstract the excution logic under the Shooter trait and let the client implement its own logic.
This is a very simple spec, as the refactor progresses we can refine it to our needs. Probably we will want to have all the core similar logic under another trait
GooseExecutor
that would be able to operate on any object that implements theShooter
trait.The text was updated successfully, but these errors were encountered: