thehubbleproject / contracts

Smart contracts for OPRHub protocol ✌🏻
12 stars 10 forks source link

Use eth-waffle solidity mocks #74

Closed vaibhavchellani closed 3 years ago

vaibhavchellani commented 4 years ago

Currently writing tests is not a lot of fun because it takes a lot of time to deploy contract and debug. We are exploring options at the moment and the one that stands out is eth-waffle using which we could mock contracts as given here.

This issue is to track progress and discussions on how to improve testing framework in hubble-core

vaibhavchellani commented 4 years ago

Also it would be interesting to use fixtures from eth-waffle too!

vaibhavchellani commented 4 years ago

Still researching what might be the best and least dev intensive way to handle this.

ChihChengLiang commented 4 years ago

My current workaround is using npx truffle development. Run migrate --reset, load deployed contract, then run the contract function. It makes iterating a single function faster.

vaibhavchellani commented 4 years ago

We also have in works test specific migrations, but we found that to be very dev intensive. We can use it for quick iterations tho

ChihChengLiang commented 3 years ago

We have waffle now, can close.