Skip to content

Latest commit

 

History

History
13 lines (7 loc) · 812 Bytes

design_pattern_decisions.md

File metadata and controls

13 lines (7 loc) · 812 Bytes

Applied Design Patterns

Inter-Contract Execution

  • The Employees, DiscussionBoard and Discusstion smart contracts contain functions which execute the XABER and Badges smart contracts to transact the ERC20 and ERC1155 tokens

Inheritance and Interfaces

  • Most smart contracts in this project inherit from one or more smart contracts from OpenZeppelin smart contract library. Besides, due to the uses of GSN, some smart contracts also inherit from OpenGSN library

Access Control Design Patterns

  • The XABER and Badges smart contracts extend Accesscontrol from OpenZeppelin library to control the permission for mint and burnFrom functions. Besides, the Discussion smart contract also adopt the Ownable from the library to control the access of approveReply function.