Strategy Registry: an optimized implementation of the Strategy design pattern in solidity for the Ethereum Blockchain
Hamza Tamenaoul, Mahmoud El Hamlaoui, Mahmoud Nassar
DOI: http://dx.doi.org/10.15439/2024F6780
Citation: Proceedings of the 19th Conference on Computer Science and Intelligence Systems (FedCSIS), M. Bolanowski, M. Ganzha, L. Maciaszek, M. Paprzycki, D. Ślęzak (eds). ACSIS, Vol. 39, pages 249–252 (2024)
Abstract. The strategy design pattern is an essential behavioral design pattern. When developing software it is relied upon for the development of modular components. Given the constraints inherent to the inner workings of the Blockchain and features offered by Smart Contract languages, some of the design patterns commonly used in software systems development cannot be naively implemented. This paper explores a new pattern implementation of the mentioned pattern in a contract oriented language aimed at Smart-Contracts development, specifically the solidity language. The pattern's implementations discussed in this paper are intended to be deployed and run on the Ethereum Blockchain.
References
- E. Freeman and E. Robson, Head first design patterns: a brain-friendly guide, Second release. in A brain-friendly guide. Beijing Boston Famham Sebastopol Tokyo: O’Reilly, 2014.
- Refactoring Guru, “Strategy,” Refactoring.guru, 2014. https://refactoring.guru/design-patterns/strategy
- “Solidity — Solidity 0.8.26 documentation,” docs.soliditylang.org. https://docs.soliditylang.org/en/v0.8.26/ (accessed May 28, 2024).
- B. Vitalik, “Ethereum white paper: A next-generation smart contract and decentralized application platform.” 2014. [Online]. Available: https://ethereum.org/content/whitepaper/whitepaper-pdf/Ethereum_Whitepaper_-_Buterin_2014.pdf
- “Contract Registry,” Blockchain Patterns. https://research.csiro.au/blockchainpatterns/general-patterns/contract-structural-patterns/contract-registry/ (accessed May 28, 2024).