From 0c58e0ac5b04d79c1329fec62a04ce89d9e96b56 Mon Sep 17 00:00:00 2001 From: David Terry Date: Wed, 3 Oct 2018 18:21:27 +0200 Subject: [PATCH] Vat.fold: verify that the event signature is correct --- pkg/transformers/vat_fold/converter.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pkg/transformers/vat_fold/converter.go b/pkg/transformers/vat_fold/converter.go index 74fb3b63..6270c647 100644 --- a/pkg/transformers/vat_fold/converter.go +++ b/pkg/transformers/vat_fold/converter.go @@ -53,5 +53,10 @@ func verifyLog(log types.Log) error { return errors.New("log missing topics") } + sig := log.Topics[0].String() + if sig != shared.VatFoldSignature { + return errors.New("log is not a Vat.fold event") + } + return nil }