Skip to content

Commit

Permalink
evm: Pass value param to the txm (#13602)
Browse files Browse the repository at this point in the history
* evm: Pass value param to the txm

* changeset: Add changeset
  • Loading branch information
nickcorin authored Jun 24, 2024
1 parent 4c360d1 commit fc3a291
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .changeset/rotten-emus-work.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"chainlink": patch
---

#internal fixed a bug where we weren't sending the value param to the txm
6 changes: 6 additions & 0 deletions core/services/relay/evm/chain_writer.go
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,11 @@ func (w *chainWriter) SubmitTransaction(ctx context.Context, contract, method st
checker.CheckerType = txmgrtypes.TransmitCheckerType(methodConfig.Checker)
}

v := big.NewInt(0)
if value != nil {
v = value
}

req := evmtxmgr.TxRequest{
FromAddress: methodConfig.FromAddress,
ToAddress: common.HexToAddress(toAddress),
Expand All @@ -119,6 +124,7 @@ func (w *chainWriter) SubmitTransaction(ctx context.Context, contract, method st
Meta: &txmgrtypes.TxMeta[common.Address, common.Hash]{WorkflowExecutionID: meta.WorkflowExecutionID},
Strategy: w.sendStrategy,
Checker: checker,
Value: *v,
}

_, err = w.txm.CreateTransaction(ctx, req)
Expand Down

0 comments on commit fc3a291

Please sign in to comment.