Skip to main content

Smart Contract Code Generation from Platform Specific Model for Hyperledger Go

  • Conference paper
  • First Online:
Trends and Applications in Information Systems and Technologies (WorldCIST 2021)

Abstract

Model Driven Architecture (MDA) together with Unified Modelling Language (UML) presents a framework which transfers the emphasis of development from source code to the higher level of abstraction i.e., models. In this paper, we demonstrate the application of MDA principles for generating smart contract code executed on a blockchain. Even though blockchain smart contracts are not in all cases a classic type of object-oriented software, which UML is intended for, we demonstrate the possibility to adapt to this specific implementation platform. MDA Platform Specific Model (PSM) is used as an input for transformation algorithm which maps PSM metamodel elements to Go Chaincode elements and produces Go chaincode. In PSM, UML class and sequence diagrams are used for specifying structural and behavioural aspects of the smart contract. MOFM2T transformation language and Acceleo tool are employed for the implementation of this algorithm. The results of the algorithm execution were demonstrated using example chaincode for machine learning model validation.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Subscribe and save

Springer+ Basic
€32.70 /Month
  • Get 10 units per month
  • Download Article/Chapter or eBook
  • 1 Unit = 1 Article or 1 Chapter
  • Cancel anytime
Subscribe now

Buy Now

Chapter
EUR 29.95
Price includes VAT (France)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
EUR 160.49
Price includes VAT (France)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
EUR 210.99
Price includes VAT (France)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Similar content being viewed by others

References

  1. Hewa, T., Ylianttila, M., Liyanage, M.: Survey on Blockchain based smart contracts: applications, opportunities and challenges. J. Netw. Comput. Appl. (2020). https://doi.org/10.1016/j.jnca.2020.102857

    Article  Google Scholar 

  2. Khaled Salah, M., Rehman, H.U., Nizamuddin, N., Al-Fuqaha, A.: Blockchain for AI: review and open research challenges. IEEE Access 7, 10127–10149 (2019). https://doi.org/10.1109/ACCESS.2018.2890507

    Article  Google Scholar 

  3. The Linux Foundation Hyperledger Fabric. https://www.hyperledger.org/use/fabric. Accessed 06 Nov 2020

  4. Pastor, O., España, S., Panach, J.I., Aquino, N.: Model-driven development. Informatik Spektrum 31, 394–407 (2008). https://doi.org/10.1007/s00287-008-0275-8

    Article  Google Scholar 

  5. Pastor, O., Molina, J.C.: Model-Driven Architecture in Practice. Springer (2007). https://www.omg.org/cgi-bin/doc?ormsc/14-06-01

    Article  Google Scholar 

  6. Object Management Group Model Driven Architecture (MDA) MDA Guide rev. 2.0. https://www.omg.org/cgi-bin/doc?ormsc/14-06-01. Accessed 06 Nov 2020

  7. Object Management Group UML 2.5 Specification. https://www.omg.org/spec/UML/2.5/PDF. Accessed 06 Nov 2020

  8. Jurgelaitis, M., Drungilas, V., Butkienė, R., Vaičiukynas, E., Čeponienė, L.: Modelling principles for blockchain-based implementation of business or scientific processes. In: CEUR workshop proceedings: IVUS (2019). http://ceur-ws.org/Vol-2470/p13.pdf

  9. Ciccozzi, F., Malavolta, I., Selic, B.: Execution of UML models: a systematic review of research and practice. Softw. Syst. Model. 18, 2313–2360 (2019). https://doi.org/10.1007/s10270-018-0675-4

    Article  Google Scholar 

  10. Sousa, V.A., Burnay, C., Snoeck, M.: B-MERODE: a model-driven engineering and artifact-centric approach to generate Blockchain-based information systems. In: Advanced Information Systems Engineering. Springer, Cham (2020). https://doi.org/10.1007/978-3-030-49435-3_8

  11. López-Pintado, O., García-Bañuelos, L., Dumas, M., Weber, I., Ponomarev, A.: CATERPILLAR: a business process execution engine on the ethereum Blockchain. Softw. Pract. Experience 49(7), 1162-1193 (2018)

    Google Scholar 

  12. Sebastián, G., A.Gallud, J., Tesoriero, R.: Code generation using model driven architecture: a systematic mapping study. J. Comput. Lang. 56, p. 100935 (2020). https://doi.org/10.1016/j.cola.2019.100935

  13. Syahputra, H., Weigand, H.: The development of smart contracts for heterogeneous Blockchains. In: Proceedings of the I-ESA Conferences, vol. 9. Springer (2019). https://doi.org/10.1007/978-3-030-13693-2_19

  14. Wöhrer, M., Zdun, U.: Domain specific language for smart contract development. In: 2020 IEEE International Conference on Blockchain and Cryptocurrency (ICBC), pp. 19 (2020). https://doi.org/10.1109/ICBC48266.2020.9169399

  15. He, X., Qin, B., Zhu, Y., Chen, X., Liu, Y.: SPESC: a specification language for smart contracts. In: 42nd Annual Computer Software and Applications Conference, pp. 132–137. IEEE (2018). https://doi.org/10.1109/COMPSAC.2018.00025

  16. Górski, T., Bednarski, J.: Transformation of the UML deployment model into a distributed ledger network configuration. In: 2020 IEEE 15th International Conference of System of Systems Engineering (SoSE), pp. 255–260. IEEE (2020). https://doi.org/10.1109/SoSE50414.2020.9130492

  17. Zupan, N., Kasinathan, P., Cuellar, J., Sauer, M.: Secure smart contract generation based on petri nets. In: Rosa Righi R., Alberti A., Singh M. (eds.) Blockchain Technology for Industry 4.0. Blockchain Technologies. Springer (2020). https://doi.org/10.1007/978-981-15-1137-0_4

  18. Package shim – GoDoc. https://godoc.org/github.com/hyperledger/fabric-chaincode-go/shim. Accessed 06 Nov 2020

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Mantas Jurgelaitis .

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2021 The Author(s), under exclusive license to Springer Nature Switzerland AG

About this paper

Check for updates. Verify currency and authenticity via CrossMark

Cite this paper

Jurgelaitis, M., Drungilas, V., Čeponienė, L., Vaičiukynas, E., Butkienė, R., Čeponis, J. (2021). Smart Contract Code Generation from Platform Specific Model for Hyperledger Go. In: Rocha, Á., Adeli, H., Dzemyda, G., Moreira, F., Ramalho Correia, A.M. (eds) Trends and Applications in Information Systems and Technologies. WorldCIST 2021. Advances in Intelligent Systems and Computing, vol 1368. Springer, Cham. https://doi.org/10.1007/978-3-030-72654-6_7

Download citation

Publish with us

Policies and ethics