diff --git a/core/chains/evm/txm/clientwrappers/dual_broadcast_client.go b/core/chains/evm/txm/clientwrappers/dual_broadcast_client.go index 77111c2d48c..da79abc8897 100644 --- a/core/chains/evm/txm/clientwrappers/dual_broadcast_client.go +++ b/core/chains/evm/txm/clientwrappers/dual_broadcast_client.go @@ -15,6 +15,8 @@ import ( "github.com/ethereum/go-ethereum/common/hexutil" "github.com/ethereum/go-ethereum/crypto" + "github.com/smartcontractkit/chainlink-common/pkg/logger" + "github.com/smartcontractkit/chainlink/v2/core/chains/evm/client" "github.com/smartcontractkit/chainlink/v2/core/chains/evm/txm/types" ) @@ -27,13 +29,15 @@ type DualBroadcastClient struct { c client.Client keystore DualBroadcastClientKeystore customURL *url.URL + lggr logger.Logger } -func NewDualBroadcastClient(c client.Client, keystore DualBroadcastClientKeystore, customURL *url.URL) *DualBroadcastClient { +func NewDualBroadcastClient(c client.Client, keystore DualBroadcastClientKeystore, customURL *url.URL, lggr logger.Logger) *DualBroadcastClient { return &DualBroadcastClient{ c: c, keystore: keystore, customURL: customURL, + lggr: lggr, } } @@ -70,6 +74,7 @@ func (d *DualBroadcastClient) SendTransaction(ctx context.Context, tx *types.Tra if meta.DualBroadcastParams != nil { params = *meta.DualBroadcastParams } + d.lggr.Debugw("Sending transaction to DualBroadcast API", "URL", d.customURL.String()+"?"+params) body := []byte(fmt.Sprintf(`{"jsonrpc":"2.0","method":"eth_sendRawTransaction","params":["%s"], "id":1}`, hexutil.Encode(data))) if _, err = d.signAndPostMessage(ctx, tx.FromAddress, body, params); err != nil { return err diff --git a/core/chains/evm/txmgr/builder.go b/core/chains/evm/txmgr/builder.go index 421d8f0eb2f..95f846f84a6 100644 --- a/core/chains/evm/txmgr/builder.go +++ b/core/chains/evm/txmgr/builder.go @@ -138,7 +138,7 @@ func NewTxmV2( } var c txm.Client if chainConfig.ChainType() == chaintype.ChainDualBroadcast { - c = clientwrappers.NewDualBroadcastClient(client, keyStore, txmV2Config.CustomURL()) + c = clientwrappers.NewDualBroadcastClient(client, keyStore, txmV2Config.CustomURL(), lggr) } else { c = clientwrappers.NewChainClient(client) }