From 34146400fcea63834953574e0ddd5fcafdbee5e1 Mon Sep 17 00:00:00 2001 From: sweexordious Date: Tue, 2 Jul 2024 17:21:11 +0100 Subject: [PATCH] fix: logs + data decrypt --- replay/evm.go | 3 ++- replay/replayer.go | 5 +++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/replay/evm.go b/replay/evm.go index 359f90e..583919f 100644 --- a/replay/evm.go +++ b/replay/evm.go @@ -115,7 +115,7 @@ func submitProof( waitTimeout time.Duration, ) error { for i := 0; i < 10; i++ { - logger.Info("submitting proof", "nonce", proofNonce, "gas_price", opts.GasPrice.Int64()) + logger.Info("submitting transaction for proof", "nonce", proofNonce, "gas_price", opts.GasPrice.Int64()) tx, err := succinctGateway.FulfillCall( opts, args.FunctionID, @@ -128,6 +128,7 @@ func submitProof( if err != nil { return err } + logger.Info("transaction submitted", "hash", tx.Hash().Hex()) _, err = waitForTransaction(ctx, logger, client, tx, waitTimeout) if err != nil { actualNonce, err := targetBlobstreamXContract.StateProofNonce(&bind.CallOpts{}) diff --git a/replay/replayer.go b/replay/replayer.go index eb41718..12a7e45 100644 --- a/replay/replayer.go +++ b/replay/replayer.go @@ -82,7 +82,7 @@ func Follow( logger.Debug("decoding the proof") rawMap := make(map[string]interface{}) - err = abi.UnpackIntoMap(rawMap, "fulfillCall", tx.Data()) + err = abi.UnpackIntoMap(rawMap, "fulfillCall", tx.Data()[4:]) if err != nil { return err } @@ -229,7 +229,8 @@ func Catchup( logger.Debug("decoding the proof") rawMap := make(map[string]interface{}) - err = abi.UnpackIntoMap(rawMap, "fulfillCall", tx.Data()) + inputArgs := abi.Methods["fulfillCall"].Inputs + err = inputArgs.UnpackIntoMap(rawMap, tx.Data()[4:]) if err != nil { return err }