Skip to main content
added 9 characters in body
Source Link

You can use the UnpackIntoInterface() method which takes three parameters

event := struct {
    Key   [32]byte
    Value [32]byte
}{}
_ = contractAbi.UnpackIntoInterface(&event, "ItemSet", vLog.Data)
fmt.Println(string(event.Key[:]))   // foo
fmt.Println(string(event.Value[:])) // bar

You can use the UnpackIntoInterface which takes three parameters

event := struct {
    Key   [32]byte
    Value [32]byte
}{}
_ = contractAbi.UnpackIntoInterface(&event, "ItemSet", vLog.Data)
fmt.Println(string(event.Key[:]))   // foo
fmt.Println(string(event.Value[:])) // bar

You can use the UnpackIntoInterface() method which takes three parameters

event := struct {
    Key   [32]byte
    Value [32]byte
}{}
_ = contractAbi.UnpackIntoInterface(&event, "ItemSet", vLog.Data)
fmt.Println(string(event.Key[:]))   // foo
fmt.Println(string(event.Value[:])) // bar
Source Link

You can use the UnpackIntoInterface which takes three parameters

event := struct {
    Key   [32]byte
    Value [32]byte
}{}
_ = contractAbi.UnpackIntoInterface(&event, "ItemSet", vLog.Data)
fmt.Println(string(event.Key[:]))   // foo
fmt.Println(string(event.Value[:])) // bar