From b29c327b97f2ee713dfafb94d603489acf040c55 Mon Sep 17 00:00:00 2001 From: Jordan Krage Date: Thu, 30 Nov 2023 09:42:02 -0600 Subject: [PATCH] core/chains/evm/config/toml/defaults: fix sepolia link address (#11426) --- core/chains/evm/client/client.go | 5 ++++- core/chains/evm/client/rpc_client.go | 4 +++- core/chains/evm/config/toml/defaults/Ethereum_Sepolia.toml | 2 +- docs/CHANGELOG.md | 4 ++++ docs/CONFIG.md | 2 +- 5 files changed, 13 insertions(+), 4 deletions(-) diff --git a/core/chains/evm/client/client.go b/core/chains/evm/client/client.go index cccda9914fc..688cc3c9bea 100644 --- a/core/chains/evm/client/client.go +++ b/core/chains/evm/client/client.go @@ -2,6 +2,7 @@ package client import ( "context" + "fmt" "math/big" "strings" "time" @@ -166,7 +167,9 @@ func (client *client) TokenBalance(ctx context.Context, address common.Address, if err != nil { return numLinkBigInt, err } - numLinkBigInt.SetString(result, 0) + if _, ok := numLinkBigInt.SetString(result, 0); !ok { + return nil, fmt.Errorf("failed to parse int: %s", result) + } return numLinkBigInt, nil } diff --git a/core/chains/evm/client/rpc_client.go b/core/chains/evm/client/rpc_client.go index fc9c348a572..01851c4ae90 100644 --- a/core/chains/evm/client/rpc_client.go +++ b/core/chains/evm/client/rpc_client.go @@ -866,7 +866,9 @@ func (r *rpcClient) TokenBalance(ctx context.Context, address common.Address, co if err != nil { return numLinkBigInt, err } - numLinkBigInt.SetString(result, 0) + if _, ok := numLinkBigInt.SetString(result, 0); !ok { + return nil, fmt.Errorf("failed to parse int: %s", result) + } return numLinkBigInt, nil } diff --git a/core/chains/evm/config/toml/defaults/Ethereum_Sepolia.toml b/core/chains/evm/config/toml/defaults/Ethereum_Sepolia.toml index 7b979c2fd8b..27dda602962 100644 --- a/core/chains/evm/config/toml/defaults/Ethereum_Sepolia.toml +++ b/core/chains/evm/config/toml/defaults/Ethereum_Sepolia.toml @@ -1,5 +1,5 @@ ChainID = '11155111' -LinkContractAddress = '0xb227f007804c16546Bd054dfED2E7A1fD5437678' +LinkContractAddress = '0x779877A7B0D9E8603169DdbD7836e478b4624789' MinContractPayment = '0.1 link' [GasEstimator] diff --git a/docs/CHANGELOG.md b/docs/CHANGELOG.md index e282d047892..dc2f774cd31 100644 --- a/docs/CHANGELOG.md +++ b/docs/CHANGELOG.md @@ -67,6 +67,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - `mercury_insufficient_blocks_count` - `mercury_zero_blocks_count` +### Fixed + +- Corrected Ethereum Sepolia `LinkContractAddress` to `0x779877A7B0D9E8603169DdbD7836e478b4624789` + ... diff --git a/docs/CONFIG.md b/docs/CONFIG.md index 38aac7085e8..3568abe7a0e 100644 --- a/docs/CONFIG.md +++ b/docs/CONFIG.md @@ -5271,7 +5271,7 @@ BlockBackfillDepth = 10 BlockBackfillSkip = false FinalityDepth = 50 FinalityTagEnabled = false -LinkContractAddress = '0xb227f007804c16546Bd054dfED2E7A1fD5437678' +LinkContractAddress = '0x779877A7B0D9E8603169DdbD7836e478b4624789' LogBackfillBatchSize = 1000 LogPollInterval = '15s' LogKeepBlocksDepth = 100000