forked from ethereum-optimism/op-geth
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add more verbosity to contract-address getter defaults (#305)
Before the `GetAddresses` function silently returned the mainnet addresses as a default value, without the caller being made aware of this. Now, the `GetAddresses` function will return `nil` whenever it does not explicitly maps the passed in chain-id to a set of addresses. The newly added `GetAddressesOrDefault` function allows for retrieving the addresses with a default fallback for easier use in inline calls. This replicates the behavior of the old `GetAddresses` functionality with more verbosity.
- Loading branch information
Showing
4 changed files
with
26 additions
and
8 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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