I've been working on a Smart Contract and now want to create a UML class diagram but don't want to do it by hand. I've found plenty of tools for UML to Solidity conversion but I couldn't find anything from Solidity to UML? Does anyone know such a tool or knows why there is no such thing yet (it should not be that complicated to create one, should it?)?

Thanks and best regards! carbee

1 Answer 1


Doesn't exist actually a Smart Contrac-UML conversor right now, like not exist too information or a clear guide for define "dessing patrons" inside the blockchain cause it works "diferent" as other lenguages.

This technology is really new and need evolve more for try to standarised somethings things like this, so right now you need to wait.

But i can give you some tips for try to define a UML with smart contracts, try to define contracts similar or like a typical class, so you can have one example like a typical 1 => N case, with this :

contract Factory {
  bytes32[] Names;
  address[] newContracts;

  function createContract (bytes32 name) {
      address newContract = new Contract(name);

  function getName (uint i) {
      Contract con = Contract(newContracts[i]);
      Names[i] = con.Name();

contract Contract {
  bytes32 public Name;

  function Contract (bytes32 name) {
      Name = name;


You maybe can define a relation here between the Factory contract and the Contract called contract, like 1 => N.

  • Thanks for your answer! I'm aware that Solidity might deviate from other languages in some aspects but wouldn't it be possible to define kind of a reference standard (e.g the one that is used by the UML2Solidity Compiler)? Or could you provide an example of a structure that could not be represented in such a way?
    – cabeer
    Jun 1, 2017 at 9:46
  • @carbee but for examples in visibility of the UML2SolidityCompiler, for me package and external not are exactly equal. And for example of a structure that could not be represented in such way maybe is not the real problem, the problem here is the scalability of this structure, because in other language you can do the UML and you can know what is the best way for this, but here now is really hard cause is not the same use my example or use other similar than my example but more complex cause the cost is very diferent (transactions, time, gas, ether), so you need to think better this structure..
    – Gawey
    Jun 1, 2017 at 10:14
  • this is my opinion ofc xd
    – Gawey
    Jun 1, 2017 at 10:14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.