| Algorithm 2 Ban Enterprise | |
| Input: EnterpiseType, EnterpriseEA | |
| Output: An event declaring the user has been banned | |
|
Data: EnterpiseType is the type of agricultural supply chain enterprise EnterpriseEA is the Ethereum Address of the enterprise to be banned | |
| 1. | if FunctionCaller is not Government Regulatorthen |
| 2. | Display an error notification “Only regulator can operate!” |
| 3. | end |
| 4. | else |
| 5. | if EnterpriseType is.ProductionEnterprise then |
| 6. | producers[addr] = false |
| 7. | else if EnterpriseType is ProcessingEnterprise then |
| 8. | processors[addr] = false |
| 9. | else if EnterpriseType is LogisticEnterprise then |
| 10. | logistics[addr] = false |
| 11. | else if EnterpriseType is SalesEnterprise then |
| 12. | seller[addr] = false |
| 13. | end |
| 14. | end |