0
votes

I have recently been approached by one of my clients who wants to use smart contract to calculate revenue share with their vendors. There are legal contracts between the client and the vendor (basically client rents out spaces in their malls). Now, the revenue share model might differ from one vendor to another. So the condition will be different.

I need to write one modular smart contract which will serve all the purposes. Kindly suggest.

1

1 Answers

0
votes

You can write a base contract with all generic functions and than inherit this contract for each vendor contract. Something like this:

contract VendorA is LegalContract { ... }

On OpenZeppelin you can find a lot of good examples in this direction: https://openzeppelin.org