I have a question:

Can a Contract accept a HashMap kind of a data structure or some kind of a JSON structure of the following format in its Constructor?

{key1 -> {val1, val2, val3}},
{key2 -> {val1, val2, val3}},
{key3 -> {val1, val2, val3}}

If it can, how to extract these (k, {v}) pairs in the contract and store them in some mapping?

Could someone please show me examples of both?


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.