1

If I have a contract that has a list of sellers, how would I code a simple contract that if some condition applies, the contract in an automatic way will increase the reputation/rating of the sender ??

1

This is a very broad question, but one solution would be to simply assign a mapping mapping(address => uint256) public rating that increments upon a good action and decrements upon a bad one.

For example, if the user successfully completes a payment, you can increment their rating mapping by one with rating[user] += 1.

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.