I was doing a project, and I have an event
event AddedDoctor(
address indexed doctorAddress,
string indexed name,
string indexed doctorRegistrationId,
uint256 dateOfRegistration,
string specialization,
address hospitalAddress
);
I am not able to access all the parameters of this event to index it is The Graph
. I am facing two issues :
string indexed name
parameter is indexed so it is accessible byevent.params.name
but it is in theBytes
format. On searching the net I found that indexed strings or arrays are stored as hashes and not plain strings. How do I get unstuck.- I am not able to read unindexed parameters
string specialization
andaddress hospitalAddress
usingevent.params.specialization
andevent.params.hospitalAddress
. How do I access these unindexed parameters?
Basically I want to index all these event parameters in The Graph
for easy retrieval of data. How can I do that?