0

I am currently having a project where a banking system is to be made, what is the approach to get into it. Its suggested to write the tests first and then proceed with the smart contract. What are the approaches to write a test with the "functions' " functionality in mind?

1

Banking is a fairly broad topic, imgur you need to plan out the plan what the smart contract does. Personally speaking, I prefer to write functions and then test them, but these is no reason when tests can't be written first.

In general, I recommend focus on error conditions (use require, assert and revert conditions first), and then check the files.

But I suppose the differences between typical testing and smart contract testing need to be considered (overflow, underflow and entrancy).

See Smart Contract Exploits

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.