hyperledger-labs / pdo-contracts

Apache License 2.0
3 stars 5 forks source link

Pull out modules that are used across multiple contract families into a common library #25

Open cmickeyb opened 5 months ago

cmickeyb commented 5 months ago

There are several useful utilities (such as the jupyter module in exchange or the framework for test harnesses) that are shared (or simply re-implemented) in several of the contract families. Would be good to pull these out into a shared library of utilities.

cmickeyb commented 5 months ago

run_tests.sh

there are three parts to run-tests.sh in the different contract families. the first part parses the parameters and sets up the environment. the second part creates whatever contracts are necessary (e.g. both exchange and digital asset create some assets to be used for later tests). the third part is the contract family specific updates.

the basic parameter evaluation is consistent across contract families. its interface is largely determined by the cmake test harness. this would be an ideal candidate for moving up.

the asset creation might be something to pull into its own file in the exchange contract family so it could easily be re-used. i do think this is lower priority and may lose something from generalization.

the final part is specific to the test and should not be canonicalized.