I have something like this in solidity:

struct Bid {
event BidEvent(Bid bid)

but when I try to read this event in Javascript, there's no data inside that I can access — no bid variable, none of the things inside it, nothing at all really.

Does this mean structs can't be put inside events?


I tried using a struct inside an event and receive compilation errors. You need to pass specific value type variables (address, uint, etc) into the event and then you could use these to access the full Bid struct object when the event gets triggered if you need the entire object.

Your Answer

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

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