From 5daee38379495cd858d8022339b5e9202e2ef0aa Mon Sep 17 00:00:00 2001 From: Silas Lenihan <32529249+silaslenihan@users.noreply.github.com> Date: Wed, 10 Jul 2024 13:19:57 -0400 Subject: [PATCH] Added small check to allow for nil TxMeta in CW SubmitTransaction (#13805) * Added small check to allow for nil TxMeta in CW SubmitTransaction * Added changeset --- .changeset/neat-rockets-love.md | 5 +++++ core/services/relay/evm/chain_writer.go | 9 ++++++++- 2 files changed, 13 insertions(+), 1 deletion(-) create mode 100644 .changeset/neat-rockets-love.md diff --git a/.changeset/neat-rockets-love.md b/.changeset/neat-rockets-love.md new file mode 100644 index 00000000000..29fdcebe6e5 --- /dev/null +++ b/.changeset/neat-rockets-love.md @@ -0,0 +1,5 @@ +--- +"chainlink": minor +--- + +#internal Added small check to allow for nil TxMeta in CW SubmitTransaction diff --git a/core/services/relay/evm/chain_writer.go b/core/services/relay/evm/chain_writer.go index 3f2d0da499a..8e057d5da26 100644 --- a/core/services/relay/evm/chain_writer.go +++ b/core/services/relay/evm/chain_writer.go @@ -115,12 +115,19 @@ func (w *chainWriter) SubmitTransaction(ctx context.Context, contract, method st v = value } + var txMeta *txmgrtypes.TxMeta[common.Address, common.Hash] + if meta != nil && meta.WorkflowExecutionID != nil { + txMeta = &txmgrtypes.TxMeta[common.Address, common.Hash]{ + WorkflowExecutionID: meta.WorkflowExecutionID, + } + } + req := evmtxmgr.TxRequest{ FromAddress: methodConfig.FromAddress, ToAddress: common.HexToAddress(toAddress), EncodedPayload: calldata, FeeLimit: methodConfig.GasLimit, - Meta: &txmgrtypes.TxMeta[common.Address, common.Hash]{WorkflowExecutionID: meta.WorkflowExecutionID}, + Meta: txMeta, Strategy: w.sendStrategy, Checker: checker, Value: *v,