Repository navigation
set address in From optionally for CallOpts - #2290
Merged
Merged
Conversation
skudasov
force-pushed
the
remove-callOpts-validation-for-read-only-mode
branch
3 times, most recently
from
November 28, 2025 08:29
9fbca96 to
2441146
Compare
skudasov
force-pushed
the
remove-callOpts-validation-for-read-only-mode
branch
from
November 28, 2025 08:30
2441146 to
93fac19
Compare
ChrisAmora
approved these changes
Nov 28, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Below is a summarization created by an LLM (gpt-4-0125-preview). Be mindful of hallucinations and verify accuracy.
Why
The changes aim to enhance how the
NewCallOptsandNewCallKeyOptsfunctions in thesethclient handle cases where no addresses are loaded or the specified key number is out of range. It addresses potential issues when calling view/pure functions without a sender, which may lead to incorrect behavior. Additionally, it simplifies error handling in these scenarios by removing redundant code and focusing on warning the user about possible implications.What
Fromfield inbind.CallOptsis now optional and warns about potential issues with view/pure functions without a sender.WrnEmptyFromInCallOptsto notify users when no keys are found, and theFromfield in call options might be empty.NewCallOptsandNewCallKeyOptsfunctions to conditionally set theFromfield only if addresses are available, otherwise, log a warning message. This change removes the previous error handling where an error call options object was returned if the key number was out of range.errCallOptsIfAddressCountTooLowfunction, which previously handled the error generation for out-of-range key numbers, simplifying the logic in creating call options.