Skip to content

Commit

Permalink
core/chains/evm/config/toml/defaults: fix sepolia link address (#11426)
Browse files Browse the repository at this point in the history
  • Loading branch information
jmank88 authored Nov 30, 2023
1 parent 1f5182b commit b29c327
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 4 deletions.
5 changes: 4 additions & 1 deletion core/chains/evm/client/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package client

import (
"context"
"fmt"
"math/big"
"strings"
"time"
Expand Down Expand Up @@ -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
}

Expand Down
4 changes: 3 additions & 1 deletion core/chains/evm/client/rpc_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down
2 changes: 1 addition & 1 deletion core/chains/evm/config/toml/defaults/Ethereum_Sepolia.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
ChainID = '11155111'
LinkContractAddress = '0xb227f007804c16546Bd054dfED2E7A1fD5437678'
LinkContractAddress = '0x779877A7B0D9E8603169DdbD7836e478b4624789'
MinContractPayment = '0.1 link'

[GasEstimator]
Expand Down
4 changes: 4 additions & 0 deletions docs/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`
...
<!-- unreleasedstop -->
Expand Down
2 changes: 1 addition & 1 deletion docs/CONFIG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5271,7 +5271,7 @@ BlockBackfillDepth = 10
BlockBackfillSkip = false
FinalityDepth = 50
FinalityTagEnabled = false
LinkContractAddress = '0xb227f007804c16546Bd054dfED2E7A1fD5437678'
LinkContractAddress = '0x779877A7B0D9E8603169DdbD7836e478b4624789'
LogBackfillBatchSize = 1000
LogPollInterval = '15s'
LogKeepBlocksDepth = 100000
Expand Down

0 comments on commit b29c327

Please sign in to comment.