Hello, everyone. Tell me how to do it better. The contract has an enum of 3 values. And also in the contract I get two ids (as a string). e.g. '285' and '57774'. How do I deterministically assign (associate) an id to an enum value? I came up with the idea to make a function that converts a string to int, compares numbers, and assigns the smaller of them to the first value, and the larger to the second. How stupid is this?
Jul 14, 2021, 6:38 PM