Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ require (
github.com/smartcontractkit/chainlink-common v0.6.1-0.20250407100046-dfdf9600557b
github.com/smartcontractkit/chainlink-framework/capabilities v0.0.0-20250408161305-721208f43882
github.com/smartcontractkit/chainlink-framework/chains v0.0.0-20250325121830-cfa9bf24c4f5
github.com/smartcontractkit/chainlink-framework/multinode v0.0.0-20250402142713-6529d36f91f3
github.com/smartcontractkit/chainlink-framework/multinode v0.0.0-20250409130234-ce7ec3a90ffd
github.com/stretchr/testify v1.10.0
github.com/tidwall/gjson v1.18.0
github.com/ugorji/go/codec v1.2.12
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -567,8 +567,8 @@ github.com/smartcontractkit/chainlink-framework/capabilities v0.0.0-202504081613
github.com/smartcontractkit/chainlink-framework/capabilities v0.0.0-20250408161305-721208f43882/go.mod h1:NVoJQoPYr6BorpaXTusoIH1IYTySCmanQ8Q1yv3mNh4=
github.com/smartcontractkit/chainlink-framework/chains v0.0.0-20250325121830-cfa9bf24c4f5 h1:3uQneNhdLsJToTKCV8/o2bsdn0e70sndSwxEiTEctgw=
github.com/smartcontractkit/chainlink-framework/chains v0.0.0-20250325121830-cfa9bf24c4f5/go.mod h1:tHem58EihQh63kR2LlAOKDAs9Vbghf1dJKZRGy6LG8g=
github.com/smartcontractkit/chainlink-framework/multinode v0.0.0-20250402142713-6529d36f91f3 h1:8+2KFkPYdCK9lHMK5D/+adw02iIjEV+5Uw4s7nMNsRI=
github.com/smartcontractkit/chainlink-framework/multinode v0.0.0-20250402142713-6529d36f91f3/go.mod h1:UsezB/51EAJ9FEBGn6ad2YtssgzWEIEpp3HyRM6a6iM=
github.com/smartcontractkit/chainlink-framework/multinode v0.0.0-20250409130234-ce7ec3a90ffd h1:fbOLXL+Fa7rZZX0oPhHk7dsmpfzk97qioUkJcCeyBR8=
github.com/smartcontractkit/chainlink-framework/multinode v0.0.0-20250409130234-ce7ec3a90ffd/go.mod h1:UsezB/51EAJ9FEBGn6ad2YtssgzWEIEpp3HyRM6a6iM=
github.com/smartcontractkit/libocr v0.0.0-20250328171017-609ec10a5510 h1:gm8Jli0sdkrZYnrWBngAkPSDzFDkdNCy1/Dj86kVtYk=
github.com/smartcontractkit/libocr v0.0.0-20250328171017-609ec10a5510/go.mod h1:Mb7+/LC4edz7HyHxX4QkE42pSuov4AV68+AxBXAap0o=
github.com/smarty/assertions v1.15.0/go.mod h1:yABtdzeQs6l1brC900WlRNwj6ZR55d7B+E8C6HtKdec=
Expand Down
2 changes: 1 addition & 1 deletion pkg/client/chain_client_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -786,7 +786,7 @@ func TestEthClient_ErroringClient(t *testing.T) {
require.Equal(t, multinode.ErrNodeError, err)

id := erroringClient.ConfiguredChainID()
require.Equal(t, id, big.NewInt(0))
require.Equal(t, id, big.NewInt(evmtypes.NullClientChainID))

_, err = erroringClient.CodeAt(ctx, common.Address{}, nil)
require.Equal(t, multinode.ErrNodeError, err)
Expand Down
4 changes: 3 additions & 1 deletion pkg/client/clienttest/clienttest.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,13 @@ import (

"github.com/ethereum/go-ethereum"
"github.com/stretchr/testify/mock"

"github.com/smartcontractkit/chainlink-evm/pkg/types"
)

func NewClientWithDefaultChainID(t testing.TB) *Client {
c := NewClient(t)
c.On("ConfiguredChainID").Return(big.NewInt(0)).Maybe()
c.On("ConfiguredChainID").Return(big.NewInt(types.NullClientChainID)).Maybe()
return c
}

Expand Down
5 changes: 3 additions & 2 deletions pkg/client/null_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,9 @@ func NewNullClient(cid *big.Int, lggr logger.Logger) *NullClient {
}

// NullClientChainID the ChainID that nullclient will return
// 0 is never used as a real chain ID so makes sense as a dummy value here
const NullClientChainID = 0
// hardcoded chainId is never used as a real chain ID so makes sense as a dummy value here
// can't use 0 because of introduced in geth 1.15.7 contraint 0 for chain id
const NullClientChainID = evmtypes.NullClientChainID

//
// Client methods
Expand Down
3 changes: 2 additions & 1 deletion pkg/config/configtest/configtest.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,12 @@ import (

"github.com/smartcontractkit/chainlink-evm/pkg/config"
"github.com/smartcontractkit/chainlink-evm/pkg/config/toml"
"github.com/smartcontractkit/chainlink-evm/pkg/types"
"github.com/smartcontractkit/chainlink-evm/pkg/utils/big"
)

func NewChainScopedConfig(t testing.TB, overrideFn func(c *toml.EVMConfig)) *config.ChainScoped {
chainID := big.NewI(0)
chainID := big.NewI(types.NullClientChainID)
evmCfg := &toml.EVMConfig{
ChainID: chainID,
Chain: toml.Defaults(chainID),
Expand Down
2 changes: 1 addition & 1 deletion pkg/testutils/evmtypes.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import (
// FixtureChainID matches the chain always added by fixtures.sql
// It is set to 0 since no real chain ever has this ID and allows a virtual
// "test" chain ID to be used without clashes
var FixtureChainID = big.NewInt(0)
var FixtureChainID = big.NewInt(evmtypes.NullClientChainID)

// SimulatedChainID is the chain ID for the go-ethereum simulated backend
var SimulatedChainID = big.NewInt(1337)
Expand Down
2 changes: 2 additions & 0 deletions pkg/types/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ import (
"github.com/ethereum/go-ethereum/accounts/abi"
)

const NullClientChainID = 1399100

func MustGetABI(json string) abi.ABI {
abi, err := abi.JSON(strings.NewReader(json))
if err != nil {
Expand Down
Loading