diff --git a/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/mercury/streams/streams.go b/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/mercury/streams/streams.go index eb115bb0ea2..3d308f72d44 100644 --- a/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/mercury/streams/streams.go +++ b/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/mercury/streams/streams.go @@ -28,6 +28,10 @@ import ( "github.com/smartcontractkit/chainlink/v2/core/utils" ) +const ( + zeroAddress = "0x0000000000000000000000000000000000000000" +) + type Lookup interface { Lookup(ctx context.Context, checkResults []ocr2keepers.CheckResult) []ocr2keepers.CheckResult } @@ -208,6 +212,7 @@ func (s *streams) CheckCallback(ctx context.Context, values [][]byte, lookup *me func (s *streams) makeCallbackEthCall(ctx context.Context, payload []byte, lookup *mercury.StreamsLookup, checkResults []ocr2keepers.CheckResult, i int) error { var responseBytes hexutil.Bytes args := map[string]interface{}{ + "from": zeroAddress, "to": s.registry.Address().Hex(), "data": hexutil.Bytes(payload), } diff --git a/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/mercury/streams/streams_test.go b/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/mercury/streams/streams_test.go index e7892f5c325..0a6a822c506 100644 --- a/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/mercury/streams/streams_test.go +++ b/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/mercury/streams/streams_test.go @@ -17,6 +17,7 @@ import ( "github.com/stretchr/testify/require" "github.com/smartcontractkit/chainlink-common/pkg/types" + "github.com/smartcontractkit/chainlink/v2/core/internal/testutils" "github.com/smartcontractkit/chainlink/v2/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/encoding" "github.com/smartcontractkit/chainlink/v2/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/mercury" @@ -243,6 +244,7 @@ func TestStreams_CheckErrorHandler(t *testing.T) { require.Nil(t, err) args := map[string]interface{}{ + "from": zeroAddress, "to": s.registry.Address().Hex(), "data": hexutil.Bytes(payload), } @@ -397,6 +399,7 @@ func TestStreams_CheckCallback(t *testing.T) { payload, err := s.abi.Pack("checkCallback", tt.lookup.UpkeepId, values, tt.lookup.ExtraData) require.Nil(t, err) args := map[string]interface{}{ + "from": zeroAddress, "to": s.registry.Address().Hex(), "data": hexutil.Bytes(payload), } @@ -948,6 +951,7 @@ func TestStreams_StreamsLookup(t *testing.T) { payload, err := s.abi.Pack("checkCallback", upkeepId, tt.values, tt.extraData) require.Nil(t, err) args := map[string]interface{}{ + "from": zeroAddress, "to": s.registry.Address().Hex(), "data": hexutil.Bytes(payload), } diff --git a/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/registry_check_pipeline.go b/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/registry_check_pipeline.go index 6a09ae1aca3..3e935d0adf1 100644 --- a/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/registry_check_pipeline.go +++ b/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/registry_check_pipeline.go @@ -22,6 +22,7 @@ const ( // checkBlockTooOldRange is the number of blocks that can be behind the latest block before // we return a CheckBlockTooOld error checkBlockTooOldRange = 128 + zeroAddress = "0x0000000000000000000000000000000000000000" ) type checkResult struct { @@ -233,6 +234,7 @@ func (r *EvmRegistry) checkUpkeeps(ctx context.Context, payloads []ocr2keepers.U Method: "eth_call", Args: []interface{}{ map[string]interface{}{ + "from": zeroAddress, "to": r.addr.Hex(), "data": hexutil.Bytes(payload), }, @@ -320,6 +322,7 @@ func (r *EvmRegistry) simulatePerformUpkeeps(ctx context.Context, checkResults [ Method: "eth_call", Args: []interface{}{ map[string]interface{}{ + "from": zeroAddress, "to": r.addr.Hex(), "data": hexutil.Bytes(payload), },