CRYPTO NEWS

How can i create a mapping properly?

I would like to create a mapping with a struct inside as key

struct MyMap {     bytes32 data1;     address data2;     string  data3; }  mapping(MyMap => bool) public currentMap; 

but i am getting this error:

Only elementary types, user defined value types, contract types or enums are allowed as mapping keys.

How can i create a mapping properly?

Shopping cart
There are no products in the cart!
Continue shopping
0